Skip to content

Commit

Permalink
Merge pull request #591 from girder/ome-tile-sizes
Browse files Browse the repository at this point in the history
Handle OME Tiff files with odd tile sizes.
  • Loading branch information
manthey authored Apr 13, 2021
2 parents b12c7e6 + 40bbd33 commit 71f5b0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- More untiled tiff files are handles by the bioformats reader (#569)
- Expose a concurrent option on endpoints for converting images (#583)
- Better concurrency use in image conversion (#587)
- Handle more OME tiffs (#585)
- Handle more OME tiffs (#585, #591)

### Changes
- Exceptions on cached items are no longer within the KeyError context (#584)
Expand Down
3 changes: 2 additions & 1 deletion sources/ometiff/large_image_source_ometiff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ def getTile(self, x, y, z, pilImageAllowed=False, numpyAllowed=False,
if subdir:
scale = int(2 ** subdir)
if (dir is None or
dir.tileWidth != self.tileWidth or dir.tileHeight != self.tileHeight or
(dir.tileWidth != self.tileWidth and dir.tileWidth != dir.imageWidth) or
(dir.tileHeight != self.tileHeight and dir.tileHeight != dir.imageHeight) or
abs(dir.imageWidth * scale - self.sizeX) > scale or
abs(dir.imageHeight * scale - self.sizeY) > scale):
return super().getTile(
Expand Down

0 comments on commit 71f5b0e

Please sign in to comment.