Data (ome_zarr.data)

Functions for generating synthetic data.

ome_zarr.data.astronaut() Tuple[List, List]

Sample data from skimage.

ome_zarr.data.coins() Tuple[List, List]

Sample data from skimage.

ome_zarr.data.create_zarr(zarr_directory: str, method: ~typing.Callable[[...], ~typing.Tuple[~typing.List, ~typing.List]] = <function coins>, label_name: str = 'coins', fmt: ~ome_zarr.format.Format = FormatV04, chunks: ~typing.Tuple | ~typing.List | None = None) Group

Generate a synthetic image pyramid with labels.

ome_zarr.data.make_circle(h: int, w: int, value: int, target: ndarray) None

Apply a 2D circular mask to the given array.

>>> import numpy as np
>>> example = np.zeros((8, 8))
>>> make_circle(8, 8, 1, example)
>>> print(example)
[[0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 1. 1. 1. 1. 1. 0.]
 [0. 1. 1. 1. 1. 1. 1. 1.]
 [0. 1. 1. 1. 1. 1. 1. 1.]
 [0. 1. 1. 1. 1. 1. 1. 1.]
 [0. 1. 1. 1. 1. 1. 1. 1.]
 [0. 1. 1. 1. 1. 1. 1. 1.]
 [0. 0. 1. 1. 1. 1. 1. 0.]]
ome_zarr.data.rgb_to_5d(pixels: ndarray) List

Convert an RGB image into 5D image (t, c, z, y, x).