Skip to content

Preserve multiscale coordinate transforms during metadata updates - #296

Closed
Henrik-KM wants to merge 1 commit into
BioVisionCenter:mainfrom
Henrik-KM:fix/preserve-multiscale-transforms
Closed

Henrik-KM wants to merge 1 commit into
BioVisionCenter:mainfrom
Henrik-KM:fix/preserve-multiscale-transforms

Conversation

@Henrik-KM

Copy link
Copy Markdown

Fixes #281.

Decode the per-dataset scale and translation from each dataset's transforms, and keep the pyramid transforms on meta.coordinate_transformations. Both image and label codecs write the pyramid transforms back. Unit and axis metadata updates carry them through when rebuilding metadata.

This gives OME-Zarr 0.4 and 0.5 the same two-stage transform as the source file. For files with a pyramid scale, pixel_size now reports the dataset scale, as proposed in the issue. OME-Zarr 0.4 · OME-Zarr 0.5

The regression tests use image and label pyramids with non-unit scales and nonzero translations at both levels. They read the dataset coordinates, change metadata through the public API, and compare the stored transforms after reopening.

The full unit suite on Python 3.11 finished with 1,598 passes and 23 skips. All 75 focused tests passed on Python 3.12. The project hooks and source type check passed.

Prepared and tested with OpenAI Codex.

Checklist before merging

  • I added an appropriate entry to CHANGELOG.md

@lorenzocerrone

Copy link
Copy Markdown
Collaborator

Hi @Henrik-KM, thanks for the interest in ngio.

I'm closing this along with #293–#296, for the same reason: the linked issues don't have an agreed solution yet, and the new-API ones in particular need a design discussion before a PR can be reviewed.

If you'd like to contribute, please propose the approach on the issue first, and open a PR once there's agreement on the direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiscale-level coordinateTransformations are folded on read and dropped on write

2 participants