Skip to content

Image Label

ome_zarr_models.v05.image_label.ImageLabel

Bases: BaseGroupv05[ImageLabelAttrs]

An OME-Zarr image label dataset.

Attributes:

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

from_zarr

from_zarr(group: Group) -> Self

Create an instance of an OME-Zarr image from a zarr.Group.

Parameters:

Name Type Description Default
group Group

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

required

ome_zarr_models.v05.image_label.ImageLabelAttrs

Bases: BaseOMEAttrs

Attributes for an image label object.

Attributes:

Name Type Description
version Literal['0.5']
image_label Label | None
multiscales list[Multiscale]

Other types

ome_zarr_models.v05.image_label_types.Color

Bases: BaseAttrs

A colour used for a specific label value when showing labels.

Attributes:

Name Type Description
label_value int

Pixel value of label in image data that this colour is used for.

rgba tuple[int, int, int, int] | None

RGBA colour.

ome_zarr_models.v05.image_label_types.Label

Bases: LabelBase

Metadata for a single image-label.

Attributes:

Name Type Description
colors tuple[Color, ...] | None

Colours for showing the labels.

properties tuple[Property, ...] | None

Additional properties for each label value.

source Source | None

Information about the source data used to create the labels.

version Literal['0.5'] | None

Version of the image-label specification.

ome_zarr_models.v05.image_label_types.Property

Bases: BaseAttrs

A single property.

Attributes:

Name Type Description
label_value int

ome_zarr_models.v05.image_label_types.Source

Bases: BaseAttrs

Source data for the labels.

Attributes:

Name Type Description
image str | None

Relative path to a Zarr group of a key image.