Skip to content

Commit

Permalink
Merge pull request #806 from girder/improve-ometiff-channel-parse
Browse files Browse the repository at this point in the history
Improve parsing OME TIFF channel names.
  • Loading branch information
manthey authored Mar 21, 2022
2 parents 0ccb633 + 50ba34f commit 194d6a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sources/ometiff/large_image_source_ometiff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,12 @@ def getMetadata(self):
if len(set(channels)) != len(channels) and (
len(channels) <= 1 or len(channels) > len(result['frames'])):
channels = []
for k in {'C', 'Z', 'T'}:
if (str(len(result['frames'])) == str(self._omebase.get('Size%s' % k)) and
len(result['frames']) > 1 and
result['frames'][0].get('Index%s' % k) is None):
for idx in range(len(result['frames'])):
result['frames'][idx]['Index%s' % k] = idx
# Standardize "TheX" to "IndexX" values
reftbl = OrderedDict([
('TheC', 'IndexC'), ('TheZ', 'IndexZ'), ('TheT', 'IndexT'),
Expand Down

0 comments on commit 194d6a4

Please sign in to comment.