You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In imaging-formats/yaozarrs#85, @tlambert03 added a dingus to test yaozarrs conformance. He noted a few cases that might need a closer look (listed below). I will have a look at these before the Zurich hackathon.
# Questionable case: `image-label` without `multiscales` isn't a label image here.
fail parse_attributes/v0.4/core/valid/label/minimal
fail parse_attributes/v0.4/core/valid/label/minimal_properties
fail parse_attributes/v0.5/core/valid/label/minimal
fail parse_attributes/v0.5/core/valid/label/minimal_properties
fail parse_attributes/v0.6/core/valid/label/minimal
fail parse_attributes/v0.6/core/valid/label/minimal_properties
# Questionable case: identical files, and it's unclear what makes them invalid.
fail parse_attributes/v0.6/core/invalid/image/invalid_multiscale_transform_output
fail parse_attributes/v0.6/core/invalid/image/invalid_multiscale_transform_input_output
I can comment on Questionable case: `image-label` without `multiscales` isn't a label image here.
It's another case resulting from an inconsistency between the wording of the spec and the JSON schemas.
v06-attributes.ome.label-image.multiscales
Field required [type=missing, ...]
because the prose only ever puts image-label on a label image, and a label image MUST be a multiscale image:
0.6: "The zarr.json file for the label image MUST implement the multiscales specification." (L1496), and then "In addition to the multiscales key, the OME-Zarr Metadata in this image-level zarr.json file SHOULD contain another key, image-label" (L1499). (the layout at L94-95 says the same: "both a multiscaled image as well as a labeled image")
0.4 is the most explicit: "image-label groups MUST also contain multiscales metadata" (0.4.1 L462). (fwiw the 0.4.1 tag doesn't have a label.schema at all, so for v0.4 there isn't even a schema saying this is valid)
so I think the root cause is really in the spec/schema conflict (or, I'm misreading it).
for oztest, what if these cases kept testing the image-label block, but in a complete label image, i.e. with a minimal multiscales added? then they'd still be valid, and every implementation should agree on them, whether it follows the schemas or the prose. (rather than moving them to invalid/, which would lose a nice minimal case). This is what @DragaDoncila already did in #1 for the validate_zarr versions of these cases, which yaozarrs passes.
... otherwise oztest would need to be asserting an opinion about whether schema or prose dominates.
(happy to make that PR if you agree with the suggestion)
Same here: ngff-zarr does not accept image-label without multiscales, so these six cases fail for us too. If nobody has started, I can send the PR: add a multiscales to the valid minimal label cases, and add an invalid case without it.
Also, the two cases restored by #50 are refused by ngff-zarr on the schema, so they work as invalid cases again.
Activity
kevinyamauchi commentedon Oct 31, 2026
Related PR addressing:
#50
tlambert03 commentedon Nov 1, 2026
I can comment on
Questionable case: `image-label` without `multiscales` isn't a label image here.It's another case resulting from an inconsistency between the wording of the spec and the JSON schemas.
the case is
parse_attributes/v0.6/core/valid/label/minimal(and the same thing in v0.4 and v0.5, plus theminimal_propertiesvariants):{"ome": {"version": "0.6", "image-label": {"colors": [{"label-value": 1, "rgba": [0, 0, 0, 0]}]}}}oztest says this is valid, and I get why: it passes the official
label.schema, which only requiresome,image-labelandversion, andome_zarr.schema. It's also the spec repo's own schema-testing fixture (tests/attributes/spec/valid/label/minimal.json).yaozarrs say's it's invalid:
because the prose only ever puts
image-labelon a label image, and a label image MUST be a multiscale image:0.6: "The
zarr.jsonfile for the label image MUST implement the multiscales specification." (L1496), and then "In addition to themultiscaleskey, the OME-Zarr Metadata in this image-levelzarr.jsonfile SHOULD contain another key,image-label" (L1499). (the layout at L94-95 says the same: "both a multiscaled image as well as a labeled image")0.5: same sentence (0.5.2 L421)
0.4 is the most explicit: "
image-labelgroups MUST also containmultiscalesmetadata" (0.4.1 L462). (fwiw the 0.4.1 tag doesn't have alabel.schemaat all, so for v0.4 there isn't even a schema saying this is valid)image-labelisn't defined anywhere else, so a node withimage-labeland nomultiscalesis either a label image missing a MUST, or not anything the wording of the spec defines. yaozarrs follows the prose wherever it's stricter than the schemas, so we call it invalid. That's definitely a call that we could revisit. I vaguely recall prior discussions with OME devs that the spec should be considered to take precedence (but I can't find that now and could be wrong). Which one wins when they disagree is also being discussed right now in Are negative scale values allowed? (schema says > 0, prose says non-zero) ome/ngff#637 (one view, the other), where, if I'm reading it correctly, @clbarnes seems to agree that the text should be normative Are negative scale values allowed? (schema says > 0, prose says non-zero) ome/ngff#637 (comment). See also: Clarify that "image-label" and "multiscales" are siblings ome/ngff#21so I think the root cause is really in the spec/schema conflict (or, I'm misreading it).
for oztest, what if these cases kept testing the
image-labelblock, but in a complete label image, i.e. with a minimalmultiscalesadded? then they'd still be valid, and every implementation should agree on them, whether it follows the schemas or the prose. (rather than moving them toinvalid/, which would lose a nice minimal case). This is what @DragaDoncila already did in #1 for thevalidate_zarrversions of these cases, which yaozarrs passes.... otherwise oztest would need to be asserting an opinion about whether schema or prose dominates.
(happy to make that PR if you agree with the suggestion)
clbarnes commentedon Nov 1, 2026
I agree that the spec requires labels to be images and would be happy to field a PR to that effect!
vboussot commentedon Nov 10, 2026
Same here: ngff-zarr does not accept image-label without multiscales, so these six cases fail for us too. If nobody has started, I can send the PR: add a multiscales to the valid minimal label cases, and add an invalid case without it.
Also, the two cases restored by #50 are refused by ngff-zarr on the schema, so they work as invalid cases again.
tlambert03 commentedon Nov 10, 2026
i haven't started on it. that would be great. i think we're all agreed on the fix
Give the minimal label cases a multiscales and add missing_multiscales (