Skip to content

Commit

Permalink
Merge pull request #651 from girder/band-interp-fallback
Browse files Browse the repository at this point in the history
Band interpretation for high bands errored.
  • Loading branch information
manthey authored Sep 9, 2021
2 parents 4e1bb5b + 8db8a55 commit 795f660
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## Unreleased

### Bug Fixes
- getBandInformation could fail on high bands in some cases

## Version 1.8.0

### Features
Expand Down
2 changes: 1 addition & 1 deletion large_image/tilesource/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ def getBandInformation(self, statistics=False, **kwargs):
if not getattr(self, '_bandInfoNoStats', None):
tile = self.getSingleTile()['tile']
bands = tile.shape[2] if len(tile.shape) > 2 else 1
interp = bandInterp.get(bands, 3)
interp = bandInterp.get(bands, bandInterp[3])
bandInfo = [{'interpretation': interp[idx] if idx < len(interp) else 'unknown'}
for idx in range(bands)]
self._bandInfoNoStats = bandInfo
Expand Down

0 comments on commit 795f660

Please sign in to comment.