clearex.segmentation.regions
Functions
|
Expand a regionprops slice tuple (z, y, x) by buffer voxels, clamped to image bounds. |
- clearex.segmentation.regions.get_bounding_box(image_shape, roi_slice, buffer=0)
Expand a regionprops slice tuple (z, y, x) by buffer voxels, clamped to image bounds.
- Parameters:
image_shape (tuple of int) – Shape of the image (z, y, x).
roi_slice (tuple of slice) – Original regionprops slice (z, y, x).
buffer (int) – Number of voxels to expand the slice in each direction.
- Returns:
(sz, sy, sx) expanded and clamped slices.
- Return type:
tuple of slice