Sequential Patching
Sequential (grid) patching strategy; prototype, not guaranteed complete.
SequentialPatching
Grid patching strategy with optional overlap; prototype.
Parameters:
-
data_shapes(sequence of (sequence of int)) –Shapes of the underlying data (axes SC(Z)YX).
-
patch_size(sequence of int) –Patch size per spatial dimension.
-
overlaps(sequence of int or None, default:None) –Overlap per axis; if None, no overlap.
n_patches
property
__init__(data_shapes, patch_size, overlaps=None)
Initialize sequential patching with optional overlap per axis.
Parameters:
-
data_shapes(sequence of (sequence of int)) –Shapes of the underlying data (axes SC(Z)YX).
-
patch_size(sequence of int) –Patch size per spatial dimension.
-
overlaps(sequence of int or None, default:None) –Overlap per axis; if None, no overlap.
get_patch_indices(data_idx)
Get the patch indices will return patches for a specific image_stack.
The image_stack corresponds to the given data_idx.
Parameters:
-
data_idx(int) –An index that corresponds to a given
image_stack.
Returns:
-
sequence of int–A sequence of patch indices, that when used to index the
CAREamicsDataset will return a patch that comes from theimage_stackcorresponding to the givendata_idx`.
get_patch_spec(index)
Return the patch spec for the given index.
Parameters:
-
index(int) –Patch index.
Returns:
-
PatchSpecs–Patch spec for that index.