Zarr Image Stack
ImageStack implementation for Zarr-backed images.
ZarrImageStack
ImageStack backed by a zarr array.
Parameters:
-
group(Group) –Zarr group containing the array.
-
data_path(str) –Path to the array within the group.
-
axes(str) –Axis order (e.g. STCZYX).
data_dtype
property
Data type of the array.
Returns:
-
DTypeLike–Type of the data.
original_axes
property
original_data_shape
property
Original shape of the data.
Returns:
-
tuple of int–Shape in original axis order.
shards
property
source
property
Source URI of the zarr array.
Local zarr URIs starts with the file:// descriptor, and include the path to
the zarr file and internal path to the specific array. Source URIs are used
during prediction to disk to build destination paths.
Returns:
-
str–Source URI.
__init__(group, data_path, axes)
extract_patch(sample_idx, channels, coords, patch_size)
Extract a patch for a given sample and channels within the image stack.
Parameters:
-
sample_idx(int) –Sample index.
-
channels(sequence of int or None) –Channel indices to extract. If
None, all channels will be extracted. -
coords(sequence of int) –Spatial coordinates of the top-left corner of the patch.
-
patch_size(sequence of int) –Size of the patch in each spatial dimension.
Returns:
-
ndarray–A patch of the image data from a particular sample with dimensions C(Z)YX.