Replace each voxel with the size of the region to which it belongs
im (ndarray) – Either a boolean image wtih
Trueindicating the features of interest, in which case
scipy.ndimage.labelwill be applied to find regions, or a greyscale image with integer values indicating regions.
image – A copy of
imwith each voxel value indicating the size of the region to which it belongs. This is particularly useful for finding chord sizes on the image produced by
- Return type
This function provides the same result as
mode='size', although does the computation in a different way.
Click here to view online example.