A Computer-Aided Pipeline for Automatic Lung Cancer Classification on Computed Tomography Scans

Lung cancer is one of the most common cancer types. For the survival of the patient, early detection of lung cancer with the best treatment method is crucial. In this study, we propose a novel computer-aided pipeline on computed tomography (CT) scans for early diagnosis of lung cancer thanks to the classification of benign and malignant nodules. The proposed pipeline is composed of four stages. In preprocessing steps, CT images are enhanced, and lung volumes are extracted from the image with the help of a novel method called lung volume extraction method (LUVEM). The significance of the proposed pipeline is using LUVEM for extracting lung region. In nodule detection stage, candidate nodules are determined according to the circular Hough transform- (CHT-) based method. Then, lung nodules are segmented with self-organizing maps (SOM). In feature computation stage, intensity, shape, texture, energy, and combined features are used for feature extraction, and principal component analysis (PCA) is used for feature reduction step. In the final stage, probabilistic neural network (PNN) classifies benign and malign nodules. According to the experiments performed on our dataset, the proposed pipeline system can classify benign and malign nodules with 95.91% accuracy, 97.42% sensitivity, and 94.24% specificity. Even in cases of small-sized nodules (3–10 mm), the proposed system can determine the nodule type with 94.68% accuracy.


Introduction
Nowadays, lung cancer is one of the ranking first causes of mortality worldwide among men and women [1,2]. Although there are a lot of treatment options like surgery, radiotherapy, and chemotherapy, five year survival rate for patients is quite low [3]. However, survival rate may go up to 54% in case lung cancer is identified in an early stage [4]. erefore, early detection of lung cancer is vital to decrease lung cancer mortality.
Medical imaging techniques have been important technology in screening of lung cancer recently. CT scan becomes a standard modality for detecting and assessing lung cancer [5]. Most of the lung nodules are usually benign. However, some nodules such as calcified, swollen, and hard can also be determined as benign. Similarly, a hard nodule generally is cancerous (malignant), but it may be considered as benign case in some cases [6]. Furthermore, medical CT images are needed to be diagnosed by radiologists.
Computer-aided detection (CAD) systems have been an important field in medical image processing. CAD systems also based on machine learning methods designed to diagnosis of cancer have become common in recent years. Radiologists and physicians may use findings of CAD systems as the second opinion before making their own final decisions. erefore, CAD systems play an important role in CT scans to help radiologists for detection of lung cancer efficiently.
preprocessing, candidate nodule detection, feature extraction, and classification for nodule detection in chest radiographs [8]. Dehmeshki et al. detected lung nodules using shape-based genetic algorithm template matching [9]. Suarez-Cuenca et al. also designed a system which discriminates the nodules and non-nodule cases using iris filter in CT images [10]. Murphy et al. automatically performed lung nodule detection using k-nearest neighbours classifier [11]. Giger et al. realized CAD system to detect lung nodules on CT images using geometric features [12]. In addition, Hasegawa et al. proposed image processing methods for identification of lung nodules using CT scans [13]. In another study, Kanazawa et al. used a CAD system to identify pulmonary nodules with fuzzy features [14]. In 2005, Suzuki et al. proposed a method using ANN for classification of malignant and benign nodules on CT images [15]. Sun et al. compared support vector machines (SVM) with the some classification methods for detection of lung cancer on CT images [16]. Kuruvilla and Gunavathi proposed a system using ANNs for classification of lung cancer [17].
In a recent study on lung nodule detection, Javaid et al. proposed a computer aided nodule detection method for the segmentation and detection of challenging in different type nodules [18]. ur Rehman et al. presented a systematic analysis of nodules detection techniques with the current trends and future challenges [19]. Wang et al. proposed a pulmonary nodule CAD based on semisupervised extreme learning machine [20]. Xie et al. proposed an automated pulmonary nodule detection system with 2D convolutional neural network (CNN) on LUNA16 dataset [21].
In this study, we have proposed fully automated computer-aided pipeline for the detection of pulmonary nodules and classification of benign/malign nodules in early stage. e contributions of this paper are (1) to review the systematic literature review; (2) to present the state of the art detection of pulmonary nodules and classification of lung cancer; (3) to propose the novel preprocessing method (LUVEM) for the lung volume extraction; (4) to suggest a novel candidate lung nodule detection method using CHT; (5) to design a holistic pipeline for the detection of pulmonary nodules as well as lung cancer; (6) the detailed comparison of feature extraction methods for lung nodule detection; and (7) to perform the detailed performance evaluation, high true detection rate, and low false detection rate for nodule detection and classification.

Architecture of the Computer-Aided Pipeline
Designed pipeline consists of four main stages such as image preprocessing (Stage I), lung nodule detection (Stage II), nodule feature computation (Stage III), and nodule classification (Stage IV). e work flow of the pipeline is presented in Figure 1.

Lung Image Preprocessing.
In the first step of the image preprocessing stage, reading of CT images is performed. e CT scans obtained for the work are stored as DICOM (Digital Imaging and Communications in Medicine) files [22]. e goal of image enhancement step is to prevent misleading results that may occur in subsequent processes. us, we firstly implemented the median filter to remove unnecessary noises and enhance the images. Moreover, the sharpening of nodule contours is an important step for the detection of nodules. Laplacian filter was used in our study. So, nodules on lung region were able to be detected more accurately. Furthermore, histogram equalization was also used in enhancement step in order to minimize contrast differences which occur due to scanning errors and to remove unnecessary grains.
In lung volume extraction step of image preprocessing stage, extracting of the lung region from CT image is performed.
ere are many methods for extracting lung volume from a lung CT scan [9,10,[23][24][25]. However, these methods are complex, and they require more processing overhead. In some cases, these methods may lead to losses of information about lung regions or cause noise. e purpose of this step is to extract the lung region completely from the full lung CT image. erefore, a simple but effective and novel method has been proposed in this study for lung volume extraction named as lung volume extraction method (LUVEM). e pseudocode of LUVEM is shown in Algorithm 1.
In LUVEM method, lung lobes are extracted from CT images with the help of morphological operations. LUVEM removes unrelated segments on the sides and edges of the preprocessed image and obtain the lung region successful. In the algorithm, input image is firstly converted to doubleformatted image. Afterwards, 1 or 0 values are assigned to each pixel of double-formatted image according to low and high threshold values. e low and high threshold values are determined 0.25 and 0.65 in this algorithm, respectively. e method removes the bright areas on the edges of the lung CT image since their average values change between low and high values. After this process, the image is converted to binary format and performed morphological operations which are eroding, dilating, and filling, respectively. Finally, the image is again converted to gray-scale format.
e segmentation examples of LUVEM can be seen in Figure 2. It is clearly seen that LUVEM can successfully extract the lung volume. In addition, quantitative evaluation of LUVEM will be reported below.

Lung Nodule Detection.
e first step of lung nodule detection is candidate nodule detection. e nodule candidates in volume should be detected before nodule segmentation. e lung volume includes vessels and nodules. Moreover, the density of nodules, vessels, and lungs is different from each other [26]. Since the lung nodules have a circular and helical structure, they can be differentiated by means of circularity determination. Many methods have been suggested for identifying the round objects. Circular Hough transform (CHT), which proposed by Duda et al. [27], is one of the most successful method [28] for detection of round objects on the images. In this study, CHT operations are used for candidate nodule detection. CHTcan detect the round object in the image; moreover, it can also detect the noncircular object by means of some operations. e image dataset is divided into 3 categories according to the nodule size such as <10 mm, 10-20 mm, and >20 mm. In order to detect the nodules in different size by CHT, three minimum and maximum radiuses such as 3-12 mm, 10-20 mm, and 15-45 mm are determined. In Figure 3, it is shown that the examples of determination of candidate nodules on CT images. e second step of lung nodule detection is nodule segmentation. In this study, SOM [29] is proposed to segment nodules on CT images. SOM is an unsupervised neural network learning [30] method. It can perform on large/complex datasets [31,32]. Furthermore, it designs data maps that can be interpreted easily. In addition to these advantages, SOM can easily segment very small nodules on the lung CT images [3]. e examples of segmented lung nodule images using SOM are shown in Figure 4.  (1) procedure LungVolumeExtraction(input image, low, high) //beginning lung vol. extraction algorithm (2) I

Journal of Healthcare Engineering
CT images to discriminate benign or malign nodule. Firstly, we used shape-based features for analyzing nodule geometry. We used first-order statistical features to obtain global statistic about nodule region. Moreover, we utilized gray level co-occurrence matrix (GLCM) texture features for gray level statistic of nodules. Finally, we extracted wavelet decomposition transform features to obtain the energy feature of nodules. All computed features are extracted from the slice of the segmented object.
First-order statistical features (SSF) of an image are calculated from the gray level histogram values of an image [33]. In this study, 6 basic features such as standard deviation, entropy, means, skewness, kurtosis, and variance were extracted by SSF using the histogram values of a gray level lung CT image. Shape-based features (SBF) allow feature extraction from the image by using geometric parameters [34]. Shape features give some information about an image such as sharpness, circularity, and convexity. In  this study, a total of 16 shape features were extracted to facilitate the determination of nodule type from CT lung images. Statistical features of a gray level image (GTF) of a texture are first derived with the help of GLCM texture features proposed by Haralick [35,36]. GLCM method shows the relationship between pixels of different gray level and is widely used in applications of medical image processing. In this study, a total of 88 features were extracted with GLCM from 0°, 45°, 90°, and 135°angle directions in d � 2 distance. Wavelet decomposition transform can denote distribution of energy features of different regions (TEF). ROI of the CT image is divided into four subbands with 2D wavelet decomposition. ree images are created in low frequencies, and an image is created in high frequencies with wavelet decomposition transform from an image [37]. In this study, 13 energy features of an image are extracted with wavelet decomposition. e number of features extracted by each feature extraction method used in this study is presented in Table 1.
On lung CT images, malign nodules are generally more complex and irregular, while benign nodules are rounder with certain borders. Most of the benign nodules have small variance values. However, malign nodules show relatively higher variance values [3]. Figure 5 shows the examples of benign and malign lung nodules on CT images.
Since 123 features extracted are rather large in size, they may negatively affect accuracy during classification step.
us, selecting the most appropriate features instead of using all features will be a more efficient method. We used PCA method for dimension reduction of feature vector.
PCA is used to reduce dimensionality of large dataset [38,39]. We can select a number of features only up to onethird of the number of data (patterns) in the smaller of the two classes. us, for our work, the smallest class has 104 patterns (benign nodules), and since we split the data to half, one-third of 52 is around 17. erefore, we selected with PCA the most appropriate 17 features (components) from 123 features. Figure 6 denotes principal component analysis of extracted features with cumulative variance. As can be seen from the chart in Figure 6, it is seen that the variance of the first 20 components is more selective.

Nodule Classification.
In the proposed pipeline, we have used a probabilistic neural network (PNN) model to make automated decision about the nodule types (benign or malignant). PNN is an effective tool for many classification implementations and can easily make classifications [40,41]. Figure 7 presents the architecture of the PNN designed for this study. Neuron number in the input layer is selected 17 according to the number of inputs.

Experimental Results
In this work, we realized all experiments using a PC with i7 processor, 16 GB memory, and Windows 10. Moreover, MATLAB software was used for performance evaluation of the proposed pipeline. In all experiments, leave-one-out cross validation technique was run at the level of nodule. So, all of 220 nodules (104 benign and 116 malignant) were used for both trainings and tests. Figure 8 summarizes the processing steps of the proposed pipeline.

CT Lung Dataset.
In this study, an image dataset was prepared for the proposed pipeline. CT examinations were realized by using a helical CT scanner from Sincan Nafiz Korez Hospital. Its acquisition parameters are slice collimation 1.0 mm and slice width 1 mm. Scans were acquired in 130 kV and 75 mAs. e size of the images was 512 × 512 pixels. e images were stored as DICOM format files. e database consists of 47 CT scans from 47 different patients. 35 of volunteer patients are male and remaining of them are female. eir ages are between 30 and 79 (mean 58.7 ± 10.5 years). All patients agreed that they have a legal and moral right to accurate and reliable information for the scan. ese patients should be given clearly the diagnosis and prognosis with a simple language. ere are a total of 9504 CT modality images in the database, and the number of CT slices per scan varies between 116 and 283. After the CT scan, the physician provided the selection of the slice where the nodule is fully visible. 1128 ROI, which includes a total of 220 nodules (104 benign and 116 malignant), were selected from 9504 CT images with the help of a lung physician and three experienced radiologists in the lung parenchyma. is process has been conducted by means of an annotation tool. e nodules were also approved by biopsy. Sizes of nodules change from 3 to 65 mm in diameter. e size distribution of the nodules is shown in Figure 9.

Validation of LUVEM with Evaluation Metrics.
Proposed lung volume extraction method (LUVEM) in this study is compared with the standard manual segmentations using measurement metrics. We evaluate manual segmentations of the expert and automated segmentations of LUVEM using two popular overlap measures. We used a segmentation software tool developed by us for manual segmentation on the dataset. e software tool outlines edges automatically, presenting us to obtain contours of the nodule boundaries. e metrics evaluate the overlapping between the two sets. e first overlap metric, represents the  Jaccard coefficient (union overlap), defined as intersection over manual and automatic segmentations and measures the similarity of the S1 and S2 sets [42]. Our second overlap metric, the Dice coefficient (mean overlap), gives double the weight to agreements between the two sets [43]. Jaccard and Dice metrics are denoted in the following equations:  We show the overlap metrics (Jaccard and Dice) that result from both LUVEM and Otsu's method. ese results are the comparison of automated segmentations of LUVEM and Otsu methods with manual segmentation on 254 lung CT image in our database. e results in Table 2 showed LUVEM is higher in Jaccard overlap (0.867) and Dice overlap (0.938) than Otsu's method.

Detection Rates.
Confusion matrixes of classification results with PNN according to each feature extraction and PCA method are presented in Table 3. As shown in Table 3, the usage of PCA affects the detection performance of the pipeline positively. Moreover, the usage of combined features extraction methods with PCA gives best success rate. Table 4 presents the values of performance criteria obtained in the classification results of the proposed pipeline when feature extraction methods were used separately and together. According to the table, performance values are more successful when all feature extraction methods are used together. Accuracy (Acc) was found to be 92.27% when 123 features were used in classification without feature selection through PCA, and this rate was found to be 95.91% with the use of PCA. Similarly, more successful results were obtained in sensitivity (Sen), specificity (Spc), positive decision value (PDV), negative decision value (NDV), and F1 score criteria as presented in Table 4.
Since our CT image database was divided into 3 groups according to the size of nodules such as <10, 10-20, and> 20 mm, we also realized a performance evaluation according to size group of the nodules. ese experiments were realized with all together feature extraction method using PCA. Table 5 presents the result of detection performance depending upon nodule size. As shown in Table 5, the proposed pipeline can classify even small nodules with high success rates. Overall detection result of proposed pipeline according to the nodule size is 95.91%.
Receiver operator characteristic (ROC) curve is another popular performance evaluation criteria used in detection systems. Area under an ROC curve is measured according to sensitivity and specificity values of system. is area shows how the system is successful. erefore, we also present ROC curve of our proposed detection system. Figure 10 shows ROC curve of the system obtained classification results of each lung nodule group and overall system. As seen in this graphic, area under ROC curve and true positive rate of small size nodules are lower than big size nodules. Here, as can be seen from this figure, if the nodule size is too large and too small, the success rate decreases.
Processing time is another performance criterion that we have used for the evaluation of the proposed pipeline. Longest time is needed for nodule detection step due to the use of SOM method for segmentation. Since SOM is an ANN model, it has a lot of time-consuming mathematical operations. In average, classification of a CT image as benign or malignant takes 2-3 seconds approximately. It can be accepted as a reasonable time period when it is compared with the time it needs for a physician to make decisions.

Conclusions and Discussion
In this study, a fully automated pipeline was proposed to classify benign and malign lung nodules on CT images. By means of the designed pipeline, nodule detection as well as benign/malign distinction was performed with high accuracy, sensitivity and specificity rates. Moreover, it was designed a preprocessing method called LUVEM for extracting the lung volume from CT images. SOM method was used to allow successful detection of lung nodules in early stages. According to the detailed experiment performed on large dataset with combined features, the proposed pipeline can differentiate benign/malign nodules with high accuracy rates such as 94.68% (3-10 mm), 96.92% (10-20 mm), and 96.25% (>20 mm) using PNN. e proposed pipeline can be used by the physicians as a supplementary tool for benign and malign nodule classification.
We evaluated the performance of the pipeline on Lung Imaging Database Consortium-Image Database Resource    Table 6. ere are some advantages of the proposed pipeline compared to the state-of-the-art systems. Firstly, the proposed pipeline has two diagnosis possibilities. It can perform nodule detection together with nodule classification. Second advantage of the proposed pipeline is to provide the detection of small nodules in the lung with the use of SOM     is is remarkable in terms of early detection of lung cancer. ird advantage of the proposed pipeline is to have relatively high detection performance. Accuracy, sensitivity, and specificity of the system were calculated as 95.91%, 97.42%, and 94.24%, respectively. It is fairly difficult to compare formerly reported CAD systems due to different datasets, nodule types, sizes, and validation methods. We picked out some CAD systems to compare their performances. Some of them [23,24,[44][45][46] used the LIDC database [47][48][49], and the other used their own databases. Table 7 denotes the comparison of the proposed pipeline with some CAD systems. When the results are analyzed, our pipeline has high sensitivity on our CT image dataset.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e author declares that there are no conflicts of interest regarding the publication of this paper.