diff --git a/CHANGELOG.md b/CHANGELOG.md index 3aa762b2f..5f80d182e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/sources/tiff/large_image_source_tiff/__init__.py b/sources/tiff/large_image_source_tiff/__init__.py index 697df4a51..06615ea14 100644 --- a/sources/tiff/large_image_source_tiff/__init__.py +++ b/sources/tiff/large_image_source_tiff/__init__.py @@ -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 diff --git a/test/test_source_ometiff.py b/test/test_source_ometiff.py index 83ede000b..a4d8ec7af 100644 --- a/test/test_source_ometiff.py +++ b/test/test_source_ometiff.py @@ -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)