ngff_zarr.to_ngff_imageΒΆ

Module ContentsΒΆ

FunctionsΒΆ

to_ngff_image

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:

NgffImage