Automatic Lung Segmentation of Volumetric Low-Dose CT Scans Using Graph Cuts

10
Automatic Lung Segmentation of Volumetric Low-Dose CT Scans Using Graph Cuts Asem M. Ali and Aly A. Farag Computer Vision and Image Processing Laboratory (CVIP Lab) University of Louisville, Louisville, KY 40292 {asem,farag}@cvip.uofl.edu www.cvip.uofl.edu Abstract. We propose a new technique for unsupervised segmentation of the lung region from low dose computed tomography (LDCT) images. We follow the most conventional approaches such that initial images and desired maps of regions are described by a joint Markov-Gibbs random field (MGRF) model of independent image signals and interdependent region labels. But our focus is on more accurate model identification for the MGRF model and the gray level distribution model. To better spec- ify region borders between lung and chest, each empirical distribution of volume signals is precisely approximated by a linear combination of Gaussians (LCG) with positive and negative components. LCG models parameters are estimated by the modified EM algorithm. Initial segmen- tation (labeled volume) based on the LCG models is then iteratively refined by using the MGRF with analytically estimated potentials. In this framework the graph cuts is used as a global optimization algorithm to find the segmented data (labeled data) that minimize a certain energy function, which integrates the LCG model and the MGRF model. To val- idate the accuracy of our algorithm, a special 3D geometrical phantom motivated by statistical analysis of the LDCT data is designed. Experi- ments on both phantom and 3D LDCT data sets show that the proposed segmentation approach is more accurate than other known alternatives. 1 Introduction Isolating the lung from its surrounding anatomical structures is a crucial step in many studies such as detection and quantification of interstitial disease, and the detection and/or characterization of lung cancer nodules. For more details, see Sluimer’s et al. survey paper [1]. But CT lung density depends on many factors such as image acquisition protocol, subject tissue volume, volume air, and physical material properties of the lung parenchyma. These factors make lung segmentation based on threshold technique difficult. So, developing new accurate algorithms with no human interaction, which depends on gray level difference between lung and its background, is important to precisely segment the lung. The literature is rich with approaches of lung segmentation in CT images. Hu et al. [2], proposed an optimal gray level thresholding technique which is G. Bebis et al. (Eds.): ISVC 2008, Part I, LNCS 5358, pp. 258–267, 2008. c Springer-Verlag Berlin Heidelberg 2008

Transcript of Automatic Lung Segmentation of Volumetric Low-Dose CT Scans Using Graph Cuts

Automatic Lung Segmentation of VolumetricLow-Dose CT Scans Using Graph Cuts

Asem M. Ali and Aly A. Farag

Computer Vision and Image Processing Laboratory (CVIP Lab)University of Louisville, Louisville, KY 40292

{asem,farag}@cvip.uofl.eduwww.cvip.uofl.edu

Abstract. We propose a new technique for unsupervised segmentationof the lung region from low dose computed tomography (LDCT) images.We follow the most conventional approaches such that initial images anddesired maps of regions are described by a joint Markov-Gibbs randomfield (MGRF) model of independent image signals and interdependentregion labels. But our focus is on more accurate model identification forthe MGRF model and the gray level distribution model. To better spec-ify region borders between lung and chest, each empirical distributionof volume signals is precisely approximated by a linear combination ofGaussians (LCG) with positive and negative components. LCG modelsparameters are estimated by the modified EM algorithm. Initial segmen-tation (labeled volume) based on the LCG models is then iterativelyrefined by using the MGRF with analytically estimated potentials. Inthis framework the graph cuts is used as a global optimization algorithmto find the segmented data (labeled data) that minimize a certain energyfunction, which integrates the LCG model and the MGRF model. To val-idate the accuracy of our algorithm, a special 3D geometrical phantommotivated by statistical analysis of the LDCT data is designed. Experi-ments on both phantom and 3D LDCT data sets show that the proposedsegmentation approach is more accurate than other known alternatives.

1 Introduction

Isolating the lung from its surrounding anatomical structures is a crucial stepin many studies such as detection and quantification of interstitial disease, andthe detection and/or characterization of lung cancer nodules. For more details,see Sluimer’s et al. survey paper [1]. But CT lung density depends on manyfactors such as image acquisition protocol, subject tissue volume, volume air,and physical material properties of the lung parenchyma. These factors makelung segmentation based on threshold technique difficult. So, developing newaccurate algorithms with no human interaction, which depends on gray leveldifference between lung and its background, is important to precisely segmentthe lung.

The literature is rich with approaches of lung segmentation in CT images.Hu et al. [2], proposed an optimal gray level thresholding technique which is

G. Bebis et al. (Eds.): ISVC 2008, Part I, LNCS 5358, pp. 258–267, 2008.c© Springer-Verlag Berlin Heidelberg 2008

Automatic Lung Segmentation of Volumetric Low-Dose CT Scans 259

used to select a threshold value based on the unique characteristics of the dataset. In [3], Brown et al. integrated region growing and morphological operationswith anatomical knowledge expert to automatically segment lung volume. Asegmentation-by-registration scheme was proposed by Sluimer et al. [4] for au-tomated segmentation of the pathological lung in CT. In that scheme, a scanwith normal lungs is registered to a scan containing pathology. When the result-ing transformation is applied to a mask of the normal lungs, a segmentation isfound for the pathological lungs. Although shape-based, or Atlas-based (e.g.[5]),segmentation overcomes the problem of gray level inhomogeneities, the creationof a 3D shape model of the lung is not an easy task in the 3D case. Also thesetechniques need a registration step. Conventional methods that perform lungsegmentation in CT depend on a large contrast in Hounsfield units betweenthe lung and surrounding tissues. Although these methods accurately segmentnormal lung tissues from LDCT, they tend to fail in case of gray level inhomo-geneity, which results form the abnormal lung tissues. The main advantage ofour proposed segmentation approach over the conventional techniques is thatit is based on modeling both the intensity distribution and spatial interactionbetween the voxels in order to overcome any region inhomogeneity existing inthe lung region. Moreover, the proposed segmentation algorithm is fast whichmakes it suitable for clinical applications.

Recently, graph cuts has been used as an interactive N-D image segmenta-tions tool (For more details see [6]). Many studies used graph cuts for lungsegmentation. Boykov and Jolly in [7] introduced an interactive segmentationframework. In that work, the user must identify some voxels as object and oth-ers as background seeds. Then graph cut approach is used to find the optimal cutthat completely separates the object seeds from the background seeds. To over-come the time complexity and memory overhead of the approach in [6] for highresolution data, Lombaert et al. [8] performed graph cuts on a low-resolutionimage/volume and propagated the solution to the next higher resolution levelby only computing the graph cuts at that level in a narrow band surroundingthe projected foreground/background interface. Although the results of theseapproaches looked promising, manual interaction was still required. Interactivesegmentation imposes some topological constraints reflecting certain high-levelcontextual information about the object. However, it depends on the user input.The user inputs have to be accurately positioned. Otherwise the segmentationresults are changed. Chen et al. [9] used morphological operations and graphcuts to segment the lung from radiographic images automatically. In that work,the authors initialized an outer boundary for each lung region by shrinking 10pixels from the boundaries of both vertical halves of an image. As in our case,this method does not work in axial CT slices, where there is a lung part in themiddle of the image. Inner boundaries were obtained by dilating the “regionalminimum”. However, due to the inhomogeneity in the given image, there weremany “regional minimums” so they selected a “regional minimum” based on athreshold. Then the authors in [9] used graph cuts to find the boundaries ofeach lung region between its inner and outer boundaries. The data penalty and

260 A.M. Ali and A.A. Farag

discontinuity penalty were chosen to be inversely proportional to the gray levelsdifference of the neighborhood pixels. This selection will be improper in the caseof the axial CT lung slices, due to their gray level inhomogeneities.

In this paper, we propose a novel automatic lung volume segmentation ap-proach that uses graph cuts as a powerful optimization technique to get theoptimal segmentation. Different from the previous graph cuts studies, in our seg-mentation approach, no user interaction is needed; instead, we use the volumegray level to initially pre-label the volume. To model the low level information inthe CT lung volume, the gray level distribution of lung volume is approximatedwith a new Linear Combination of Gaussian (LCG) distributions with positiveand negative components. Due to the closeness of the gray levels between thelung tissues and the chest tissues, we do not depend only on volume gray level,but we use the graph cuts approach to combine the volume gray level informa-tion and the spatial relationships between the region labels in order to preservethe details. Often, the potential of Potts model which describes the spatial inter-action between the neighboring voxels is estimated using simple functions thatare inversely proportional to the gray scale difference between the two voxelsand their distance. Another contribution in this work is that the potentials ofPotts model are estimated using a new analytical approach. After the lung vol-ume is initially labeled we formulate a new energy function using both volumeappearance models. This function is globally minimized using s/t graph cuts toget the final and optimal segmentation of lung.

2 Proposed Graph Cuts Segmentation Framework

To segment a lung, we initially labeled the volume based on its gray level prob-abilistic model. Then we create a weighted undirected graph with vertices cor-responding to the set of volume voxels P , and a set of edges connecting thesevertices. Each edge is assigned a nonnegative weight. The graph also contains twospecial terminal vertices s (source) “Lung”, and t (sink) “Chest and other tis-sues”. Consider a neighborhood system in P , which is represented by a set N ofall unordered pairs {p, q} of neighboring voxels in P . Let L the set of labels {“0”,“1”}, correspond to lung and its background respectively. Labeling is a mappingfrom P to L, and we denote the set of labeling by f = {f1, . . . , fp, . . . , f|P|}.In other words, the label fp, which is assigned to the voxel p ∈ P , segments itto lung or background. Now our goal is to find the optimal segmentation, bestlabeling f , by minimizing the following energy function:

E(f) =∑

p∈PDp(fp) +

{p,q}∈NV (fp, fq), (1)

where Dp(fp), measures how much assigning a label fp to voxel p disagreeswith the voxel intensity, Ip. Dp(fp) = −ln P (Ip | fp) is formulated to representthe regional properties of segments, Sec.2.1. The second term is the pairwiseinteraction model which represents the penalty for the discontinuity betweenvoxels p and q, Sec.2.2.

Automatic Lung Segmentation of Volumetric Low-Dose CT Scans 261

2.1 Gray Level Probabilistic Model

To initially label the lung volume and to compute the data penalty term Dp(fp),we use the modified EM [10] to approximate the gray level marginal density ofeach class fp, lung and background, using a LCG with C+

fppositive and C−

fp

negative components as follows:

P (Ip|fp) =

C+fp∑

r=1

w+fp,rϕ(Ip|θ+

fp,r) −C−

fp∑

l=1

w−fp,lϕ(Ip|θ−fp,l), (2)

where ϕ(.|θ) is a Gaussian density with parameter θ ≡ (μ, σ2) with mean μ andvariance σ2. w+

fp,r means the rth positive weight in class fp and w−fp,l means

the lth negative weight in class fp. This weights have a restriction∑C+

fp

r=1 w+fp,r −

∑C−fp

l=1 w−fp,l = 1. Fig. 1 illustrates an example for the lung gray level LCG model

and its components.

0 50 100 150 200 2500

0.005

0.01

0.015

− Empirical Density − − − Gaussian Components . . . Estimated Density

0 50 100 150 200 2500

0.002

0.004

0.006

0.008

0.01

0.012

0.014

(a) (b) (c)

(d) (e) (f)

Fig. 1. Example of a lung gray level LCG Model. (a) The empirical and initial estimateddensities and the dominant components. (b) The scaled absolute deviations betweenthe empirical and initial estimated densities. (c) Approximation error for the scaledabsolute error as a function of the number of Gaussians, which is used to approximatethe scaled absolute error in (b). (d) The components of the final LCG model. (e) Thefinal LCG density approximation. (f) The LCG models of each class with the bestseparation threshold t = 109.

262 A.M. Ali and A.A. Farag

2.2 Spatial Interaction Model

The homogenous isotropic pairwise interaction model which represents thepenalty for the discontinuity between voxels p and q is defined as follows:

V (fp, fq) ={

γ if fp �= fq;0 if fp = fq

. (3)

The simplest model of spatial interaction is the Markov Gibbs random field(MGRF) with the nearest 6-neighborhood. Therefore, for this specific modelthe Gibbs potential can be obtained analytically using the maximum likelihoodestimator (MLE) for a generic MGRF [11]. So, the resulting approximate MLEof γ is:

γ∗ =(

K − K2

K − 1fneq(f)

). (4)

where K = 2 is the number of classes in the volume and fneq(f) denotes therelative frequency of the not equal labels in the voxel pairs and it is defined asfollows.

fneq(f) =1

|TN|∑

{p,q}∈TN

δ(fp �= fq), (5)

where the indicator function, δ(A) equals one when the condition A is true,and zero otherwise, TN = {{p, q} : p, q ∈ P ; {p, q} ∈ N} is the family of theneighboring voxel pairs supporting the Gibbs potentials.

2.3 Graph Cuts Optimal Segmentation

To segment a lung volume, instead of independently segmenting each 2D sliceof the volume, we segment the 3D lung using a 3D graph (e.g. Fig. 2) whereeach vertex in this graph represents a voxel in the lung volume. Then we definethe weight of each edge as shown in table 1. After that, we get the optimalsegmentation surface between the lung and its background by finding the min-imum cost cut on this graph. The minimum cost cut is computed exactly inpolynomial time for two terminal graph cuts with positive edges weights via s/tMin-Cut/Max-Flow algorithm [12].

3 Experiments and Discussion

To assess the performance of the proposed segmentation framework, we demon-strate it on axial human chest slices obtained by spiral-scan low-dose computertomography (LDCT), (the 8-mm-thick LDCT slices were reconstructed every 4mm with the scanning pitch of 1.5 mm). Each volume is initially labeled usingthe gray level LCG model’s threshold. However, due to the gray levels inho-mogeneities, one can not precisely segment the lung using only this thresholdas shown in Fig. 3 where, the misclassified voxels may include abnormal lung

Automatic Lung Segmentation of Volumetric Low-Dose CT Scans 263

Fig. 2. Example of graph that used in Lung Vol-ume Segmentation. Note: Terminals should beconnected to all voxels but for illustration issuewe did not do this.

Table 1. Graph Edges Weights

Edge Weight for

{p, q} γ fp �= fq

0 fp = fq

{s, p} −ln[P (Ip | “1”)] p ∈ P{p, t} −ln[P (Ip | “0”)] p ∈ P

Fig. 3. Samples of segmented lung slices using LCG model’s threshold. (Error shownin red).

tissues. After computing the initially labeled volume, the potential, which indi-cates the spatial interaction between its voxels, is computed using this labeledvolume by Eq.(4). After that, we construct a graph for the given volume usingthe 6-neighborhood system (e.g. Fig. 2). Then the s/t graph cuts approach givesthe minimum of the binary energy Eq.(1), which corresponds to optimal seg-mentation. The segmentation errors are evaluated, with respect to the groundtruth produced by an expert (a radiologist). Fig. 4 shows samples of segmentedslices for different subjects as well as their segmented 3D lung volumes.

Table 2. Accuracy and time performance of our segmentation on 7 data sets in com-parison to ICM and IT. Average volume 256x256x77.

AlgorithmOur ICM IT

Minimum error, % 1.66 3.31 2.34Maximum error, % 3.00 9.71 8.78Mean error, % 2.29 7.08 6.14Standard deviation,% 0.5 2.4 2.1Significance, P 2 ∗ 10−4 5 ∗ 10−4

Average time, sec 46.26 55.31 7.06

264 A.M. Ali and A.A. Farag

(a) 2.08% (b) 2.21% (c) 2.17% (d) 1.95%

Fig. 4. Samples of segmented lung slices using the proposed algorithm,(Error are shownin red). Corresponding 3D lung volumes (Error are shown in green).

Evaluation: To evaluate the results we calculate the percentage segmentationerror as follows:

error% =100 ∗ Number of misclassified voxels

Number of lung volume voxels. (6)

We ran the proposed approach on 23 data sets. The statistical analysis ofseven of them, for which we have their ground truths (radiologist segmentation),

Automatic Lung Segmentation of Volumetric Low-Dose CT Scans 265

are shown in Table 2. For comparison, the statistical analysis of Iterative Condi-tional Modes (ICM) [13] technique results, and the Iterative Threshold (IT) [2]approach results are also shown. The unpaired t -test is used to show that the dif-ferences in the mean errors between the proposed segmentation, and (ICM/andIT) are statistically significant (the two-tailed value P is less than 0.0006). Themain problem in the segmentation of ICM and IT is that the misclassified voxelsinclude abnormal lung tissues (lung cancer), bronchi and bronchioles as shownin Fig. 5. These tissues are important if lung segmentation is a pre-step in adetection of lung nodules system. The motivation behind our segmentation isto exclude such errors as far as possible. All algorithms are run on a PC 3GhzPentium 4, and 2GB RAM. All implementations are in C++.

(Subj1)

(Subj2)(a) (b) (c)

Fig. 5. Examples of segmented lung slices that have nodules (bounded by yellow circle).(a) IT and (b) ICM approaches misclassified these parts as chest tissues (error is shownin red). However, (c) proposed algorithm correctly classified them as a lung.

4 Validation

Due to the hand shaking errors, it is difficult to get accurate ground truth frommanual segmentation. To assess the robustness of the proposed approach, wehave created a 3D geometric lung phantom (256x256x81). To cerate this phan-tom, we started with a segmented (by a radiologist) lung volume (lung regions,arteries, veins, bronchi, and bronchioles). Then lung and its background sig-nals of the phantom are generated according to the distributions P (I|0), andP (I|1), respectively, in Fig. 1(f) using the inverse mapping approach [10]. Fig. 6shows some slices of the lung volume phantom. The error 0.71% between ourresults and ground truth confirms the high accuracy of the proposed segmen-tation framework. Fig. 7 shows proposed approach segmentation as well as theICM segmentation of the phantom volume. As expected, in our approach the

266 A.M. Ali and A.A. Farag

Fig. 6. Slices from the synthetic volume

(a)

(b)

Fig. 7. Lung phantom segmen-tation results (a) The proposedalgorithm 0.71%, and (b) TheICM technique 2.31%

misclassified voxels are located at the boundary, and the misclassified voxels inICM result lose abnormal lung tissues.

5 Conclusion

In this paper, we have presented a novel framework for automatic lung volumesegmentation using the graph cuts approach. Our proposed method addresses theinteractive techniques’ limitation. We initially pre-label the volume using its graylevel information. The gray level distribution of lung volume is approximatedwith a LCG distributions with positive and negative components. A MGRFmodel is used to describe the spatial interaction between the lung voxels. A newanalytical approach to estimate 3D spatial interaction potentials for the MGRFmodel is presented. Finally, an energy function using the previous models isformulated, and is globally minimized using graph cuts. Experimental resultsshow that the developed technique gives promising accurate results compared toother known algorithms.

References

1. Sluimer, I., Schilham, A., Prokop, M., van Ginneken, B.: Computer analysis ofcomputed tomography scans of the lung: a survey. IEEE Transactions on MedicalImaging 25, 385–405 (2006)

Automatic Lung Segmentation of Volumetric Low-Dose CT Scans 267

2. Hu, S., Hoffman, E.A., Reinhardt, J.M.: Automatic lung segmentation for accu-rate quantitation of volumetric X-ray CT images. IEEE Transactions on MedicalImaging 20, 490–498 (2001)

3. Brown, M.S., McNitt-Gray, M.F., Mankovich, N.J., Goldin, J., Hiller, J., Wilson,L.S., Aberle, D.R.: Method for segmenting chest ct image data using an anatomicalmodel: Preliminary results. IEEE Transactions on Medical Imaging 16, 828–839(1997)

4. Sluimer, I., Prokop, M., van Ginneken, B.: Toward automated segmentation ofthe pathological lung in ct. IEEE Transactions on Medical Imaging 24, 1025–1038(2005)

5. Zhang, L., Hoffman, E.A., Reinhardt, J.M.: Atlas-driven lung lobe segmentationin volumetric x-ray ct images. In: Proc. of the SPIE, vol. 5031, pp. 306–315 (2003)

6. Boykov, Y., Funka-Lea, G.: Graph cuts and efficient N-D image segmentation.International Journal of Computer Vision 70, 109–131 (2006)

7. Boykov, Y., Jolly, M.P.: Interactive organ segmentation using graph cuts. In: Delp,S.L., DiGoia, A.M., Jaramaz, B. (eds.) MICCAI 2000. LNCS, vol. 1935, pp. 276–286. Springer, Heidelberg (2000)

8. Lombaert, H., Sun, Y., Grady, L., Xu, C.: A multilevel banded graph cuts methodfor fast image segmentation. In: IEEE Proceedings of International Conference onComputer Vision, vol. I, pp. 259–265 (2005)

9. Chen, S., Cao, L., Liu, J., Tang, X.: Automatic segmentation of lung fields fromradiographic images of sars patients using a new graph cuts algorithm. In: Inter-national Conference on Pattern Recognition, vol. 1, pp. 271–274 (2006)

10. Farag, A., El-Baz, A., Gimelfarb, G.: Density estimation using modified expecta-tion maximization for a linear combination of gaussians. In: IEEE Proceedings ofInternational Conference on Image Processing, vol. 3, pp. 1871–1874 (2004)

11. Gimelfarb, G.L.: Image Textures and Gibbs Random Fields. Kluwer Academic,Dordrecht (1999)

12. Boykov, Y., Kolmogorov, V.: An experimental comparison of min-cut/max-flowalgorithms for energy minimization in vision. IEEE Transactions on PatternAnalysis and Machine Intelligence 26, 1124–1137 (2004)

13. Besag, J.E.: On the statistical analysis of dirty pictures. Journal of the RoyalStatistical Society B 48, 259–302 (1986)