Skip to content

Commit

Permalink
Require a minimum size of secondary frames in tifffile sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Jul 26, 2022
1 parent 6638ddb commit 8c116cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## 1.16.0

### Features
- Add a tifffile tile source ([885](../../pull/885))
- Add a tifffile tile source ([885](../../pull/885), [896](../../pull/896))

### Improvements
- Pass options to the annotationLayer mode ([881](../../pull/881))
Expand Down
4 changes: 4 additions & 0 deletions sources/tifffile/large_image_source_tifffile/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class TifffileFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):

# Fallback for non-tiled or oddly tiled sources
_tileSize = 512
_minImageSize = 128
_minTileSize = 128
_maxTileSize = 2048
_maxAssociatedImageSize = 8192
Expand Down Expand Up @@ -161,6 +162,9 @@ def _findMatchingSeries(self):
skip = True
if skip:
continue
if (s.shape[s.axes.index('X')] < min(self.sizeX, self._minImageSize) and
s.shape[s.axes.index('Y')] < min(self.sizeY, self._minImageSize)):
continue
self._series.append(idx)
self._seriesShape.append({
'sizeX': s.shape[s.axes.index('X')], 'sizeY': s.shape[s.axes.index('Y')]})
Expand Down

0 comments on commit 8c116cc

Please sign in to comment.