Automatic Brain Tissue Extraction Method Using Erosion–Dilation

Journal of Computer Assisted Tomography
26(6):927–932
© 2002 Lippincott Williams & Wilkins, Inc., Philadelphia
Automatic Brain Tissue Extraction Method Using
Erosion–Dilation Treatment (BREED) From Three-Dimensional
Magnetic Resonance Imaging T1-Weighted Data
Naoki Miura, Akito Taneda, Kazuhito Shida, Ryuta Kawashima, Yoshiyuki Kawazoe,
Hiroshi Fukuda, and Toshio Shimizu
Abstract: To improve the efficiency of brain image analysis, we propose a fullautomatic method for extracting brain tissue from three-dimensional magnetic resonance imaging of T1-weighted data on the human head (brain tissue extraction method
using erosion-dilation treatment [BREED]). The extraction processing is realized by
combining signal intensity thresholding by means of the discriminant analysis method
and an erosion-dilation treatment of the image. The accuracy of BREED is evaluated
using both simulated and subject data. BREED can extract brain tissues with high
accuracy (approximately 97%) for either simulated or subject data. Index Terms:
MRI—Segmentation—Brain tissue extraction—Discriminant analysis method—
Erosion-dilation treatment.
Segmentation of the brain images obtained by magnetic resonance imaging (MRI) is important because it is
needed as a pretreatment for brain image analysis such as
quantitative analysis of brain and cerebrospinal fluid
(CSF) structures (1), gyral volumes and variances (2),
and intersubject variability of ethnical and gender differences (3). So far, the segmentation of brain images has
usually been a manual operation performed by welltrained experts. Obviously, however, this approach has
several problems to overcome when we analyze many
brain images, including 1) the need for well-trained experts, 2) the processing time for one brain image (in the
case of our laboratory, typically 8 hours for one brain
image by one expert), and 3) human error and operator
dependency of the results (i.e., obtained results differ in
accordance with who performed the operation). To overcome these difficulties, computational tools (4–7) and
full-automatic segmentation techniques have been proposed (8–16). Full-automatic segmentation methods
have been developed on the basis of various ideas: a
priori knowledge [e.g., anatomic brain atlas (8–11) and
signal intensity properties (12)], image processing approaches such as surface detection techniques (e.g.,
snakes) (9,13,14), automatic foreground thresholding
(15), and morphologic operations with a region-growing
method, morphology-based brain segmentation
(MBRASE) (16).
In the present article, we propose a fast full-automatic
method for extracting brain tissue from threedimensional MRI T1-weighted (3D-MRI-T1) data on the
human head that uses discriminant analysis to determine
the threshold of signal intensity and erosion-dilation
treatment of the brain image to remove nonbrain parts.
We call this method BREED (brain tissue extraction
method using erosion-dilation treatment).
MATERIALS AND METHODS
In the 3D-MRI-T1 data, CSF has lower signal intensity than white matter and gray matter; hence, CSF and
brain tissue can easily be separated on the basis of signal
intensity difference. The brain tissue is connected with
its surrounding tissues through cranial nerves, blood vessels, and signal noise. Because the signal intensity difference between the brain tissue and these connecting
parts is not significant, another technique is needed to
separate them. Conversely, these connecting parts are
thin or small tissues (typically, the largest connecting
From the Department of Electronic and Information System Engineering, Faculty of Science and Technology, Hirosaki University, Hirosaki (N. Miura, A. Taneda, and T. Shimizu), and Center for Interdisciplinary Research (K. Shida), New Industry Creation Hatchery
Center (R. Kawashima), Institute for Materials Research (Y. Kawazoe),
and Institute of Development, Aging, and Cancer (H. Fukuda), Tohoku
University, Sendai, Japan. Address correspondence and reprint requests
to Dr. T. Shimizu, Department of Electronic and Information System
Engineering, Faculty of Science and Technology, Hirosaki University,
3, Bunkyo-cho, Hirosaki, Aomori, 036–8561, Japan. E-mail:
[email protected]
927
928
N. MIURA ET AL.
part, the optic nerve, has a diameter of 3 mm). Therefore,
to remove the connecting parts from the brain tissue, we
use erosion-dilation treatment because it is useful to delete thin or small parts from the original image.
Brain Tissue Extraction Procedure
BREED comprises the following five steps:
(i) Threshold determination and binarization: to separate
brain tissue and CSF, the threshold of signal intensity
is determined using the discriminant analysis method.
The details of this calculation are described below.
After determining the threshold, “0” and “1” are assigned to the voxels in accordance with whether the
voxel has lower or higher signal intensity than the
threshold, respectively. “1” corresponds to the brain
tissue voxels.
(ii) Erosion: the resultant image is eroded to delete thin
or small connecting parts from the image. After this
treatment, the image is divided into the brain tissue
and nonbrain tissue if the number of erosions is appropriate.
(iii) The largest-region-selection: a value of “0” is assigned to the voxels not belonging to the largest region
in the image (because the largest region corresponds to
the brain tissue).
(iv) Dilation: the binary image obtained at step (iii) is
dilated to recover the eroded brain tissue. The details
of the erosion-dilation treatment (steps ii–iv) are explained below.
(v) Recovering the original signal intensity: to the voxels
with a value of “1” in the resultant binary image, the
corresponding signal intensity values of the original
3D-MRI-T1 data are assigned. After this treatment, we
can obtain extracted 3D-MRI-T1 brain data.
Threshold Determination by the Discriminant
Analysis Method
A typical signal intensity histogram of the 3D-MRI-T1
data has two peaks: the peak at lower signal intensity
comes from CSF, skull, and background noise, and the
peak at higher signal intensity corresponds to white matter, gray matter, skin, and fat. By setting the threshold
between these two peaks, we can approximately divide
the 3D-MRI-T1 data into two parts, that is, higher (including white matter and gray matter) and lower (including CSF) signal regions. To determine the threshold, we
adopt the discriminant analysis method. The discriminant
analysis method determines the optimum threshold for
dividing the histogram into a given number of classes.
The discriminant function D for division into two classes
(class 1 and class 2) is given by:
D=
␴2b
2
␴w
␻1共M1 − MT兲 + ␻2共M2 − MT兲
2
=
␻1␴21 + ␻2␴22
J Comput Assist Tomogr, Vol. 26, No. 6, 2002
2
.
(1)
where ␴b and ␴w correspond to the variance of interclass
and intraclass, respectively, and ␻1, ␻2, ␴1, ␴2, M1, M2,
and MT are the number of voxels for class 1 and 2, the
variance of class 1 and 2, the average signal intensity of
class 1 and 2, and the average signal intensity for all
voxels involved in the 3D-MRI-T1 data, respectively.
By maximizing D with respect to the threshold between class 1 and 2, we can obtain the optimal threshold
we need.
Erosion-Dilation Treatment
As depicted in Figure 1B, the binary image obtained
by the threshold still keeps the thin or small parts connected between the brain tissue and outer tissues. These
connecting parts can be removed by erosion treatment
(17). If we define f(x, y, z) as the input value for the voxel
at position x, y, z and g(x, y, z) as containing an output
value for the voxel at position x, y, z, the algorithm of the
erosion treatment we used is written as follows:
• (a) Initial values for x, y, z are set.
• (b) If at least one of f(x, y, z), f(x ± 1, y, z), f(x, y ± 1,
z), or f(x, y, z ± 1) has “0”, “0” is set to g(x, y, z).
• (c) When the condition of step (b) is not satisfied, “1”
is set to g(x, y, z).
• (d) Values for x, y, and z are updated, and we return to
step (b). If all voxels have been checked, the loop is
finished.
It is noted that steps (a) through (d) correspond to one
erosion treatment. As can be seen from Figure 1D, in the
eroded image, the brain tissue is not connected with other
tissues, and it is obvious that the brain tissue region is the
largest region. By deleting the region with a small number of voxels in the image, the eroded brain tissue can be
extracted.
The erosion treatment is effective for deleting connecting parts; however, the erosion treatment also erodes
the surface of brain tissue at the same time. To recover
the brain tissue voxels lost during the erosion treatment,
it is necessary to perform a dilation treatment. If we
define g(x, y, z) as an input value for the voxel at position
x, y, z, and h(x, y, z) as containing an output value for the
voxel at position x, y, z, the dilation treatment is written
as follows:
• (a’) Initial values for x, y, and z are set.
• (b’) If at least one of g(x, y, z), g(x ± 1, y, z), g(x, y ±
1, z), or g(x, y, z ± 1)’s has “1”, “1” is set to h(x, y, z).
• (c’) When the condition of step (b’) is not satisfied,
“0” is set to h(x, y, z).
• (d’) Values for x, y, and z are updated, and we return
to step (b’). If all voxels have been checked, the loop
is finished.
In the dilation treatment, the original binary image
(corresponds to Fig. 1B) is used as a mask pattern to avoid
“overdilation.” This masking is done by inhibiting the
voxels with “0” in the mask pattern from being
BRAIN TISSUE EXTRACTION METHOD FROM MRI DATA
(a) input image
(b) binary image
(e) largest region
(f) dilated once
(c) eroded once
929
(d) eroded twice
(g) dilated twice
(h) resultant image
FIG. 1. A through H: An example of the brain tissue extraction method using erosion-dilation treatment (2-erosion, 2-dilation).
assigned “1” during the dilation. By adopting this masking, our program guarantees that a meaningless dilation
is not performed.
If the thickness of optic nerve is taken into consideration, the binary image must be eroded inward by 1.5
mm. Therefore, when the case of the voxel size of the
input image is 1 × 1 × 1 mm, it is reasonable to suppose
that the optimum erosion frequency is twice that value.
An example of the brain tissue extraction process is
shown in Figure 1A through H. This is a case in which
both the erosion treatment and the dilation treatment
were performed twice. From Figure 1H, it can be seen
that only the brain tissue is successfully left in the resultant image.
Although SBD gives us useful simulated images, SBD
cannot simulate the influence of individual difference in
brain shape. To study the influence of individual difference, we used three normal subjects’ brain data obtained
from Telecommunication Advancement Organization of
Japan, Aoba Brain Imaging Center. The subjects’ ages
were 33 years old (Subject I), 44 years old (Subject II),
and 70 years old (Subject III). The number of voxels and
the voxel size for these data are 256 × 256 × 124 voxels
and 1 × 1 × 1.5 mm, respectively. For these subject data,
well-trained experts have manually extracted the brain
tissue to obtain reference images.
Validation
Assessment of the Accuracy of Extracted Brain Tissue
Simulated Data
Extraction accuracy can be evaluated by comparing
the resultant image and reference image, where the reference image is defined as the correctly extracted brain
image. In SBD, the brain tissue is determined exactly. In
the case of the subject data, the brain data manually
segmented by specialists are used as the reference image.
As four quantities to assess the accuracy of BREED,
we introduce true-positive (TP), false-positive (FP),
false-negative (FN), and true-negative (TN) quantities.
True-positive (TP) is the number of correctly extracted
brain tissue voxels that overlap the corresponding brain
tissue voxels of the reference image when the resultant
and reference images are superposed. False-positive (FP)
is the number of voxels incorrectly extracted as “brain
tissue” that overlap the nonbrain tissue in the reference
image. False-negative (FN) is the number of brain tissue
We used a simulated brain database (SBD) currently
published by the McConnell Brain Imaging Center at the
Montreal Neurologic Institute (18–21) to evaluate
BREED. The SBD is a database of the 3D digital phantom generated by an MRI simulator in which various
imaging parameters such as slice thickness, noise, and
intensity nonuniformity (INU) can be changed. We used
the digital phantoms with a slice thickness of 1 mm
and with all combinations of the noise levels (0%, 1%,
3%, 5%, 7%, and 9%) and INU levels (0%, 20%, and
40%). In total, 18 combinations are used for noise and
INU levels. The number of voxels in these data is 181 ×
217 × 181 voxels, and the voxel size of these data is 1 ×
1 × 1 mm.
Subject Brain Data
J Comput Assist Tomogr, Vol. 26, No. 6, 2002
930
N. MIURA ET AL.
voxels incorrectly deleted in the resultant image. Truenegative (TN) is the number of nonbrain tissue voxels
deleted by this method in the resultant image.
By using TP, FP, FN, and TN, sensitivity (SE), positive predictive value (PPV), and extraction accuracy
(EA) can be defined. Sensitivity (SE) is the ratio of the
correctly extracted brain tissue of the resultant image
(TP) to the brain tissue of the reference image (TP + FN):
SE =
TP
.
TP + FN
(2)
Positive predictive value (PPV) is the ratio of the correctly extracted brain tissue of the resultant image (TP)
to the brain tissue of the resultant image (TP + FP):
.
PPV =
TP
.
TP + FP
(3)
Extraction accuracy (EA) is the geometric mean of SE
and PPV:
EA = 公TP ⳯ PPV.
(4)
In the next section, we assess BREED through these
parameters and show the performance of BREED.
A
1-erosion and 1-dilation
B
RESULTS
After the binarization of the images, more than 99% of
the brain tissue remains in most of the binary images.
Even in the image in the worst condition (noise level ⳱
9%, INU level ⳱ 40%), 97.1% of the brain tissue remains. Therefore, brain tissue voxels are deleted only a
little by the binarization of the images.
In the case of 1-erosion and 1-dilation, 2-erosion and
2-dilation, and 3-erosion and 3-dilation, the average EAs
for the simulated data are 80.1%, 97.4%, and 96.8%,
respectively. Because 2-erosion and 2-dilation give the
highest EAs, we adopt these values as the optimum numbers of erosion-dilation treatment. The resultant image
with typical imaging parameters (noise level ⳱ 3%, INU
level ⳱ 20%) is shown in Figure 2. Also, in the case of
subject data, the highest accuracy is obtained by 2-erosion and 2-dilation (about 96.9%).
To evaluate the processing speed, the processing time
is measured. We use a standard personal computer with
an AMD Athron 700-MHz central processing unit (Advanced Micro Devices, Sunnyvale, CA, U.S.A.) and 512
Mbytes of main memory, where it is working under the
FreeBSD operating system (FreeBSD Project, available
at http://www.freebsd.org). BREED was implemented
using C language. The average processing time for one
2-erosion and 2-dilation
C
3-erosion and 3-dilation
FIG. 2. Resultant images of the brain tissue extraction method using erosion-dilation treatment in 1-erosion and 1-dilation (A), 2-erosion
and 2-dilation (B), and 3-erosion and 3-dilation (C) for simulated data (noise level = 3%, intensity nonuniformity level = 20%). The top row
shows representative slices of the input image. The images in the middle row are resultant images. The bottom row shows a comparison
between resultant and reference images, where true-positive, false-positive, and false-negative values are shown by dark gray, light gray,
and white regions, respectively.
J Comput Assist Tomogr, Vol. 26, No. 6, 2002
BRAIN TISSUE EXTRACTION METHOD FROM MRI DATA
brain image in the case of 2-erosion and 2-dilation is
8.6 seconds for simulated data and 14.2 seconds for subject data.
DISCUSSION
Evaluation of the Threshold Decided by the
Discriminant Analysis Method
Brain tissue voxels are deleted only a little by the
binarization of the images. Conversely, about 10% of the
CSF voxels remained in the binary images. The signal
intensity of the remaining CSF voxels is higher than the
obtained threshold, because signal intensity distributions
of gray matter and CSF usually overlap to some extent as
a result of the partial volume effect. For accurate extraction of the brain tissue, it is desirable that the brain tissue
not be deleted in the binarization of the image, even if the
other tissues remain to some extent. From this point of
view, the obtained threshold is appropriate.
Effect of the Erosion Frequency on the
Extraction Accuracy
In the case of 1-erosion and 1-dilation, the EAs have a
low value (approximately 80%). This indicates that the
ratio of the brain tissue is small. From Figure 2A, we can
see that many other tissues remain. In the case of 1-erosion, any part of the image is eroded inward by 1 mm
(because the voxel size of simulated data is 1 × 1 × 1
mm). Hence, regions with a width of 2 mm or less are
deleted. The thickest of the connecting parts is the optic
nerve, whose thickness is about 3 mm. Therefore, 1-erosion treatment cannot delete optic nerves. In the case of
2-erosion and 2-dilation and 3-erosion and 3-dilation, the
EAs have high values. From Figure 2B and C, we can see
that the brain tissue is correctly extracted.
The EA for Subject III is slightly lower than those of
the other two subjects. One of the possible reasons is the
effect of aging, because Subject III is aged and his brain
was atrophied. Additionally, imaging artifact and individual difference could cause a similar effect. Fortunately, the influence of such effects on EA is small;
hence, we can say that BREED can give sufficiently high
performance to aged data.
Although it is confirmed that BREED can extract
brain tissue with high accuracy, some limitations exist.
The upper part of the cerebellum and the fornix are good
examples. These are thin tissues on the surface of the
brain tissue, and many parts of these regions are completely deleted by the erosion treatment. As a result, they
could not recover by means of the dilation treatment.
Blood vessels on the brain surface such as the superior
sagittal vessel are another example. These can adhere to
the brain surface, and their signal intensities are similar
to that of the brain tissue. Therefore, it is difficult to
delete these regions by BREED.
931
Processing Speed
The average processing time for one brain image is 8.6
seconds for simulated data and 14.2 seconds for subject
data. Although direct comparison of various computational methods is not easy because the evaluation environment of each method is different and the porting of
these methods to the same environment is difficult, the
processing speed of BREED is faster than that of other
methods [e.g., MBRASE requires 30 minutes of central
processing unit time on a processor of an SGI Power
Challenge R10K (Silicon Graphics, Mountain View, CA,
U.S.A.) (16)]. It is a great advantage of BREED that the
brain tissue can be extracted correctly within quite a
short time; this feature should be especially useful when
a number of brain images are processed at once.
CONCLUSION
In the current study, we propose BREED for automatically extracting brain tissue from 3D-MRI-T1 data. The
BREED method can accurately extract the brain tissue
for both simulated and subject brain data. The most significant feature of BREED is its fast processing speed. It
is concluded that BREED is reliable and more efficient
than other methods in terms of processing speed.
Furthermore, we are applying the concept of BREED
to develop a practical segmentation method, and our
study is currently in progress.
Acknowledgments: The authors thank our “expert segmenters” Dr. K. Inoue and Mr. R. Suzuki. We also acknowledge Mr.
K. Sato and Mr. Y. Kudo for their technical support and discussions about this research. A portion of this research was
supported by a grant from Telecommunication Advancement
Organization of Japan.
REFERENCES
1. Kikinis R, Shenton ME, Gerig G, et al. Routine quantitative analysis of brain and cerebrospinal fluid spaces with MR imaging. J
Magn Reson Imaging 1992;2:619–29.
2. Kennedy DN, Lange N, Markris N, et al. Gyri of the human neocortex: an MRI-based analysis of volume and variance. Cereb
Cortex 1998;8:372–84.
3. Zilles K, Kawashima R, Dabringhaus A, et al. Hemispheric shape
of European and Japanese brains: three-dimensional MRI analysis
of intersubject variability, ethnical, and gender differences. Neuroimage 2001;13:262–71.
4. Hohne KH, Hanson WA. Interactive 3D segmentation of MRI and
CT volumes using morphologic operations. J Comput Assist Tomogr 1992;16:285–94.
5. Olabarriaga SD, Smeulders AWM. Interaction in the segmentation
of medical images: a survey. Med Imaging Anal 2001;5:127–42.
6. Worth AJ, Makris N, Meyer JM, et al. Semiautomatic segmentation of brain exterior in magnetic resonance images driven by
empirical procedures and anatomic knowledge. Med Imaging Anal
1998;2:315–24.
7. Robb RA, Hanson DP. The ANALYZE software system for visualization and analysis in surgery stimulation. In: Taylor RH, Lavallee S, Burdea GC, et al., eds. Computer-integrated surgery.
Cambridge: MIT Press, 1996:175–89.
J Comput Assist Tomogr, Vol. 26, No. 6, 2002
932
N. MIURA ET AL.
8. Collins DL, Holmes CJ, Peters TM, et al. Automatic threedimensional model-based neuroanatomic segmentation. Hum
Brain Map 1995;3:190–208.
9. Atkins MS, Mackiewich BT. Fully automatic segmentation of the
brain in MRI. IEEE Trans Med Imaging 1998;17:98–107.
10. Leemput KV, Maes F, Vandermeulen D, et al. Automated modelbased tissue classification of MR images of the brain. IEEE Trans
Med Imaging 1999;18:897–908.
11. Dwant BM, Hartmann SL, Thirion J-P, et al. Automatic threedimensional segmentation of internal structures of the head in MR
images using a combination of similarity and free-form transformations: part I, methodology and validation on normal subjects.
IEEE Trans Med Imaging 1999;18:909–16.
12. Wells WM III, Grimson WEL, Kikinis R, et al. Adoptive segmentation of MRI data. IEEE Trans Med Imaging 1996;15:429–42.
13. MacDonald D, Kabani N, Avis D, et al. Automated threedimensional extraction of inner and outer surfaces of cerebral cortex from MRI. Neuroimage 2000;12:340–56.
14. Kapur T, Grimson WEL, Wells WM III, et al. Segmentation of
brain tissue from magnetic resonance images. Med Imaging Anal
1996;1:109–27.
15. Lemieux L, Hagemann G, Krakow K, et al. Fast, accurate, and
J Comput Assist Tomogr, Vol. 26, No. 6, 2002
16.
17.
18.
19.
20.
21.
reproducible automatic segmentation of the brain in T1-weighted
volume MRI data. Magn Reson Med 1999;42:127–35.
Stokking R, Vincken KL, Viergever MA. Automatic morphologybased brain segmentation (MBRASE) from MRI-T1 data. Neuroimage 2000;12:726–38.
Haralick RM, Sternberg SR, Zhuang X. Image analysis using
mathematical morphology. IEEE Trans Pat Anal Mech Intell 1987;
4:532–50.
Cocasco CA, Kollokian V, Kwan RK-S, et al. BrainWeb: online
interface to a 3D MRI simulated brain database. From: Proceedings of 3rd International Conference on Functional Mapping of the
Human Brain, Copenhagen, Denmark, May 1997. Neuroimage
1997;5:S425.
Collins DL, Zijdenbos AP Kollokian V, et al. Design and construction of a realistic digital brain phantom. IEEE Trans Med
Imaging 1998;17:463–8.
Kwan RK-S, Evans AC, Pike GB. An extensible MRI simulator for
post-processing evaluation. Visualization in biomedical computing. Lecture notes in computer science. Berlin, Germany: SpringerVerlag, 1996;135–40.
Kwan RK-S, Evans AC, Pike GB. MRI simulation-based evaluation of image-processing and classification methods. IEEE Trans
Med Imaging 1999;18:1085–97.