Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiscale arrays in Zarr V3 with provisional metadata #269

Conversation

aliddell
Copy link
Member

@aliddell aliddell commented Jul 8, 2024

This PR uses the same OME metadata as our Zarr V2 writer to express multiscale semantics. The following changes were made:

  • A protected method, Zarr::make_multiscale_metadata_(), was implemented by moving the code from ZarrV2::write_group_metadata_() so that it could be made accessible to both ZarrV2 and ZarrV3 instances.
    • Call make_multiscale_metadata_() from both overrides of write_group_metadata_().
  • Update the metadata returned by Zarr::get_meta() to reflect that both types of Zarr store support multiscale.

Basic functionality is verified in the write-zarr-v3-raw-multiscale.cpp test file. The test scheme is the same as in write-zarr-v2-raw-multiscale.cpp, but the paths are changed to reflect the different layout.

@aliddell aliddell linked an issue Jul 8, 2024 that may be closed by this pull request
@aliddell aliddell requested review from nclack, jeskesen and shlomnissan and removed request for nclack July 8, 2024 20:16
aliddell added 2 commits July 15, 2024 11:25
…ale-arrays-in-zarr-v3-with-provisional-metadata
…ale-arrays-in-zarr-v3-with-provisional-metadata
@aliddell aliddell added the enhancement New feature or request label Jul 23, 2024
Copy link
Contributor

@jeskesen jeskesen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, other than a couple of nitpicky indentation things.

src/zarr.cpp Outdated
{ "type", "scale" },
{ "scale", scales },
},
} },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trivial, but this indenting is confusing

src/zarr.cpp Outdated
{ "type", "scale" },
{ "scale", scales },
},
} },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trivial, but this indenting is confusing

@aliddell aliddell merged commit d2510d5 into main Jul 23, 2024
3 checks passed
@aliddell aliddell deleted the 250-support-multiscale-arrays-in-zarr-v3-with-provisional-metadata branch July 23, 2024 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multiscale arrays in Zarr v3 with provisional metadata
2 participants