Whole Sample Patching
Whole-sample patching.
WholeSamplePatching
Patching strategy that returns one patch per sample (whole image).
Parameters:
-
data_shapes(sequence of (sequence of int)) –Shapes of the underlying data (axes SC(Z)YX).
n_patches
property
__init__(data_shapes)
Constructor.
Parameters:
-
data_shapes(sequence of (sequence of int)) –Shapes of the underlying data (axes SC(Z)YX).
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.