Replace each voxel with the size of the region to which it belongs
im (ND-array) – 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
Click here to view online example.