Demo iadbrain

namespace:morph
page:iadbrain

Extract the lateral ventricle from an MRI image of the brain.

Description

This procedure extracts the lateral ventricle from an MRI image of the brain. This example was kindly provided by Prof. John Goutsias from The Johns Hopkins University and appears in Goutsias and S. Batman, Morphological Methods for Biomedical Image Analysis, In the Handbook of Medical Imaging: Volume 3. Progress in Medical Image Processing and Analysis, J. M. Fitzpatrick and M. Sonka (Eds.)(To Appear). SPIE Optical Engineering Press, May 2000.

Script

Reading

The MRI image of a brain slice is read.

1. a = mmreadgray('mribrain.tif');
2. mmshow(a);

Ventricle detection I

The ventricle is enhanced using an opening with a disk of radius 10 followed by a reconstruction.

1. from ia870 import iaopen
2. from ia870 import iasedisk
3. from ia870 import iainfrec
4. 
5. 
6. b = iaopen(a,iasedisk(10));
7. c = iainfrec(b,a);
8. mmshow(b);
9. mmshow(c);

Ventricle detection II

The result of the open by reconstruction is subtracted from the original image. Note that the three operations: open, reconstruction and the subtraction could be done at once using the iaopenrecth (open by reconstruction top-hat) function. On the right, the enhanced ventricle is thresholded.

1. from ia870 import iasubm
2. from ia870 import iacmp
3. 
4. 
5. d = iasubm(a,c);
6. mmshow(d);
7. e = iacmp(d,'>=',uint8(50));
8. mmshow(e);

Selecting the ventricle

Finally, the ventricle is selected as the connected object with area larger than 70 pixels. For visualization purposes, the result of the segmentation is overlayed on the original brain image.

1. from ia870 import iaareaopen
2. 
3. 
4. f= iaareaopen(e,70);
5. mmshow(f);
6. mmshow(a,f);