Skip to content

Commit

Permalink
Merge pull request #945 from girder/fix-ometiff-frames-style
Browse files Browse the repository at this point in the history
Fix an issue with styling frames in ome tiffs
  • Loading branch information
manthey authored Aug 25, 2022
2 parents 5e01020 + 287e8d4 commit 75d65da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
### Improvements
- Add a general filter control to item lists ([938](../../pull/938), [941](../../pull/941))
- Item list modal dialogs are wider ([939](../../pull/939))
- Improve mimetypes on upload to Girder ([943](../../pull/943))
- Improve mimetypes on upload to Girder ([944](../../pull/944))

### Bug Fixes
- Fix iterating tiles where the overlap larger than the tile size ([940](../../pull/940))
- Better ignore tiff directories that aren't part of the pyramid ([943](../../pull/943))
- Fix an issue with styling frames in ome tiffs ([945](../../pull/945))

## 1.16.1

Expand Down
2 changes: 1 addition & 1 deletion sources/tiff/large_image_source_tiff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def getTileFromEmptyDirectory(self, x, y, z, **kwargs):
scale = 1
dirlist = self._tiffDirectories
frame = self._getFrame(**kwargs)
if frame > 0:
if frame > 0 and hasattr(self, '_frames'):
dirlist = self._frames[frame]['dirs']
while dirlist[z] is None:
scale *= 2
Expand Down
6 changes: 6 additions & 0 deletions test/test_source_ometiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,9 @@ def testXMLParsing():
assert len(metadata[key]) == value
else:
assert metadata[key] == value


def testFrameStyleOMETiff():
imagePath = datastore.fetch('DDX58_AXL_EGFR_well2_XY01.ome.tif')
source = large_image_source_ometiff.open(imagePath, style={'bands': [{'frame': 4}]})
assert source.getTile(0, 0, 2)

0 comments on commit 75d65da

Please sign in to comment.