 |
EMS
Expectation-Maximization Segmentation
Fully automated model-based segmentation of MR images of
the brain
Developed by Koen Van Leemput at Medical Imaging Computing, Leuven, Belgium
|
Processing an example data set (normal brain)
This section guides you through the processing of an example
multi-spectral MR data set that consist of simulated images of a
normal brain. To get the images, go to the BrainWeb web site
(McConnell Brain Imaging Centre, Montréal Neurological
Institute, McGill University). Choose the Normal
Brain Database and download the T1-, T2-, and PD-weighted images,
each time with 3mm slice thickness, 3% noise, and 40% intensity
non-uniformity in the file format "raw short (12 bit)". Save or rename
the T1-, T2-, and PD-weighted image as 'T1.img',
'T2.img', and 'PD.img', respectively (after
uncompressing!). Also remember the MINC volume info, in particular the
image dimensions and voxel sizes.
The extension '.img' makes the images recognizable for
SPM. However, SPM also needs a separate header file with extension
'.hdr' that contains information about the images
dimensions etc. To create the header files, press the button
'HDR edit' in the SPM menu window, and select 'set
Image Dimensions - pixels in x, y & z'. Provide the image
dimensions that you (hopefully) remember from the download part. At
the time of writing, this was 181 x 217 x 60, so assuming that this
has not changed in the meanwhile, you should enter '181 217
60'. Next, select 'set Voxel Dimensions - mm in x, y &
z' and fill in '1 1 3'. In the field set
Data Type', select 'datatype - int16' (or
'byte swapped - int16' in the case you are using
e.g. Linux). Now, choose 'APPLY to images', and select
the files 'T1.img', 'T2.img', and
'PD.img'. This creates the files 'T1.hdr',
'T2.hdr', and 'PD.hdr'. Finally, select
'QUIT'.
Now press the button 'Check Reg' and select all three
images. You should see something similar to the figure on the
left. Try moving the cross-hairs by clicking on one of the views. If
you do not see anything, make sure that you entered all the fields in
the header file correctly.
|
Since the images are simulated, the three modalities are perfectly
well co-registered. However, it is unlikely that this will be the case
in real circumstances, where the patient might have moved in between
the acquisition of the images. This section explains how to
co-register the different modalities in such cases, and gives at the
same time an understanding of how affine spatial transformations are
handled in SPM.
Suppose that the PD- and T2-weighted images are acquired
simultaneously but at a different time than the T1-weighted image.
The spatial displacement between the PD/T2-pair and the T1-image,
resulting from a different patient positioning at the two scanning
sessions, can easily be simulated in SPM as follows. Click on the
button 'Display' in the SPM menu window, and select the
PD-weighted image. In the field 'pitch {rad}', fill in
for instance '20/180*pi' and press ENTER. Subsequently,
fill in '20' in the field 'right {mm}' and
press again ENTER. This will cause the image to rotate 20 degrees and
to shift 20 mm to the right. Press 'Reorient images...'
and select both the T2- and the PD-weighted image. If you look at the
files in the directory where the images are located, you will see that
there now also exists a file 'T2.mat' and a file
'PD.mat'. These '.mat'-files contain a 4x4
affine transformation matrix that maps a specific voxel location (in
voxel numbers) into a world location (in mm). Now press the button
'Check Reg' and select all three images. You should see
something similar to the figure on the left: the PD- and T2-weighted
images are now moved with respect to the T1-weighted image.
To co-register the images, press the 'Register'
button in the EMS menu window (not in the SPM menu
window!). Enter '1' for 'number of
subjects', 'no' for 'Normalize to
atlas?', select 'T2.img' or 'PD.img'
for target image, 'T1.img' for object image, and nothing
for "other" images. Since the images are all acquired from the same
individual, we are looking for a rigid-body transformation, so select
'6 params (Rigid Body)' for the number of affine
parameters. This will start the coregistration of the T1-weighted with
the T2- or PD-weighted image based on maximization of mutual
information.
When the registration is finished, a file 'T1.mat' is
created that contains the updated affine mapping from voxel location
in the T1-weighted image into world location. Use the button
'Check Reg' to check that all images are again in spatial
correspondence with each other.
|
 |
 |
The last step before the images can be segmented, is the
co-registration with the SPM-atlas. To see the current position of the
images with respect to the atlas, press the button 'Check
atlas' in the EMS menu window, and select all images. Something
similar should show up as the figure to the left. The image in the top
left corner is the T1-weighted atlas template provided in
SPM. Clearly, our data set is not coregistered with the atlas yet.
Press the 'Register' button (in the EMS menu window!)
again, select '1' for 'number of subjects',
'yes' for 'Normalize to atlas?', any of the
images as object image, and the two remaining images for "other". The
image selected as "object image" is now coregistered to the atlas,
modifying its '.mat'-file and using the same
transformation matrix to modify the '.mat'-files of the
other images so that all MR modalities stay co-registered with each
other. Pressing the button 'Check atlas' again should
display the result on the right, showing that the data have been
correctly coregistered with the atlas.
Segmentation
Finally, press the 'Segment' button in the EMS menu
window (not in the SPM menu window!), select '1'
for 'number of subjects', all three images (order is not
important), '4' for the order of the bias field
polynomial model, '3D' for the type of polynomial, and
'no' for 'Use Markov random field?'. Now our
multi-spectral data set is automatically segmented; the results are
written in files with suffix '_seg' and
'_bias' for the tissue class probability images and the
estimated bias fields, respectively. Using the 'Check
Reg' option of SPM, and selecting the first three class
probability maps and the three bias field images will result in the
figure shown on the left. You can also calculate the bias corrected
images by pressing 'Correct' in the EMS menu window and
selecting the original image files. The bias corrected images are
written to file with suffix '_corr'.
|
Koen Van Leemput
<koen@nmr.mgh.harvard.edu>
Last modified: Tue Sep 4 14:47:10 EEST 2001
|