ngff_zarr.to_ngff_image
ΒΆ
Module ContentsΒΆ
FunctionsΒΆ
Create an image with pixel array and metadata to following the OME-NGFF data model. |
APIΒΆ
- ngff_zarr.to_ngff_image.to_ngff_image(data: Union[numpy.typing.ArrayLike, collections.abc.MutableMapping, str, zarr.core.Array], dims: Optional[Sequence[ngff_zarr.zarr_metadata.SupportedDims]] = None, scale: Optional[Union[Mapping[Hashable, float]]] = None, translation: Optional[Union[Mapping[Hashable, float]]] = None, name: str = 'image', axes_units: Optional[Mapping[str, ngff_zarr.zarr_metadata.Units]] = None) ngff_zarr.ngff_image.NgffImage ΒΆ
Create an image with pixel array and metadata to following the OME-NGFF data model.
- Parameters:
data (ArrayLike, ZarrArray, MutableMapping, str) β Multi-dimensional array that provides the image pixel values. It can be a numpy.ndarray or another type that behaves like a numpy.ndarray, i.e. an ArrayLike. If a ZarrArray, MutableMapping, or str, it will be loaded into Dask lazily as a zarr Array.
dims (sequence of hashable, optional) β Tuple specifying the data dimensions. Values should drawn from: {βtβ, βzβ, βyβ, βxβ, βcβ} for time, third spatial direction second spatial direction, first spatial dimension, and channel or component, respectively spatial dimension, and time, respectively.
scale (dict of floats, optional) β Pixel spacing for the spatial dims
translation (dict of floats, optional) β Origin or offset of the center of the first pixel.
name (str, optional) β Name of the resulting image
axes_units (dict of str, optional) β Units to associate with the axes. Should be drawn from UDUNITS-2, enumerated at https://ngff.openmicroscopy.org/latest/#axes-md
- Returns:
Representation of an image (pixel data + metadata) for a single scale of an NGFF-OME-Zarr multiscale dataset
- Return type: