simplezarr.utils.multiscale
Support for multiscale images, most notably ome-zarr.
The purpose of this utility is to examine the metadata of a Zarr file and produce typed structures to easily process the data further.
OME-Zarr, a.k.a. next-generation file format (NGFF) builds on Zarr version 3, to define hierarchical datasets. This module implements the “multiscales” metadata, ignoring the transitional “bioformats2raw.layout” and “omero” metadata. In its current form, the “labels”, “plate” and “well” metadata are also ignored.
- class simplezarr.utils.multiscale.MultiscaleInfo(name: str, axes_names: tuple[str, ...], unit: str, unit_factor: float, scales: list[ScaleInfo])
Bases:
objectRepresents a single multiscale image.
- classmethod from_zarr_node(zarr_node: ZarrGroup) list[MultiscaleInfo]
Given a zarr node, produce a list of MultiscaleInfo objects (one per multiscale dict in the metadata).
This information is geared for use by the
simplezarr.chunkpool.ChunkPool.
- class simplezarr.utils.multiscale.ScaleInfo(array: ZarrArray, level: int, mean_scale: float, spatial_shape: tuple[int, ...], spatial_scale: tuple[float, ...], spatial_offset: tuple[float, ...], spatial_chunk_shape: tuple[float, ...], nchannels: int, ntimes: int)
Bases:
objectInformation that represents a single scale in a multiscale image.