phase_fraction#
- phase_fraction(im, normed=True)[source]#
Calculate the fraction of each phase in an image
- Parameters:
im (ndarray) – An ndarray containing integer values
normed (boolean) – If
True
(default) the returned values are normalized by the total number of voxels in image, otherwise the voxel count of each phase is returned.
- Returns:
result – A array of length max(im) with each element containing the number of voxels found with the corresponding label.
- Return type:
1D-array
See also
Examples
Click here to view online example.