Skip to content

Zarr models

biomero_schema.zarr

Cross-service schemas for BIOMERO-managed Zarr data.

These models describe portable records exchanged by BIOMERO services. They do not implement canonical storage, OMERO access, workflow events, or Zarr I/O.

ZarrContractModel

Bases: BaseModel

Base configuration shared by the Zarr interchange contracts.

to_dict

to_dict() -> dict[str, Any]

Return the stable camelCase wire representation.

from_dict classmethod

from_dict(value: Mapping[str, Any])

Validate a wire representation.

PixelIdentity

Bases: ZarrContractModel

ISCC-BIO identity and semantic guard for one NGFF image or label node.

schema property

schema: int

Wire schema version (kept distinct from workflow schema versions).

CanonicalZarrSource

Bases: ZarrContractModel

Managed locator for a verified canonical Zarr representation.

schema property

schema: int

Wire schema version (kept distinct from workflow schema versions).

to_annotation_values

to_annotation_values() -> dict[str, str]

Encode the record for an OMERO MapAnnotation value map.

from_annotation_values classmethod

from_annotation_values(values: Mapping[str, str]) -> CanonicalZarrSource

Decode and validate an OMERO MapAnnotation value map.

ManagedZarrNode

Bases: ZarrContractModel

Stable managed locator for one physical NGFF image or label node.

ZarrLabelComponent

Bases: ZarrContractModel

One logical label layer and, when inherited, its managed source.

source is absent only while the label pixels are stored locally in the collection that owns this record. A workflow input snapshot always uses a managed source because its reconstructed transfer artifact is temporary.

CanonicalPlateImage

Bases: ZarrContractModel

One image-level node and its labels within a canonical Plate Zarr.

CanonicalPlateSource

Bases: ZarrContractModel

Managed canonical Plate Zarr with independently identified image nodes.

CanonicalPlateIndex

Bases: ZarrContractModel

Compact Plate-level index for split OMERO canonical annotations.

CanonicalPlateImageRecord

Bases: ZarrContractModel

One bounded image-node record belonging to a compact Plate index.

CanonicalPlateLabelRecord

Bases: ZarrContractModel

One bounded label-node record belonging to a compact Plate index.

CanonicalInput

Bases: ZarrContractModel

One selected OMERO object and the exact canonical generation exported.

schema property

schema: int

Wire schema version (kept distinct from workflow schema versions).

CanonicalInputManifest

Bases: ZarrContractModel

Recovery manifest for the canonical inputs exported for one workflow.

schema property

schema: int

Wire schema version (kept distinct from workflow schema versions).

ShallowImageReference

Bases: ZarrContractModel

One omitted image node and the labels retained for it.

ShallowCollection

Bases: ZarrContractModel

BIOMERO's RFC-8-shaped record for a stored shallow result.

ShallowPlateReference

Bases: ZarrContractModel

Managed locator attached to a derived OMERO shallow Plate.

The compact Plate-level annotation indexes the authoritative collection manifest without repeating every per-image pixel identity in OMERO. Consumers must load and validate that manifest before reconstruction.

ZarrImportOptions

Bases: ZarrContractModel

Optional per-order controls for registering a BIOMERO Zarr result.

ShallowZarrReference

Bases: ZarrContractModel

Managed locator attached to one OMERO label-image projection.

The referenced collection remains the authority. Consumers must load its sidecar and verify that this image/label/source tuple is still present before materializing data.

to_annotation_values

to_annotation_values() -> dict[str, str]

Encode the reference for an OMERO MapAnnotation value map.

from_annotation_values classmethod

from_annotation_values(values: Mapping[str, str]) -> ShallowZarrReference

Decode and validate an OMERO MapAnnotation value map.

from_collection classmethod

from_collection(collection: ShallowCollection, *, storage_root: str, relative_path: str, image_node_path: str, label_node_paths: tuple[str, ...] | None = None) -> ShallowZarrReference

Create a projection reference and require collection membership.