OME-Zarr groups
ome_zarr_models.v05.BioFormats2Raw
Bases: BaseGroupv05[BioFormats2RawAttrs]
An OME-Zarr bioformats2raw dataset.
Warnings
It is not recommended to write new bioformats2raw groups. bioformats2raw is designed to support existing legacy data, and will be superseded by other OME-Zarr features in the future.
Notes
Currently this class does not offer a way to access OME-XML metadata. Please comment on issue #374 if you would find accessing OME-XML metadata useful.
Attributes:
| Name | Type | Description |
|---|---|---|
zarr_format |
Literal[3]
|
|
node_type |
Literal['group']
|
|
attributes |
BaseZarrAttrs[BioFormats2RawAttrs]
|
|
members |
Mapping[str, GroupSpec | ArraySpec] | None
|
|
images
ome_zarr_models.v05.HCS
Bases: BaseGroupv05[HCSAttrs]
An OME-Zarr high content screening (HCS) dataset.
Attributes:
| Name | Type | Description |
|---|---|---|
zarr_format |
Literal[3]
|
|
node_type |
Literal['group']
|
|
attributes |
BaseZarrAttrs[HCSAttrs]
|
|
members |
Mapping[str, GroupSpec | ArraySpec] | None
|
|
well_groups
Well groups within this HCS group.
Notes
Only well groups that exist are returned. This can be less than the number of wells defined in the HCS metadata if some of the well Zarr groups don't exist.
from_zarr
Create an OME-Zarr image model from a zarr.Group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group
|
Group
|
A Zarr group that has valid OME-Zarr image metadata. |
required |
get_well_group
Get a single well group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
i
|
int
|
Index of well group. |
required |
Raises:
| Type | Description |
|---|---|
WellGroupNotFoundError
|
If no Zarr group is found at the well path. |
ome_zarr_models.v05.Image
Bases: BaseGroupv05[ImageAttrs]
An OME-Zarr image dataset.
Attributes:
| Name | Type | Description |
|---|---|---|
zarr_format |
Literal[3]
|
|
node_type |
Literal['group']
|
|
attributes |
BaseZarrAttrs[ImageAttrs]
|
|
members |
Mapping[str, GroupSpec | ArraySpec] | None
|
|
datasets
Get datasets stored in this image.
The first index is for the multiscales. The second index is for the dataset inside that multiscales.
labels
labels: Labels | None
Any labels datasets contained in this image group.
Returns None if no labels are present.
from_zarr
Create an OME-Zarr image model from a zarr.Group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group
|
Group
|
A Zarr group that has valid OME-Zarr image metadata. |
required |
new
new(*, array_specs: Sequence[AnyArraySpec], paths: Sequence[str], axes: Sequence[Axis], scales: Sequence[Sequence[float]], translations: Sequence[Sequence[float] | None], name: str | None = None, multiscale_type: str | None = None, metadata: JsonValue | None = None, global_scale: Sequence[float] | None = None, global_translation: Sequence[float] | None = None) -> Image
Create a new Image from a sequence of multiscale arrays
and spatial metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
array_specs
|
Sequence[AnyArraySpec]
|
A sequence of array specifications that collectively represent the same image at multiple levels of detail. |
required |
paths
|
Sequence[str]
|
The paths to the arrays within the new Zarr group. |
required |
axes
|
Sequence[Axis]
|
|
required |
scales
|
Sequence[Sequence[float]]
|
For each array, a scale value for each axis of the array. |
required |
translations
|
Sequence[Sequence[float] | None]
|
For each array, a translation value for each axis the array. |
required |
name
|
str | None
|
A name for the multiscale collection. |
None
|
multiscale_type
|
str | None
|
Type of downscaling method used to generate the multiscale image pyramid. Optional. |
None
|
metadata
|
JsonValue | None
|
Arbitrary metadata to store in the multiscales group. |
None
|
global_scale
|
Sequence[float] | None
|
A global scale value for each axis of every array. |
None
|
global_translation
|
Sequence[float] | None
|
A global translation value for each axis of every array. |
None
|
Notes
This class does not store or copy any array data. To save array data, first write this class to a Zarr store, and then write data to the Zarr arrays in that store.
ome_zarr_models.v05.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
|
|
ome_zarr_models.v05.Labels
Bases: BaseGroupv05[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
|
|
from_zarr
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.