Back to Koen Van Leemput's homepage.

What's this all about?

The Java Applet below implements parts of my Expectation-Maximization (EM) based Partial Volume (PV) segmentation method described in the paper:

Applet instructions

Choose the MR image to work on from the drop-down menu, press the Start button, and watch how an EM optimizer tries to assess the Maximum Likelihood (ML) parameter estimates of a PV model. The blue intensity distributions in the histogram plot are Gaussian distributions corresponding to pure tissue types; the red distributions correspond to PV distributions and are the sum of a number of (green) Gaussian distributions whose parameters are a linear combination of the parameters of the pure tissue distributions. The broken line represents the overall histogram model.

You can also manually feed various parameter values into the text fields (don't touch the "Downsampling factor" field unless you know what it means - see below); the negative log-likelihood displayed in the histogram plot allows you to evaluate your performance as a human PV model parameter estimator :-)





How does it work?

The EM algorithm provides a very intuitive way to fit a Gaussian mixture model to given data, and is widely used to classify brain MRI into white matter (WM), gray matter (GM), and CSF. However, in brain MRI, many voxels contain several tissue types at the same time - so-called PV voxels. Assuming that partial voluming is a linear effect and modeling, as usual, the intensity distributions of WM, GM, and CSF as Gaussian, the intensity distribution of voxels containing a particular mixing combination of various tissue types can be shown to be Gaussian again, with as mean and variance a linear combination of the means and variances of their "pure" constituent classes.

Unfortunately, assessing the ML parameters of such an "extended" mixture model can no longer be conveniently done with the usual EM optimizer. The problem is that, even if we classify the image content into various pure and PV classes (as per usual in the Expectation step), the various model parameters are no longer un-coupled in the Maximization step (as is the case in the conventional Gaussian mixture model without PV effect) and, therefore, their updates are no longer given by closed-form expressions. One way around this tricky issue is, of course, to discard the voxels classified as PV altogether in each iteration, and update the model parameters based on the voxels classified as "pure" tissue alone. We could also "forget" that the parameters of the PV intensity models are linear combinations of the pure tissue intensity parameters, and use additional, independent parameterizations, over even independent models, instead. However, a more principled approach is possible, and that is the approach described in the paper.

The trick is that, just as EM de-couples the sum over the mixture components in the conventional mixture model setting, EM can also be used to de-couple the sum over tissue contributions in each PV voxel. Conceptually, each voxel can be thought of as consisting of several sub-voxels, each belonging exclusively to a "pure" tissue class. We don't see the intensities of these sub-voxels directly; rather, we only observe the sum of their intensities, resulting in partial voluming if not all sub-voxels belong to the same tissue class. EM can "fill in" these unobserved intensities, and once "filled in", the Maximization step is again given by closed-form expressions.

The number of sub-voxels per voxel is a design choice. In the applet, their number is the square of the value of the "Downsampling factor" field, corresponding to a downsampling process along each axis in a 2-D image. Setting this value to 2 results in 2^2+1=5 possible mixing fraction combinations between two tissue types (2 pure tissue types and 3 PV combinations). A higher value results in a higher number of PV fraction combinations; a value of 1 doesn't introduce any partial voluming into the model at all and the resulting EM algorithm devolves to the standard EM algorithm (try it!).

But some of the segmentation results don't make any sense!

I agree. Allowing partial voluming, which really introduces just a few extra parameters into the model, seems to have a disastrous effect on the usefulness of purely histogram-based parameter estimation schemes. The problem is that no spatial information is encoded in the model. Also, even if this was not a problem by itself, the assumption that all mixing fractions are equally alike definitely does NOT hold. Fortunately, the EM scheme can be used with more sophisticated spatial models as well, although constructing appropriate spatial models is an area for future research; see the paper for more details.

Can I have the source code of the applet?

Sure, here it is: PVEM.java and XYPlot.java. Compilation goes like this:

javac -source 1.2 -target 1.2 PVEM.java
javac -source 1.2 -target 1.2 XYPlot.java
jar cvf PVEM.jar PVEM.java XYPlot.java