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 ¶
PixelIdentity ¶
Bases: ZarrContractModel
Resolution-specific ISCC-BIO fingerprint and full-image semantic guard.
Missing/old profiles are readable for cache invalidation only. They are not evidence under the current comparison policy.
CanonicalZarrSource ¶
Bases: ZarrContractModel
Managed locator for a verified canonical Zarr representation.
ManagedZarrNode ¶
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 ¶
CanonicalPlateSource ¶
CanonicalPlateIndex ¶
CanonicalPlateImageRecord ¶
CanonicalPlateLabelRecord ¶
CanonicalInput ¶
CanonicalInputManifest ¶
ShallowImageNode ¶
ShallowLabelNode ¶
ShallowCollection ¶
Bases: ZarrContractModel
Portable scientific relationships in a BIOMERO shallow result.
This graph deliberately excludes managed roots, OMERO identifiers, pixel identities and workflow receipts. It is not RFC-8 metadata; adapters can project the graph to a standards representation when that representation is supported by the selected NGFF profile.
ShallowImageBinding ¶
ShallowLabelBinding ¶
ShallowBindings ¶
ShallowManifest ¶
Bases: ZarrContractModel
Versioned BIOMERO storage manifest for one 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 ¶
ShallowZarrReference ¶
Bases: ZarrContractModel
Managed locator attached to one OMERO image or 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 ¶
Encode the reference for an OMERO MapAnnotation value map.
from_annotation_values
classmethod
¶
Decode and validate an OMERO MapAnnotation value map.
from_manifest
classmethod
¶
from_manifest(manifest: ShallowManifest, *, 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.
ShallowNodePointer ¶
Bases: ZarrContractModel
The biomero attribute that links a shallow image node to its manifest.
BIOMERO.shallower writes this object as the biomero attribute of every
image node's NGFF attributes (.zattrs, or attributes.ome in
zarr.json) when it replaces the node's multiscales with a pointer
to .biomero-shallow.json. The pointer has no schema field
on the wire and gaining one would break existing readers, which forbid
unknown fields; format names the layout and the manifest it points to
carries the contract schema.
The schema-1 pointer (model: rfc8-shallow-copy instead of format)
is deliberately not accepted: such a store must be migrated by
BIOMERO.shallower before anything else reads it.
Attributes:
| Name | Type | Description |
|---|---|---|
format |
str
|
Always |
manifest |
str
|
Always |
workflow_id |
UUID
|
The workflow the shallow store belongs to. |
from_manifest
classmethod
¶
Build the pointer that BIOMERO.shallower writes for a manifest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manifest
|
ShallowManifest
|
The manifest the pointer refers to. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ShallowNodePointer |
ShallowNodePointer
|
The pointer for the manifest's workflow. |
CanonicalMarker ¶
Bases: ZarrContractModel
The commit marker of a canonical Zarr store.
BIOMERO.importer writes it as .biomero-canonical.json in the root of a
canonical store, or as a sidecar file for a Zarr indexed in place. It records the full source (including every
per-node pixel identity of a Plate) behind the compact OMERO annotation.
Its version field is markerSchema, not schema, because it predates
the shared naming; the wrapped source carries its own schema.
Attributes:
| Name | Type | Description |
|---|---|---|
marker_schema |
int
|
Version of this wrapper. |
state |
str
|
Always |
source |
CanonicalZarrSource | CanonicalPlateSource
|
What the store is. |
RFC-8 draft projection¶
biomero_schema.rfc8 ¶
Projection boundary for the early OME-NGFF RFC-8 v1 draft.
RFC-8 v1 (2026-08) is not an adopted OME-NGFF specification. This module projects BIOMERO's format-independent collection graph into the draft shape so that alignment can be tested without making draft metadata authoritative or claiming that NGFF 0.4 / Zarr v2 stores are RFC-8 compliant.
Rfc8DraftPath ¶
project_rfc8_v1_draft ¶
project_rfc8_v1_draft(manifest: ShallowManifest, *, ome_version: str, image_paths: Mapping[str, Rfc8DraftPath], label_paths: Mapping[str, Rfc8DraftPath]) -> dict
Project a shallow graph into the RFC-8 v1 draft collection shape.
Callers provide paths because BIOMERO managed-storage bindings are not portable RFC paths. Production writers must not use this projection until the selected NGFF profile and referenced stores support the accepted collections specification.