CHAPTER 6 CAD SYSTEM FOR THE DETECTION OF PLEURAL...

45
136 CHAPTER 6 CAD SYSTEM FOR THE DETECTION OF PLEURAL DISORDERS A CAD system is modelled for the detection and classification of plumonary disorders like pleural effusion and pneumothorax. Pleural effusion is the collection of fluid in the pleural cavity and pneumothorax is due to the accumulation of air in the pleural cavity. The chest CT slice dataset consists of four classes namely pneumothorax, pleural effusion, normal and other diseases CT slices. The dataset is divided into the training and testing datasets. The training dataset consists of CT slices belonging to the four classes that have already been diagnosed by a radiologist. The testing dataset consists of the quey CT slices to be classified by the CAD system. The 2D CT slices in JPEG format (training dataset) are transformed from RGB to grayscale and filtered using a low pass Gaussian filter to remove Gaussian noise. The filtered slices are segmented to separate the two lungs from the surrounding regions. The morphological technique used for the segmentation of pleural effusion is different from that used for the segmentation of pneumothorax. The ROIs corresponding to the pleural effusion and pneumothorax affected regions are extracted from the segmented CT slices using morphological operations. Texture features are extracted from the ROIs of both the disorders and the segmented lung regions. These features are grouped into separate feature vectors for all the four classes and applied to a PNN classifier for training. The feature vectors of the testing dataset are

Transcript of CHAPTER 6 CAD SYSTEM FOR THE DETECTION OF PLEURAL...

136

CHAPTER 6

CAD SYSTEM FOR THE DETECTION OF

PLEURAL DISORDERS

A CAD system is modelled for the detection and classification of

plumonary disorders like pleural effusion and pneumothorax. Pleural effusion

is the collection of fluid in the pleural cavity and pneumothorax is due to the

accumulation of air in the pleural cavity. The chest CT slice dataset consists

of four classes namely pneumothorax, pleural effusion, normal and other

diseases CT slices. The dataset is divided into the training and testing

datasets. The training dataset consists of CT slices belonging to the four

classes that have already been diagnosed by a radiologist. The testing dataset

consists of the quey CT slices to be classified by the CAD system. The 2D CT

slices in JPEG format (training dataset) are transformed from RGB to

grayscale and filtered using a low pass Gaussian filter to remove Gaussian

noise.

The filtered slices are segmented to separate the two lungs from the

surrounding regions. The morphological technique used for the segmentation

of pleural effusion is different from that used for the segmentation of

pneumothorax. The ROIs corresponding to the pleural effusion and

pneumothorax affected regions are extracted from the segmented CT slices

using morphological operations. Texture features are extracted from the ROIs

of both the disorders and the segmented lung regions. These features are

grouped into separate feature vectors for all the four classes and applied to a

PNN classifier for training. The feature vectors of the testing dataset are

137

computed and are applied to the trained PNN classifier for the classification

of the CT slices into one of the four categories pleural effusion,

pneumothorax, normal lung or other diseases.

6.1 CAD SYSTEM FOR THE DIAGNOSIS OF PLEURAL

DISORDERS

The block diagram of the CAD system for the classification of

pleural disorders is illustrated in Figure 6.1. Segmentation, ROI extraction,

feature extraction and classification with a PNN are the major proceeses in the

CAD system. The CAD system illustrated in Figure 6.1 involves the

processing of two sets of lung CT slices the training dataset and the testing

dataset. The training dataset is the set of chest CT slices already diagnosed by

the radiologist as slices affected with pleural effusion, pneumothorax, normal

or other chest diseases. The testing dataset is the set of CT slices that have to

be classified by the CAD system.

Figure 6.1 Block diagram of the CAD system for pleural disorders

Classified Results

Training the PNN

Segmentation

ROI Extraction

Feature Extraction

Testing Dataset Training Dataset

Segmentation

ROI Extraction

Feature Extraction

Trained PNN Classifier

138

6.1.1 Lung Segmentation

The input lung CT slice (in JPEG format) is transformed into a

grayscale slice. Gaussian noise present in the chest CT slice is removed using

a Gaussian filter as it retains the higher valued edges in the slices that are

essential for the ROI extraction. Segmentation is carried out to separate both

the left and right lungs in the CT slice by removing the surrounding regions

and the unwanted muscles from the thin CT slice. The segmentation technique

that is used varies depending on the portion of the lung that is affected and

also on the type of disease affecting the lungs (Hanson 1981). This is because

the fluid due to pleural effusion collects at the base of the lung due to it being

more dense than the spongy lung regions, while the air due to pneumothorax

accumulates at the top of the lung region as it has minimum density.

Therefore the same segmentation technique cannot be used to extract the lung

regions for both pleural effusion and for pneumothorax. Hence the two

segmentation techniques that are used, for segmenting the lungs with pleural

effusion and pneumothorax, are both applied one after the other, to the entire

chest CT dataset. So all the CT slices are first segmented using the technique

for pleural effusion and this is followed by applying the segmentation

technique for pneumothorax.

6.1.1.1 Segmentation of lungs affected by pleural effusion

The steps in the segmentation of the lung CT slices affected by

pleural effusion are illustrated in Figure 6.2.

139

Figure 6.2 Processes in the segmentation of pleural effusion from chest CT slices

Input

Grayscale Gaussian filtered chest CT slice.

Process

Step 1: Apply Canny algorithm to the filtered CT slice to detect the edges (Canny 1986).

Step 2: Dilate and complement the edge detected slice.

Step 3: Convert the complemented slice into an unsigned integer form and map it with the original grayscale slice, as the arithmetic operation of multiplication can be done on integers only. In the output slice obtained (denoted by PE1) the edges of the lungs and the surrounding regions are clearly visible.

PE2

Lung CT Slice Dataset

Dilate and Complement

Map with Original Grayscale Slice

Mapping the Thresholded Output with PE1

Canny Edge Detection

Segmented Lungs (PE3)

PE1

Preprocessing

140

Step 4:

thresholding (Otsu 1979) to obtain a binary slice (denoted by PE2)

in which the lungs are black and the surrounding regions are white.

Step 5: Map PE2 with PE1. This process separates the lung regions from

their surrounding regions. The segmented lung region (denoted by

PE3) is then mapped with the original graycale slice.

Output

Segmented lungs affected by pleural effusion.

6.1.1.2 Segmentation of lungs affected by pneumothorax

The steps in the segmentation of the lung CT slices affected by

pneumothorax are illustrated in Figure 6.3.

Input

Grayscale gaussian filtered chest CT slice.

Process

Step 1: Threshold the denoised CT slice using iterative thresholding (Ridler

& Calvard 1978). This produces a binary slice in which the lung

regions and the surrounding regions, having a grayscale value

closer to black are made black. All other regions with grayscale

value closer to white are converted to white.

Step 2: Complement the iteratively thresholded CT slice and eliminate the

lung borders from the complemented CT slice. This extracts the

lung regions.

141

Step 3: Fill the holes in the lung CT slice obtained from Step 2. The output

slice of this stage is denoted as PT1.

Step 4: Remove small connected components from the holes filled CT slice

of Step 3. The resulting output slice is denoted by PT2.

Step 5: Map PT2 with the preprocessed input slice to obtain the segmented

lungs affected by pneumothorax. This output is denoted by PT3.

Output

Segmented lungs affected by pneumothorax.

Figure 6.3 Processes in the segmentation of pneumothorax from chest CT slices

PT1

PT2

Iterative Thresholding

Complementing and Clearing Background Pixels

Filling Holes

Mapping with Denoised Output

Segmented Lungs with Pneumothorax PT3

Lung CT Dataset

Preprocessing

Removal of Connected Components

142

6.1.2 ROI Extraction

Pleural effusion is the accumulation of fluid in the pleural space

surrounding the lungs. The fluid has a density greater than the lung regions.

So the pleural effusion fluid accumulates in the lower portions of the pleural

cavity and also takes the shape of the lung and pleural cavity. Pneumothorax

is the excessive collection of air in the pleural space that commonly

accumulates in the upper regions of the pleural cavity. The HU of air, water

(fluid) and bones (ribs) are -1000, 0 and [80, 1000] respectively which can be

converted to grayscale values of 0, 127.5 and [138, 255] respectively as

discussed by Horwood et al (2001) and Goddard (1982). The ROI of pleural

effusion is a fluid filled region with grayscale value close to 128 and that of

pneumothorax is an air filled region with grayscale value close to 0 (black).

As the intensity values of the ROI regions are different, the processes in the

extraction of the ROIs are also different for pleural effusion and pneumothorax.

The process after segmentation is the extraction of the ROIs of

pleural effusion and pneumothorax. To each slice, first the morphological

technique for the extraction of the ROI of pleural effusion is applied, which is

followed by the application of the technique for the extraction of

pneumothorax.

6.1.2.1 Extraction of the region affected by pleural effusion

The ROIs of pleural effusion are extracted from the segmented

lungs by applying a morphological technique as illustrated in Figure 6.4.

Input

Thresholded CT slice PE2 (Output of segmentation of lungs

affected by pleural effusion).

143

Process

Step 1: Complement the thresholded slice PE2 and remove the borders.

The resultant output that is denoted by PE4.

Step 2: Dilate PE4 using a disk shaped structuring element followed by a

closing operation.

Step 3: Transform the resultant binary slice into a grayscale slice to obtain

an output that is denoted by PE5 that is then added to PE3 to get

the output represented by PE6 that has a white outline surrounding

the lungs.

Step 4: Scan the output PE6 in both directions (left to right and vice versa),

starting from the top left corner of the first row.

Step 5: Proceeding row wise, convert pixels in the range from 138 to 255

(grayscale value of bone) to white and all other pixels to black from

column 1 to column n of each row in the CT slice. This process of

conversion of pixels to white continues till the entire slice is

covered. The scanning stops when the white outline (From Step 2)

surrounding the lung is encountered. The output is denoted by

PE7 which consists of the ROIs in both the lungs along with small

connected pixel components in white and the remaining regions are

black.

Step 6: Erode PE7 and remove the small connected components. The

output obtained in this step is denoted by PE8.

Step 7: Fill the holes in PE8. This output is denoted by PE9 which is the

ROI in binary form.

144

Step 8: Map the ROI output PE9 with the original Gaussian filtered

grayscale slice to get the ROIs of pleural effusion. The ROIs of

pleural effusion are denoted by PE10.

Output

Extracted ROIs of pleural effusion.

Figure 6.4 Extraction of ROI for CT slices affected by pleural effusion

PE4

PE6

PE7

PE8

Complement and Remove Borders

Dilate and Close

Convert to Grayscale (PE5) and Add with PE3

Scan PE6 in Both Directions and Convert Pixels Between 138 and 255

to White

PE2 (Thresholded Slice)

Erode PE7 and Remove Small Connected Components

Fill Holes (PE9) and Map with Gaussian Filtered Slice

Extracted ROIs of Pleural Effusion

PE10

145

6.1.2.2 Extraction of the region affected by pneumothorax

The ROI extraction process for extracting the pneumothorax

regions is next applied to all the segmented lung CT slices (pneumothorax,

pleural effusion, normal and other diseases). The algorithm in this section

extracts the ROIs of pneumothorax from the segmented lung CT slices.

Figure 6.5 illustrates the processes in the ROI extraction of pneumothorax.

Figure 6.5 Extraction of ROI from segmented lungs affected by pneumothorax

Input

Segmented lungs affected by pneumothorax (Output of

segmentation of lungs affected by pneumothorax).

Complemented Slice

Mapping PT4 with PT1

Removal of Small Connected Components and Closing Operation

Mapping with Gaussian Filtered Slice

Segmented Lungs PT3

Extracted ROIs of Pneumothorax

PT4

PT5

PT6

146

Process

Step 1:

technique (Otsu 1979) to obtain a binary output with the lungs in

white colour on a black background.

Step 2: Complement the binary output PT3 from Step 1. The resultant

output is denoted by PT4.

Step 3: Map PT1 and PT4 by the process of scalar multiplication.

Step 4: Fill the holes and remove all small connected components. Close

the resultant output using a morphological close operation. This

results in an output denoted by PT5 consisting of the ROI in white

within a black background.

Step 5: Map PT5 with the Gaussian filtered grayscale slice to obtain the

output (denoted by PT6) corresponding to the extracted ROIs of

pneumothorax.

Output

Extracted ROI from the lungs affected by pneumothorax.

6.1.3 Feature Extraction

The colour features are not extracted as the CT slices are

transformed into grayscale initially. The shape of the pathologically affected

region is neither specific nor geometrical in nature. Ten texture and shape

features are extracted from the segmented lung regions and from the extracted

ROIs of both the diseases.

147

Input

Extracted ROIs of pleural effusion and pneumothorax (Output of

ROI extraction of pleural effusion and pneumothorax processes).

Process

Step 1: Compute the area which is the actual number of pixels in the

extracted ROI region.

Step 2: Compute the convex area that is a scalar value of the number of

pixels in the convex image of the ROI. The convex image is a

binary image with size equal to the bounding box of the region and

with all pixels within the convex hull filled in.

Step 3: Compute the equivalent diameter feature that is the diameter of the

circle with the same area as the ROI using Equation (6.1).

AreaDiameterEquivalent *4 (6.1)

Step 4: Compute the mean that is the average intensity value of the pixels

in the ROI using Equation (6.2).

1

0

)(L

iii zpzMean (6.2)

where zi is a random variable that specifies the intensity, p(zi) is the

histogram of the intensity levels in the region and L is the number

of possible intensity levels.

Step 5: Compute the eccentricity that is a scalar value of the ellipse that

specifies the ratio of the distance between the foci of the ellipse and

its major axis length.

148

Step 6: Compute the solidity which is a scalar value that specifies the

proportion of the pixels in the convex hull that are also present in

the ROI using the Equation (6.3).

AreaConvex

AreaSolidity (6.3)

Step 7: Compute the perimeter that is a scalar value of the distance

between each adjoining pair of pixels around the border of the

region.

Step 8: Compute the entropy that is the statistical measure of the

randomness of intensity in the ROI using Equation (6.4).

1

0

)(log*)(L

iii zpzpEntropy (6.4)

Step 9: Compute the smoothness that is a measure of the relative smoothness

of intensity in the ROI using Equation (6.5).

)1

11( 2Smoothness (6.5)

Step 10: Compute the standard deviation that is a measure of the average

contrast of each ROI using Equation (6.6).

Standard Deviation =1

0

2 )()(L

iii zpmz (6.6)

Output

Extracted features grouped as a feature vector.

149

The extracted feature vectors from the ROIs are fed as input to the

PNN (Specht 1990; Specht 1992) which is used to classify the given CT slice

into one of the 4 classes such as pneumothorax, pleural effusion, normal or

other diseases.

6.1.4 Probabilistic Neural Network Classifier

The PNN is implemented as a three layered network consisting of

the input layer, hidden layer and output layer. The input layer consists of 10

input nodes that correspond to the 10 extracted features. All the input nodes

are connected to each node in the hidden layer. The number of nodes in the

hidden layer is variable and can be adjusted to improve the classification

(Berthold & Diamond 1998). The computational time increases, when the

number of nodes in the hidden layer increases. The output layer consists of 4

nodes that correspond to the four classes - pleural effusion, pneumothorax,

normal lung and chest CT slices affected by other diseases. The PNN is

trained using the features, extracted from the CT slices validated by a

radiologist.

When the query slices are given as input to the neural network,

based on the training received, the system has to classify the CT slices as

pleural effusion, pneumothorax, normal or as slices affected by other diseases.

So the features are extracted from the ROIs of the query slices and fed to the

input nodes of the PNN in the form of a M x N input matrix where there are

M rows and N columns. Each column N in this data matrix corresponds to a

CT slice and the elements in each column (M rows) correspond to the ten

features extracted from the CT slice. Next a P x Q target matrix is created

with P rows and Q columns where P refers to the four classifier output classes

and Q corresponds to the number of query CT slices.

150

Considering the columns of the target matrix representing normal

slices, the first element in the column is represented by a one and the other

three elements in the column are filled with zeros. The columns in the target

matrix representing other CT slices are filled with a one in the second element

and the remaining elements are filled with zeros. Pleural effusion is

represented by a one in the third element and the remaining elements in the

column being filled with zeros. Pneumothorax is represented by a one in the

fourth element and the first three elements in the column being filled with

zeros. The number of neurons in the hidden layer is varied to improve the

classification results. The outputs of the classifier will indicate whether the

slice has been classified as normal lung, other diseases, pleural effusion or as

pneumothorax.

6.2 SEVERITY CALCULATION

The percentage of the lungs that are affected by pleural effusion

and pneumothorax is computed. This value indicates the extent of severity to

which the lungs are affected by the pleural disorder. It will also indicate the

level of disease progression. The severity is calculated for pleural effusion

and pnemothorax individually. The severity is computed for both the lungs as

well as for individual lungs as the disease sometimes affects both of the lungs

and in certain cases affects any one of the lungs.

6.2.1 Algorithm to Compute the Percentage of Severity in Both

Lungs Affected by Pleural Effusion

The extent to which the left and right lungs are affected by pleural

effusion is determined using the algorithm given below.

151

Input

Segmented lungs affected by pleural effusion and extracted ROIs of pleural effusion (Output of segmentation of lungs affected by pleural effusion and ROI extracton of pleural effusion processes).

Process

Step 1: Enclose each of the segmented left and right lungs of pleural effusion (PE3) (extracted in Section 6.1.1.1) within bounding boxes and compute the total area of both the segmented lungs. Let this area be A1. (The sum of the pixels in a region is the area of a region.)

Step 2: Label the ROIs of pleural effusion (PE10) (extracted in Section 6.1.2.1) and enclose them within bounding boxes. Compute the area of the extracted ROIs of pleural effusion. Let this area be A2.

Step 3: Compute the total area of both the left and right lungs, of a CT slice that is affected by pleural effusion by adding the area of segmented lungs (A1) and the area of the extracted ROIs (A2) using Equation (6.7). Let the total lung area be denoted by T1.

211 AAT (6.7)

Step 4: Compute the percentage of the total affected region in the chest CT slice affected with pleural effusion using Equation (6.8)

1

1002%T

Aeffusionpleuralbyaffectedlungtheof (6.8)

Output

Percentage of the lungs affected by pleural effusion.

152

6.2.2 Algorithm to Compute the Percentage of Severity in Both

Lungs Affected by Pneumothorax

The extent to which the left and right lungs are affected by

pneumothorax is determined using the algorithm given below.

Input

Segmented lungs affected by pneumothorax and extracted ROIs of

pneumothorax (Output of segmentation of lungs affected by pneumothorax

and ROI extraction of pneumothorax processes).

Process

Step 1: Enclose each of the segmented left and right lungs affected by

pneumothorax (PT3) within bounding boxes. Compute the area of

the left and right segmented lungs within the bounding boxes.

Denote this area as A3.

Step 2: Label the ROIs of pneumothorax (PT6) and enclose them within

bounding boxes. Compute the area of the extracted ROIs of

pneumothorax. Denote this area as A4.

Step 3: Compute the total area of both the left and right lungs affected by

pneumothorax. Denote this area as T2. When the CT slices that are

affected with pneumothorax are segmented, the right and left lungs

along with the pneumothorax regions are extracted. This indicates

that the area A3 computed in Step 1 is the total lung area T2 and is

given by Equation (6.9).

32 AT (6.9)

153

Step 4: Compute the percentage of the lug region in the chest CT slice

affected by pneumothorax using Equation (6.10).

2

1004%T

Aaxpneumothorbyaffectedlungtheof

(6.10)

Output

Percentage of lungs affected by pneumothorax.

6.2.3 Algorithm to Compute the Percentage of Severity in Individual Lungs Affected by Pleural Effusion

The percentage of the individual left and right lungs that are

affected by pleural effusion is determined. This indicates the extent to which

either the left or right lung is affected by the pleural infection as pleural

effusion may affect only the left or right lung and in some cases both lungs.

Hence this algorithm will automatically compute the extent to which one or both of the lungs are affected by the disease.

Input

Segmented lungs affected by pleural effusion and extracted ROIs of

pleural effusion (Output of segmentation of lungs affected by pleural effusion

and ROI extracton of pleural effusion processes).

Process

Step 1: Compute the centroid of the output PE3 (extracted in Section

6.1.1.1). The connected component to the left (or lesser than) of the

centroid is the left lung and that on the right (greater than) of the

154

centroid is the right lung. Compute the area of the left lung that of

the right lung. Denote the computed areas as S1and S2.

Step 2: Label the ROIs of pleural effusion (PE10) and enclose them within

bounding boxes.

Step 3: Compute the centroid of the output PE10. If the ROI lies to the left

of the centroid, it indicates that the ROI corresponds to the left lung

and if the ROI lies to the right of the centroid it corresponds to the

right lung.

Step 4: Compute the area of the ROI of the left lung and denote the area as

RPE1 and compute the area of the ROI of the right lung and denote

it as RPE2.

Step 5: Calculate the percentage to which each lung is affected by pleural

effusion using Equations (6.11) and (6.12).

11

1001%SRPE

RPEeffusionpleuralbyaffectedlungleftof (6.11)

22

1002%SRPE

RPEeffusionpleuralbyaffectedlungrightof (6.12)

Output

Percentage of the individual lungs affected by pleural effusion.

6.2.4 Algorithm to Compute the Percentage of Severity in Individual

Lungs Affected by Pneumothorax

The extent to which the individual left and right lungs are affected

by pneumothorax is also determined. The following algorithm will automate

155

the computation and indicate whether only the left, right or both the lungs are

affected by the disease.

Input

Segmented lungs affected by pneummothorax and extracted ROIs of pneumothorax (Output of segmentation of lungs affected by pneumothorax and ROI extracton of pneumothorax processes).

Process

Step 1: Compute the centroid of the output PT3. The connected component to the left (lesser) of the centroid is the left lung and that on the right (greater) of the centroid is the right lung. Compute the area of the left lung and denote it as S3 and compute the area of the right lung and denote it as S4 respectively. (Area S3 and S4 are inclusive of the ROI regions).

Step 2: Label the ROIs of pneumothorax (PT6) and enclose them within bounding boxes.

Step 3: Compute the centroid of the output PT6. If the ROI lies to the left of the centroid, it indicates that the ROI corresponds to the left lung. If the ROI lies to the right of the centroid it corresponds to the right lung.

Step 4: Compute the area of the ROI of the left lung and denote it as RPT1 and the area of the ROI of the right lung and denote the area as RPT2.

Step 5: Calculate the percentage to which each lung is affected by pneumothorax using Equations (6.13) and (6.14).

% of left lung affected by pneumothorax3

1001S

RPT (6.13)

% of right lung affected by pneumothorax4

1002S

RPT (6.14)

156

Output

Percentage of the individual lungs affected by pneumothorax.

6.3 RESULTS AND DISCUSSION

The proposed system was tested on a dataset of 965 slices taken

from 96 CT scans (around 10 slices per CT scan). 479 slices formed the

training dataset and 435 slices were used to test the system. The CT scans

were taken from patients affected by pleural effusion, pneumothorax, normal

lung and from those affected by other chest diseases. Table 6.1 lists the details

of the dataset.

Table 6.1 Dataset used for Testing the CAD System

Class Type Training Testing Validation

Normal 130 117 15

Other Slices 118 105 13

PE Slices 126 113 11

PT Slices 105 100 12

Total Slices 479 435 51

The segmentation and the ROI extraction processes are illustrated

for both pleural effusion, pneumothorax and other slices in Figures 6.6 to

6.21. The segmentation technique for pleural effusion is first applied to all the

slices. This is followed by the application of the segmentation technique for

pneumothorax. Similarly the ROI extraction technique for pleural effusion is

first applied to all the segmented lung CT slices followed by the ROI

extraction of pneumothorax.

157

The grayscale chest CT slices from the three classes

Pneumothorax, Pleural Effusion and other diseases are shown in Figure 6.6.

(a) Slice with Pleural Effusion

(b) Slice with Pnemothorax

(c) Slice with other diseases

Figure 6.6 Original grayscale CT slices

158

6.3.1 Extraction of Pleural Effusion Region

The grayscale CT slice is Gaussian filtered and Canny edge

detection is applied to it as illustrated in Figure 6.7.

(a) Canny edge detected pleural effusion slice

(b) Canny edge detected pneumothorax slice

(c) Canny edge detected CT slice with other diseases

Figure 6.7 Canny edge detection

159

The edge detected slice is complemented and mapped with the

original grayscale slice to get the lungs in different intensities as shown in

Figure 6.8. This output is called PE1.

(a) Mapped slice of pleural effusion

(b) Mapped slice of pneumothorax

(c) Mapped slice of other diseases

Figure 6.8 Mapping with original slice resulting in PE1

160

PE2 as shown in Figure 6.9.

(a) Thresholding of slice with pleural effusion

(b) Thresholding of slice with pneumothorax

(c) Thresholding of slice with other diseases

Figure 6.9 Otsu's Thresholding on grayscale slice resulting in PE2

161

The thresholded slice is mapped with PE1 to get the segmented

lungs as shown in Figure 6.10. This output is called PE3.

(a) Segmented lungs of slice with pleural effusion

(b) Segmented lungs of slice with pneumothorax

(c) Segmented lungs of slice with other diseases

Figure 6.10 Segmented lungs resulting in PE3

The thresholded slice from Figure 6.9 is complemented and the

borders are removed. After the borders are removed the slice is again dilated,

162

closed and added with Figure 6.10 to get a white outline around the lungs as

shown in Figure 6.11.

(a) Addition process in slice affected with pleural effusion

(b) Addition process in slice affected with pneumothorax

(c) Addition process in slice affected with other diseases

Figure 6.11 Addition process resulting in PE6

The output slice in Figure 6.11 is scanned in both directions and the

pixels in the range 128 to 255 are made white. This extracts the ROI for

163

pleural effusion present in the left lung, along with some connected pixels as

shown in Figure 6.12.

(a) ROI regions extracted after scanning a slice with pleural effusion

(b) ROI regions extracted sfter scanning a slice with pneumothorax

(c) ROI regions extracted sfter scanning a slice with Other diseases

Figure 6.12 Extracted ROI regions after scanning the lungs

164

All small connected pixels are removed to obtain the pleural

effusion region, which is enclosed within a bounding box as shown in

Figure 6.13.

(a) Extracted ROI of pleural effusion

(b) No ROI extracted from a slice with pneumothorax

(c) No ROI extracted from a slice with other diseases

Figure 6.13 Extracted ROIs of pleural effusion

165

6.3.2 Extraction of Pneumothorax Region

The preprocessed grayscale slice is thresholded using iterative

thresholding as shown in Figure 6.14.

(a) Thresholding of a slice with pleural effusion

(b) Thresholding of a slice with pneumothorax

(c) Thresholding of a slice with other diseases

Figure 6.14 Iterative thresholding

166

The lung borders are cleared, holes are filled (PT1) and small

connected components (PT2) are removed as illustrated in Figure 6.15.

(a) Removal of connected components in a slice with pleural effusion

(b) Removal of connected components in a slice with pneumothorax

(c) Removal of connected components in a slice with other diseases

Figure 6.15 Removal of connected pixels resulting in PT2

167

The slice PT2 is now mapped to the original grayscale slice which

gives the segmented lungs for slices affected by pneumothorax as shown in

Figure 6.16.

(a) Segmented lungs of a slice with pleural effusion

(b) Segmented lungs with the pneumothorax region

(c) Segmented lungs of CT slice with other diseases

Figure 6.16 Segmented lungs for pneumothorax

168

The segmented lungs from Figure 6.16 are thresholded as shown in

Figure 6.17.

(a) Thresholding of segmented lungs with pleural effusion

(b) Thresholding of segmented lungs with pneumothorax

(c) Thresholding of segmented lungs with other diseases

Figure 6.17 Thresholding of segmented lungs

169

The resultant slice in Figure 6.17 is complemented as shown in

Figure 6.18.

(a) Complemented slice with pleural effusion

(b) Complemented slice with pneumothorax

(c) Complemented slice with other diseases

Figure 6.18 Complementing the slice

The complemented slice is mapped with PT1. This produces an

output where the pixels other than the ones present in the affected region start

merging with the black background. This is illustrated in Figure 6.19.

170

(a) Mapping of the slice with pleural effusion

(b) Mapping of the slice with pneumothorax

(c) Mapping of the slice with other diseases

Figure 6.19 Mapping the complemented slice with PT1

Small connected pixels are removed and the output is closed to

extract the diseased region as shown in Figure 6.20 where the region affected

by pneumothorax is displayed in white colour.

171

(a) Removal of connected components in a slice with pleural effusion

(b) Removal of connected components in a slice with pneumothorax

(c) Removal of connected components in a slice with other diseases

Figure 6.20 Removing connected components and closing PT3

This slice is mapped with the original grayscale slice to obtain the

ROI for pneumothorax as shown in Figure 6.21.

172

(a) No ROI extracted for a slice with pleural effusion

(b) ROI extracted for a slice with pneumothorax

(c) No ROI extracted for a slice with other diseases

Figure 6.21 ROI extracted for Pneumothorax

6.3.3 Severity Calculation

The percentage of the affected region in the lungs gives the severity

of the disease. Figure 6.22 to Figure 6.24 illustrate the percentage of severity

of the disease for pleural effusion, pneumothorax and normal CT slices. The

percentage of affected region in each lung is calculated separately and

displayed.

173

Figure 6.22 Illustration of the percentage of the lung affected by pleural effusion

Figure 6.23 Illustration of the percentage of the lung affected by pneumothorax

Figure 6.24 Illustration of the percentage of the normal lung affected by the pleural disorders

174

6.4 PERFORMANCE ANALYSIS OF THE PNN CLASSIFIER

The results of the PNN classifier have been validated using the

ground truth provided by the radiologist. The radiology report given by the

radiologist is taken to be the ground truth. The TP, TN, FP and FN are

computed based on the validation of the classifier output and the confusion

matrices are given in Tables 6.2 and 6.3 for pleural effusion and

pneumothorax respectively.

Table 6.2 Confusion matrix for pleural effusion

Classified

Actual

Pleural Effusion

(slices)

Others

(slices)

Pleural Effusion 97 (TP) 16 (FN)

Others 7 (FP) 280 (TN)

Table 6.3 Confusion matrix for pneumothorax

Classified

Actual

Pneumothorax

(slices)

Others

(slices)

Pneumothorax 92 (TP) 8 (FN)

Others 5 (FP) 285 (TN)

The performance metrics for the CAD system are computed in

Table 6.4 and Table 6.5 using Equations (3.1) to (3.10) from Chapter 3. The

results for pleural effusion of this proposed work is compared with the results

when ACM is used alongwith a B-spline curve for segmentation. The results

obtained for pneumothorax in the proposed work are compared with the

results obtained when the region growing algorithm is used for segmentation.

175

The results from Table 6.4 indicate that the proposed method has a

better performance when compared to the segmentation technique that was

implemented using ACM with B-splines for the extraction of pleural effusion.

The drawback of the ACM method was that it was not a completely

automated system.

From Table 6.4 it can be observed that the proposed method

performs better than the method in which ACM is used along with B-Spline

method. The accuracy, specificity, precision, sensitivity, NPV and PLR

values obtained for the proposed technique are higher than the corresponding

values obtained for the ACM method.

Table 6.4 Performance metrics of pleural effusion

S.No. Metrics Proposed Method

ACM with B-Spline Method

1 Accuracy 94.25 92.5

2 Specificity 97.5 96.17

3 Precision 93.26 89.52

4 Sensitivity 85.84 83.19

5 False Positive Rate 2.43 3.83

6 False Negative Rate 14.15 16.81

7 Negative Predictive Value 94.59 93.56

8 False Discovery Rate 6.73 10.47

9 Positive Likelihood Ratio 35.19 21.70

10 Negative Likelihood Ratio 0.14 0.175

The results in Table 6.5 are the performance measures computed

for the proposed technique for classification of pneumothorax and those that

were computed for the extraction of the ROIs of pneumothorax carried out

using region growing technique.

176

Table 6.5 Performance metrics of pneumothorax

S.No. Metrics Proposed Method

Region Growing Method

1 Accuracy 96.67 93.59

2 Specificity 98.27 95.52

3 Precision 94.84 87.13

4 Sensitivity 92 88

5 False Positive Rate 1.72 4.48

6 False Negative Rate 8 12

7 Negative Predictive Value 97.26 95.85

8 False Discovery Rate 5.15 12.87

9 Positive Likelihood Ratio 53.36 19.63

10 Negative Likelihood Ratio 0.08 0.126

It is observed in Table 6.5 that the proposed method performs better

than the method in which region growing algorithm is used for extracting the

pneumothorax region. The accuracy, specificity, precision, sensitivity, NPV

and PLR values obtained for the proposed technique are higher than the

corresponding values obtained for the region growing method.

The comparison of the performance of the CAD system is

illustrated in Figures 6.25 and 6.26 for pleural effusion and pneumothorax.

Accuracy, sensitivity, specificity, precision, NPV and PLR have higher values

for the proposed work and FPR, FNR, FDR and NLR values are lower values

in comparison with existing techniques that have been applied to the CAD

system.

177

(a)

(b)

Figure 6.25 Comparison of the classifier performance of pleural effusion implemented using the proposed technique and ACM technique

0

25

50

75

100

Performance Metric

Pleural Effusion Classification

Proposed Method

ACM with B-SplineMethod

0

5

10

15

20

FPR FNR FDR NLR

Performance Metric

Pleural Effusion Classification

Proposed Method

ACM Method

178

(a)

(b)

Figure 6.26 Comparison of the classifier performance of pneumothorax implemented using the proposed technique and region growing technique

0

25

50

75

100

Performance metric

Pneumothorax Classification

Proposed Method

Region Growing method

0

5

10

15

FPR FNR FDR NLR

Performance Metric

Pneumothorax Classification

Proposed Method

Region Growing method

179

6.4.1 Receiver Operating Characteristic Curve

The ROC curve is frequently used in medical decision making

(Fawcett 2006). ROC is a 2D graph that is plotted taking the TPR along the Y

axis and FPR along the X axis, for different values of neurons in the hidden

layer as illustrated in Figure 6.27 and Figure 6.28. The AUC is the region

within a unit square and hence its value will lie between 0 and 1. In this work

the AUC was found to be 0.9748 for pleural effusion and 0.9898 for

pneumothorax.

Figure 6.27 ROC curves for pleural effusion

180

Figure 6.28 ROC curves for pneumothorax

6.5 CONCLUSION

In this work a CAD system is developed for the classification of

pleural effusion and pneumothorax. The algorithms proposed in this work are

useful for extracting the affected regions in the lung CT. The extracted

affected regions are classified as pleural effusion or as pneumothorax using a

PNN classifier. The performance measures have been computed and the

classification results exhibit an accuracy of 94.25% for pleural effusion and

96.67% for pneumothorax. The sensitivity of the system was 85.84% and

92% and the specificity was 97.5% and 98.27% for pleural effusion and

pneumothorax respectively. The percentage of the disease in each lung is

computed. This will aid the radiologists in determining the severity of the

disease in each lung as well as cumulatively the extent to which both lungs

are affected by the pleural disorders.