This naive function:
- Computes the PDF and CDF of a 2-D or 3-D images with
nbinsin the histogram. - Fit
npeaksnumber of peaks to the PDF - Compute the probability of each voxel belonging to each phase.
- Decide on the phase based on the greatest probability.