Skip to content

Commit

Permalink
Merge pull request #626 from girder/record-missing
Browse files Browse the repository at this point in the history
Mark when we know a tiff file is inefficient.
  • Loading branch information
manthey authored Aug 2, 2021
2 parents 0149ff9 + 5676c2e commit 84bbf3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sources/tiff/large_image_source_tiff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,12 @@ def _initWithTiffTools(self): # noqa
missing = [v is None for v in self._tiffDirectories]
maxMissing = max(0 if not v else missing.index(False, idx) - idx
for idx, v in enumerate(missing))
self._skippedLevels = maxMissing
if maxMissing >= self._maxSkippedLevels:
config.getConfig('logger').warning(
'Tiff image is missing many lower resolution levels (%d). '
'It will be inefficient to read lower resolution tiles.', maxMissing)
self._inefficientWarning = True
return True

def _reorient_numpy_image(self, image, orientation):
Expand Down

0 comments on commit 84bbf3c

Please sign in to comment.