Computerized White Matter and Gray Matter Extraction from MRI of Brain Image


Automated segmentation of white matter (WM) and gray matter (GM) is a very important task for detecting multiple diseases. The paper proposed a simple method for WM and GM extraction form magnetic resonance imaging (MRI) of brain. The proposed methods based on binarization, wavelet decomposition, and convexhull produce very effective results in the context of visual inspection and as well as quantifiably. It tested on three different (Transvers, Sagittal, Coronal) types of MRI of brain image and the validation of experiment indicate accurate detection and segmentation of the interesting structures or particular region of MRI of brain image.

Share and Cite:

Roy, S. , Ganguly, D. , Chatterjee, K. and Bandyopadhyay, S. (2015) Computerized White Matter and Gray Matter Extraction from MRI of Brain Image. Journal of Biomedical Science and Engineering, 8, 582-589. doi: 10.4236/jbise.2015.89054.

1. Introduction

Automated detection and segmentation of brain region and brain abnormalities are very important in the context of accurate measurement and time. Segmentation of GM and WM is also very effective on several diseases. Multiple Sclerosis (MS) is one of the common diseases which can affect WM and myelin shield around the axons destroyed by inflammation. There are several diseases that may happen due to the change of white matter. Thus segmentation of WM and GM is very much important but manual segmentation of WM and GM is very time-consuming as well as fatigue. Here an automated segmentation of WM and GM has been established with low time complexity and low error rate. The semi automated segmentation has some difficulties; that’s why a fully automated process is proposed. Proposed methods are divided into two stages, pre-processing and post- processing. In pre-processing an effective binarization, artefact and skull removal are used due to artefacts and skull may hamper the automated detection, and in the post-processing actual detection of WM and GM has been proposed and all the steps of proposed methods have been described in the methodology section.

The rest of this paper is organized as follows: in Section 2, brief review of some other methods has been shortly described; in the Section 3, procedure of proposed methods has been described; in the Section 4, results and discussion section has been written; in the Section 5, results and comparison are described visually as well as parametrically; Finally we conclude our paper in Section 6.

2. Brief Review

There are different White matters (WM) and Gray matter (GM) extraction procedure had been established in the past decay but research of accurate segmentation and detection till going on, but those methodology have certain restriction also for fully automated system. Vicente Grau et al. (2003) [1] proposed a methods for accurate segmentation of GM, WM, cerebrospinal fluid (CSF) from the MRI of brain images, they proposed an improvement of watershed methods and functions are based on probability calculation, normal distributions and Markov Random Field. The results show an accurate detection of the overall volumes and a clear development in recognition of the accurate location. P. Valsasina [2] et al. (2005) examine the progression of gray matter volume loss in 117 patients with relapsing-remitting MS, scanned monthly for a 9-month period. They studied and show that gray matter damage in relapsing-remitting Multiple Sclerosis (MS) progress noticeably over a short period of examination, follow up the stability, and discover the different possibility of WM. P. Kochunov [3] et al. (2006) has considerable attention in with diffusion tensor imaging as measure of fiber integrity in aging, dementia, and other disease processes. The resulting data is understandable in which correlations are mediated by age-depen- dent atrophy and also persist in the presence of age correction of various complementary imaging techniques in the assessment of brain aging. Lucia van Eimeren (2008) [4] gives a description of white matter microstructure for the children. Individual differences in the performance in the Numerical Operation, but not the Mathematics Reasoning test correlate most strongly. Betty M et al. (2011) [5] proposed the procedure of gray matter volume, different tissue and edge connectivity of different tissue by the graph theory and the results describes with different situation. They show the results in intracortical similarities that can be used to provide a robust statistical description of individual gray matter morphology. A artefact removal methodology briefly described by S Roy et al. (2013) [6] which statistical and geometric approach. M. Masroor Ahmed [7] et al. proposed a methods to detect brain tumor, they use WM and GM extraction as a preprocessing steps, and shows all the steps for WM and GM extraction with the combines Perona and Malik anisotropic diffusion model for image enhancement and K-means clustering methodology and due to unsupervised learning it is very efficient and low error sensitive, also claim that unsupervised methods are better than that of supervised methods due to supervised methods needs some preprocessing.

3. Proposed Work

Proposed work has been divided in to two stages; preprocessing stage and post processing stage. In the preprocessing steps a methodology of artefact and skull elimination has been established to extract gray matter and white matter i.e. elimination of skull and artefact improve the white matter and gray matter detection. In the post processing extraction of white and gray matter has been build up.

In stage one first convert input MRI image into gray image if input images are not gray image. Then binarize the image using the global thresholding methods and the thresholds have been selected by the standard deviation of the image. Threshold using standard deviation gives very effective results for MRI of brain image binarization [8] . The previous binarization step (binarized result) is very important for the next part of the proposed methods. It is very easier to detect white and gray matter if artefact and skull portion are removed. Then complement the binarized image due detection between the region (set as one) skull and original brain portion of the MRI of brain. Due to the different nature of MRI of brain separation of brain and skull are not easier, because some MRI images have prominent difference between skull and brain portion, and some MRI image has very difficult nature to separate between skull and brain portion. Two dimensional wavelet decompositions is done using “db1” wavelet up to second level and then re-composition of the image is done using the approximate coefficient of wavelet decomposition. In this step the separation of skull and brain has been done, because loss of information means loss of pixel in between skull and brain portion i.e. separation between skull and brain are prominent, moreover due to reduction of size and removal of detailed information the white pixel of the complementary image come closure and form a complete ring. An interpolation methods and complement are used to resize the image and complete separation between brain and skull of the MRI of image. Remove all connected component except maximum area connected component because maximum area contains only brain as one pixel. As the binary image my wrong evaluation that’s why a quick hull algorithm for convexhull are computed in which the entire pixels inside the convexhull are set to 1 and outside it are set to zero. Then this binarized image multiplied by the original MRI of brain image and gets the MRI of brain without artefact and skull. After that this image is binarized using standard deviation approach and again multiplied pixel wise with original image. Now the image contains only gray matter and white matter, gray matter relatively shaded region than white matter i.e. white matter have brighter than the gray matter. Using the previous concepts white matter has higher intensity than the gray matter. Thus calculate the total intensity and mean intensity. Mean in calculated by total intensity divided by total number of pixel without black pixel. Here total number of pixel is calculated without black pixel because black pixel contains zero intensity (main region of white and gray matter contain no zero intensity). Depending on the mean intensity, the pixel intensity above mean value selected as white matter and pixel value below or equal to the mean value selected as gray matter.

Figure below describes the total view of our proposed methodology, arrow indicates the proposed methodology is a top down approach and the details descriptions of proposed work describes below (Figure 1).

Figure 1. A block diagram of the proposed methodology and arrow indicate that procedure from top to bottom.

3.1. Procedure for White Matter and Gray Matter Extraction

3.2. Procedure Statbin (Image I)

3.3. Correctness of the Algorithm

Loop invariant: At start of every iteration of loop, inner loops maximum limit width of the image and outer loop maximum limit height of the image.

Initialization: height and width are set by the height and width of the image, some initialization of matrix is set to all pixels zero, and sum, average are initialize as zero.

Maintenance: In each successive iteration, loop invariant moves to pixel of the image incrementing 1. Inner Loop works by moving 1, 2, 3,…, width and outer Loop works by moving 1, 2, 3,…, height depends on condition and all the function are finite in nature.

Termination: Inner loop width of the image does not exceed its height and depend upon if condition, until inner loop executes maximum width and outer loop always performs maximum height of the image.

3.4. Complexity Analysis

Assuming that the height of the image h and width of the image w, then maximum number of iteration of loop is h*w. Thus if h = w= n then the complexity of the above program is O(N2). Complexity of binarization of the image also O(N2) and maintain the above procedure. For computation of Quick hull algorithms for convexhull takes O(NlogN) and ordering of area takes O(NlogN), thus the total time complexity is O(N2)+ O(N2)+ O(NlogN) + O(NlogN) = O(NlogN).

4. Results and Discussion

The procedure of proposed methods has been described above and different output in different step using proposed methods has been shown in Figure 2. Figure 2(a) contains the original input image and Figure 2(b) is the binarized output in which threshold selection has been done by standard deviation of the image. This binarization method has been very effective especially for MRI of brain image and also very helpful to extract original brain (without artefact and skull) from total MRI image. Then complement the binary image, after that two dimensional wavelet decomposition is done using “db1” wavelet up to level two is shown in Figure 2(c) and re- composition of the image is done using the approximate coefficient. In this step, due to reduction of size and removal of detailed information the white pixel of the complementary image come closure and form a complete ring (skull). After the elimination of artefact and skull, Figure 2(d) shows the output image after artefact removal and skull elimination, thus in Figure 2(d) contains only the brain portion. As the goal of the proposed methods are extractions of white matter and gray matter, so image must contains only white and gray matter. The basic things is that relative brighter portion are white matter and shaded portion are gray matter, except that some other non shaded portion below the shaded intensity are removed by applying binarization again and binarized image is multiplied by Figure 2(d) image and the desire results have been shown in Figure 2(e); after calculating mean value and depending on this mean value Figure 2(f) shows the binarized white matter and Figure 2(g) shows the binarized gray matter and finally Figure 2(h) shows the output contains white matter and Figure 2(i) shows the output contains gray matter. The gray matter and white matter extraction are very effective from transvers MRI of brain by proposed methods. Outputs for other type of brain MRI image are shown in

Figure 2. (a) is original image; (b) is the binarized output image; (c) is the output after complementing and using wavelet decompositions using “db1”; (d) output image after artefact removal and skull elimination; (e) is output image contains only white matter and gray matter; (f) is the binarized white matter; (g) is the binarized gray matter; (h) is the output contains white matter; (i) is the output contains gray matter.

comparison section. Data base are collected from BrainWeb [9] with Modality T1, Slice thickness 1 mm (in- plane pixel size is always 1 × 1 mm), Noise: (calculated relative to the brightest tissue) 3%, Intensity non-un- iformity (“RF”) 20%.

5. Comparison

The procedure and output of different steps has been described above. Proposed methods produced very good results visually. In this section proposed methods has been compared with some ground truth image [8] for each type transvers, sagittal, coronal MRI of brain image. It produces very good results for each type of gray matter extraction but fails for white matter extraction from sagital type of MRI of brain image. From visual inspection proposed methods produces very effective results and in visual inspection may have any biasness, that’s why quantification process has been used with very low error rate. Thus proposed methods produces very effective results for MRI of brain Images (Figure 3).

Relative area error is totally based on [8] area, calculate ground truth area and segmentation by proposed methods area and calculate the absolute difference between ground truth area and segmentation by proposed methods area. Division of absolute difference to the maximum area is treated as relative area error. It is clear that lesser relative area error means better segmentation and zero means perfect segmentation. Kappa Index and Jacard Index are similarity measurement metric [10] . Correct detection denotes how much area correctly detected with respect to reference image [10] . Greater Kappa index, Jacard index, Correct detection means better results. The performance metric table for different kind of MRI of brain images describe above is shown in Table 1.

6. Conclusion

Here an intelligence system for gray matter and white matter extraction with or without artefact and skull region technique has been presented. The proposed methods are very useful for three different (Transvers, Sagittal, Coronal) types of image. The automated process has very low time complexity with very easy methodology.

Figure 3. (TW1), (SW1), (CW1) are the white matter extraction by proposed methods and (TW2), (SW2), (CW2) are the corresponding ground truth image; (TG1), (SG1), (CG1) are the gray matter extraction by proposed methods and (TG1), (SG1), (CG1) are the corresponding ground truth image.

Table 1. Accuracy estimation table.

The results improve and overcome the problem of other existing methodologies. The proposed methodology has been also very useful for a pre-processing step for detecting any abnormalities of MRI of brain.


It is my privilege to thank the Dr. Pradip Saha, is MD in Radiology from NRS Medical College and ex-faculty from there. He is currently radiologist at M N Roy Diagnostic Center, Kolkata, India. He have supported for preparing ground truth, guided, and given us the valuable suggestions to complete this paper, and to enrich my knowledge.

Conflicts of Interest

The authors declare no conflicts of interest.


[1] Grau, V., Kikinis, R., Alcaniz, M. and Wareld, S.K. (2003) Cortical Gray Matter Segmentation Using an Improved Watershed Transforms. Surgical Planning Laboratory, Brigham and Women’s Hospital, Harvard Medical School. Proceedings of the 25th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, 17-21 Sept. 2003, Vol. 1, 618-621.
[2] Valsasina, P., Benedetti, B., Rovaris, M., Sormani, M.P., Comi, G. and Filippi, M. (2001) Evidence for Progressive Gray Matter Loss in Patients with Relapsing Remitting MS. Neurology, 1126-1128.
[3] Kochunov, P., Thompson, P.M., Lancaster, J.L., Bartzokis, G., Smith, S., Coyle, T., Royall, R., Laird, A. and Foxa, P.T. (2006) Relationship between White Matter Fractional Anisotropy and Other Indices of Cerebral Health in Normal Aging: Tract-Based Spatial Statistics Study of Aging. Elsevier, Neuroimage.
[4] van Eimeren, L., Niogi, S.N., McCandliss, B.D., Holloway, I.D. and Ansari, D. (2008) White Matter Microstructures Underlying Mathematical Abilities in Children. Cognitive Neuroscience and Neuropsychology, 19, 1117-1121.
[5] Tijms, B.M., Serie, P., Willshaw, D.J. and Lawrie, S.M. (2012) Similarity-Based Extraction of Individual Networks from Gray Matter MRI Scans. Cerebral Cortex, 22, 1530-1541.
[6] Roy, S., Chatterjee, K., Maitra, I.K. and Bandyopadhyay, S.K. (2013) Artefact Removal from MRI of Brain Image. International Refereed Journal of Engineering and Science (IRJES), 2, 24-30.
[7] Ahmed, M.M. and Mohammad, D.B. (2013) Segmentation of Brain MR Images for Tumor Extraction by Combining Kmeans Clustering and Perona-Malik Anisotropic Diffusion Model. International Journal of Image Processing, 2, 27-34.
[8] Roy, S., Dey, A., Chatterjee, K. and Bandyopadhyay, S.K. (2012) An Efficient Binarization Method for MRI of Brain Image. Signal & Image Processing: An International Journal (SIPIJ), 3, 35-51.
[9] (April 2013)
[10] Roy, S., Ghosh, P. and Bandyopadhyay, S.K. (2014) Segmentation and Contour Extraction of Cerebral Hemorrhage from MRI of Brain by Gamma Transformation Approach. FICTA, Proc. Springer, AISC, Advances in Intelligent Systems and Computing, 328, 383-394.

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.