get_sample_indices#
- get_sample_indices(grid: str, bounds: tuple[int, int, int], resolution: float, scale_xy: float, scale_z: float) list [source]#
Get sample indices with given bounds for selected grid type.
- Parameters:
grid ({'rect', 'hex'}) – Type of grid.
bounds – Sampling bounds in the x, y, and z directions.
resolution – Distance between samples (um).
scale_xy – Resolution scaling in x/y (um/pixel).
scale_z – Resolution scaling in z (um/pixel).
- Returns:
List of sample indices.
- get_rect_sample_indices(bounds: tuple[int, int, int], resolution: float, scale_xy: float, scale_z: float) list [source]#
Get list of (x, y, z) sample indices for rect grid.
- Parameters:
bounds – Sampling bounds in the x, y, and z directions.
resolution – Distance between samples (um).
scale_xy – Resolution scaling in x/y.
scale_z – Resolution scaling in z.
- Returns:
List of sample indices.
- get_hex_sample_indices(bounds: tuple[int, int, int], resolution: float, scale_xy: float, scale_z: float) list [source]#
Get list of (x, y, z) sample indices for hex grid.
Sample indices are offset in sets of three z slices to form a face-centered cubic (FCC) packing.
- Parameters:
bounds – Sampling bounds in the x, y, and z directions.
resolution – Distance between samples (um).
scale_xy – Resolution scaling in x/y.
scale_z – Resolution scaling in z.
- Returns:
List of sample indices.