Skip to content

OME-Zarr 0.5: add version to well group attributes#315

Merged
melissalinkert merged 4 commits intoglencoesoftware:masterfrom
sbesson:well_version_attribute
Apr 17, 2026
Merged

OME-Zarr 0.5: add version to well group attributes#315
melissalinkert merged 4 commits intoglencoesoftware:masterfrom
sbesson:well_version_attribute

Conversation

@sbesson
Copy link
Copy Markdown
Member

@sbesson sbesson commented Apr 15, 2026

Discovered while generating a set of OME-Zarr 0.5 datasets with 0.12.0-rc3, the metadata written for the well group is currently invalid as it is missing a version attribute - see e..g https://ome.github.io/ome-ngff-validator/?source=https://gs-public-zarr-dev.s3.amazonaws.com/zarrv3/NIRHTa%252B001.zarr/A/1/

This PR fixes this by:

  • populating the attribute storing to include the version as for the other groups
  • extending the HCS tests to check the well group attributes: version and well/images

The README is also expanded to cover the multi-version support and the --ngff-version option. As this is slightly outside the scope of the initial problem, happy to move the last commit to a dedicated PR if that is preferred.

@sbesson sbesson added this to the 0.12.0 milestone Apr 15, 2026
Comment thread src/main/java/com/glencoesoftware/bioformats2raw/Converter.java Outdated
Copy link
Copy Markdown
Member

@erindiel erindiel left a comment

Choose a reason for hiding this comment

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

Confirmed with conversion of https://downloads.openmicroscopy.org/images/PerkinElmer-Operetta/idr0034/ with --ngff-version 0.5 that the zarr.json in each well (.zarr/<letter>/<number>/zarr.json) contained a version key:

{
  "zarr_format" : 3,
  "node_type" : "group",
  "attributes" : {
    "ome" : {
      "well" : {
        "images" : [ {
          "path" : "0",
          "acquisition" : 0
        }, {
          "path" : "1",
          "acquisition" : 0
        }, {
          "path" : "2",
          "acquisition" : 0
        }, {
          "path" : "3",
          "acquisition" : 0
        }, {
          "path" : "4",
          "acquisition" : 0
        }, {
          "path" : "5",
          "acquisition" : 0
        }, {
          "path" : "6",
          "acquisition" : 0
        }, {
          "path" : "7",
          "acquisition" : 0
        }, {
          "path" : "8",
          "acquisition" : 0
        } ]
      },
      "version" : "0.5"
    }
  }
}

I have a small note on the README, but it isn't required for this to be merged.

Comment thread README.md
Comment on lines 229 to 231
Several formatting options can be passed to the converter and will result in a Zarr dataset
that is not compatible with raw2ometiff and does not strictly follow the OME-NGFF
specification but may be suitable for other applications.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was considering changing this to may result and may not strictly follow, but I think instead the note in --ngff-version section is better.

Comment thread README.md
Comment on lines +235 to +237
Specifies the version of the [OME-Zarr specification](https://ngff.openmicroscopy.org/specifications/index.html)
that should be used while writing Zarr. Current supported values are 0.4 and 0.5.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Specifies the version of the [OME-Zarr specification](https://ngff.openmicroscopy.org/specifications/index.html)
that should be used while writing Zarr. Current supported values are 0.4 and 0.5.
Specifies the version of the [OME-Zarr specification](https://ngff.openmicroscopy.org/specifications/index.html)
that should be used while writing Zarr. Current supported values are 0.4 and 0.5.
Both options produce outputs which are compatible with raw2ometiff.

Are we comfortable saying this? Assuming both will be released together...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think this is correct if no additional option is passed but as noted above if additional formatting options are passed, the Zarr dataset might be stored using a layout that makes it incompatible with raw2ometiff or other OME-Zarr aware tooling

@melissalinkert
Copy link
Copy Markdown
Member

Merging as discussed with @Yajing826 and @sbesson so that we can unblock adding tests to #317. Propose that we do a final review of the README next week prior to tagging 0.12.0 to catch any final documentation issues.

@melissalinkert melissalinkert merged commit e531f7f into glencoesoftware:master Apr 17, 2026
5 of 8 checks passed
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.

3 participants