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_rfc4_orientation_schema

Load the RFC 4 orientation JSON schema.

validate_rfc4_orientation

Validate RFC 4 anatomical orientation metadata against the JSON schema.

has_rfc4_orientation_metadata

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

ngff_zarr.rfc4_validation.has_rfc4_orientation_metadata(
axes: List[Dict[str, Any]],
) bool

Check if the axes contain RFC 4 anatomical orientation metadata.

Parameters

axes : List[Dict[str, Any]] List of axis metadata dictionaries

Returns

bool True if any spatial axis has orientation metadata