segment function

Segmentation of 3D images using EM algorithms