Skip to content

Labels

Warning

The implementation of OME-Zarr 0.6 is not final, and subject to change. It is provided so users can test and evaluate ome-zarr-models and the specification before it becomes final. Please report issues and provide feedback!

ome_zarr_models.v06.labels.Labels

Bases: BaseGroupv06[LabelsAttrs]

An OME-Zarr labels dataset.

Attributes:

Name Type Description
zarr_format Literal[3]
node_type Literal['group']
attributes BaseZarrAttrs[LabelsAttrs]
members Mapping[str, GroupSpec | ArraySpec] | None

label_paths

label_paths: list[str]

List of paths to image-label groups within this labels group.

from_zarr

from_zarr(group: Group) -> Self

Create an OME-Zarr labels model from a zarr.Group.

Parameters:

Name Type Description Default
group Group

A Zarr group that has valid OME-Zarr label metadata.

required

get_image_labels_group

get_image_labels_group(path: str) -> ImageLabel

Get a image labels group at a given path.

ome_zarr_models.v06.labels.LabelsAttrs

Bases: BaseOMEAttrs

Attributes for an OME-Zarr labels dataset.

Attributes:

Name Type Description
version Literal['0.6.dev4']
labels list[str]

List of paths to labels arrays within a labels dataset.