Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require a minimum size of secondary frames in tifffile sources. #896

Merged
merged 2 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))
- Added a canReadList method to large_image to show which source can be used ([895](../../pull/895))

### Improvements
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