ngff_zarr.rfc4_validationΒΆ
RFC 4 validation for anatomical orientation in OME-NGFF.
This module provides validation for RFC 4 anatomical orientation metadata against the JSON schema.
Module ContentsΒΆ
FunctionsΒΆ
Load the RFC 4 orientation JSON schema. |
|
Validate RFC 4 anatomical orientation metadata against the JSON schema. |
|
Check if the axes contain RFC 4 anatomical orientation metadata. |
APIΒΆ
- ngff_zarr.rfc4_validation.load_rfc4_orientation_schema() dictΒΆ
Load the RFC 4 orientation JSON schema.
- ngff_zarr.rfc4_validation.validate_rfc4_orientation(axes: list[dict[str, Any]]) NoneΒΆ
Validate RFC 4 anatomical orientation metadata against the JSON schema.
Parameters
axes : List[Dict[str, Any]] List of axis metadata dictionaries to validate
Raises
ImportError If jsonschema is not available jsonschema.ValidationError If the orientation metadata is invalid ValueError If orientation is inconsistently defined across spatial axes. The two messages carry stable marker substrings β
"same type"for a mixed-typefailure and"all spatial axes"for the all-or-none completeness failure β that :func:ngff_zarr.structural_validation.validate_axis_orientationreads to map each failure onto its :class:SpecRule. These markers are a load-bearing contract pinned by a message-stability test (test_rfc4_orientation_messages_carry_mapping_markers) so the mapping cannot silently break if the wording is later edited.