Skip to content

Commit

Permalink
Harden the ometiff reader against erroneous axis values
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Mar 7, 2025
1 parent 1d29c64 commit 2d3494b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
- Reformat metadata for non-uniform axis values ([#1832](../../pull/1832))
- Reorder zarr axes in read mode ([#1833](../../pull/1833))
- Allow selecting inverted histogram ranges in the UI ([#1839](../../pull/1839))
- Jupyter: Increase default zoom on small images ([#1843](../../pull/1843))
- Debounce histogram requests in the frame selector ([#1844](../../pull/1844))

### Changes

Expand All @@ -21,6 +23,7 @@

- Zarr Sink: Allow X and Y to have length 1 ([#1837](../../pull/1837))
- Ask zarr to use zero rather than empty arrays ([#1840](../../pull/1840))
- Harden the ometiff reader against erroneous axis values ([#1847](../../pull/1847))

## 1.31.1

Expand Down
3 changes: 2 additions & 1 deletion sources/ometiff/large_image_source_ometiff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ def getMetadata(self):
for frame in result['frames']:
for key in reftbl:
if key in frame and reftbl[key] not in frame:
frame[reftbl[key]] = int(frame[key])
if int(frame[key]) < len(result['frames']):
frame[reftbl[key]] = int(frame[key])
frame.pop(key, None)
self._addMetadataFrameInformation(result, channels)
return result
Expand Down

0 comments on commit 2d3494b

Please sign in to comment.