Data (ome_zarr.data)
Functions for generating synthetic data.
- ome_zarr.data.astronaut() tuple[list, list][source]
Sample data from skimage.
- Returns:
pyramids – List of pyramid arrays.
labels – List of labels.
- ome_zarr.data.coins() tuple[list, list][source]
Sample data from skimage.
- Returns:
pyramids – List of pyramid arrays.
labels – List of labels.
- ome_zarr.data.create_zarr(zarr_directory: str, method: ~collections.abc.Callable[[...], tuple[list, list]] = <function coins>, label_name: str = 'coins', fmt: ~ome_zarr.format.Format = FormatV05, chunks: tuple | list | None = None) Group[source]
Generate a synthetic image pyramid with labels.
- ome_zarr.data.make_circle(h: int, w: int, value: int, target: ndarray) None[source]
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.]]