ngff_zarr.to_multiscalesΒΆ
Module ContentsΒΆ
FunctionsΒΆ
Generate multiple resolution scales for the OME-NGFF standard data model. |
APIΒΆ
- ngff_zarr.to_multiscales._ngff_image_scale_factors(ngff_image, min_length, out_chunks)ΒΆ
- ngff_zarr.to_multiscales._large_image_serialization(
- image: ngff_zarr.ngff_image.NgffImage,
- progress: Optional[Union[ngff_zarr.rich_dask_progress.NgffProgress, ngff_zarr.rich_dask_progress.NgffProgressCallback]],
- ngff_zarr.to_multiscales.to_multiscales(
- data: Union[ngff_zarr.ngff_image.NgffImage, numpy.typing.ArrayLike, collections.abc.MutableMapping, str, zarr.core.Array],
- scale_factors: Union[int, Sequence[Union[Dict[str, int], int]]] = 128,
- method: Optional[ngff_zarr.methods.Methods] = None,
- chunks: Optional[Union[int, Tuple[int, ...], Tuple[Tuple[int, ...], ...], Mapping[Any, Union[None, int, Tuple[int, ...]]]]] = None,
- progress: Optional[Union[ngff_zarr.rich_dask_progress.NgffProgress, ngff_zarr.rich_dask_progress.NgffProgressCallback]] = None,
- cache: Optional[bool] = None,
Generate multiple resolution scales for the OME-NGFF standard data model.
- Parameters:
data (NgffImage, ArrayLike, ZarrArray, MutableMapping, str) β Multi-dimensional array that provides the image pixel values, or image pixel values + image metadata when an NgffImage.
scale_factors (int of minimum length, int per scale or dict of spatial dimension int's per scale) β If a single integer, scale factors in spatial dimensions will be increased by a factor of two until this minimum length is reached. If a list, integer scale factors to apply uniformly across all spatial dimensions or along individual spatial dimensions. Examples: 64 or [2, 4] or [{βxβ: 2, βyβ: 4 }, {βxβ: 5, βyβ: 10}] Scaling is constrained by size of chunks - we do not scale below the chunk size.
method β Specify the anti-aliasing method used to downsample the image. Default is ITKWASM_GAUSSIAN.
chunks (Dask array chunking specification, optional) β Specify the chunking used in each output scale. The default is 128 for 3D images and 256 for 2D images.
cache (bool, optional) β Cache intermediate results to disk to limit memory consumption. If None, the default, determine based on ngff_zarr.config.memory_target.
progress (NgffProgress, NgffProgressCallback) β Optional progress logger
- Returns:
NgffImage for each resolution and NGFF multiscales metadata
- Rtype :
Multiscales