fix: adding ome-zarr v0.4 back#398
Merged
Merged
Conversation
Signed-off-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>
TensorStore's zarr2 driver requires fill_value to be a boolean for bool dtype arrays, not an integer 0. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…to zarr-python, keeping TensorStore solely for array I/O. Route array access through impl.open_array() in the node layer. Also unblocks OME-Zarr v0.4 store creation and adds a sharding guard for Zarr v2 Signed-off-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>
ieivanov
reviewed
Apr 9, 2026
| ) | ||
| _ = dataset.create_position(row_name=row, col_name=col, pos_name=pos) | ||
| ome = dataset.zgroup.attrs["ome"] | ||
| ome = dict(dataset.zgroup.attrs) if version == "0.4" else dataset.zgroup.attrs["ome"] |
Contributor
There was a problem hiding this comment.
Did the location of ome metadata chance between v0.4 and v0.5? Do we not have a convenience method to extra this metadata, independent on ngff version?
Collaborator
Author
There was a problem hiding this comment.
Yeah it did change.
- v0.4: flat in
.zattrs->{"multiscales": [...], "omero": {...}} - v0.5: wrapped under
"ome"key inzarr.json->{"attributes": {"ome": {"multiscales": [...], "omero": {...}}}}
Contributor
|
Thanks Sri. Could you create a pypi release once that's merged? |
Collaborator
Author
|
I realized that for TensorStore, we can take Zarr-Python's implementation of Zarr groups and leave the actual Array I/O to TensorStore instead of writing shims for TensorStore.
yes |
… OME metadata access Replace inline v0.4/v0.5 metadata branching with get_ome_attrs() from core.compat. Used in NGFFNode.maybe_wrapped_ome_attrs, Plate.first_position, and tests. Signed-off-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>
…iteral["0.4",-"0.5"]): Replace version: Literal["0.5"] | None = None with version: Literal["0.4", "0.5"] on ImagesMeta and LabelImageMeta. Simplify creation code from "0.5" if self.version == "0.5" else None to self.version Signed-off-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>
… and LabelImage _parse_meta Old v0.4 stores often omit the root version field (SHOULD, not MUST in the spec). Align Position and LabelImage _parse_meta with the Well and Plate pattern of injecting self.version before model_validate. Signed-off-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows writing to OME-Zarr v0.4.