Sample EM Algorithm for Brain Segmentation from http://nmr.mgh.harvard.edu/~koen/PVEM.html