Computerized margin and texture analyses for differentiating bacterial pneumonia and invasive mucinous adenocarcinoma presenting as consolidation

Radiologists have used margin characteristics based on routine visual analysis; however, the attenuation changes at the margin of the lesion on CT images have not been quantitatively assessed. We established a CT-based margin analysis method by comparing a target lesion with normal lung attenuation, drawing a slope to represent the attenuation changes. This approach was applied to patients with invasive mucinous adenocarcinoma (n = 40) or bacterial pneumonia (n = 30). Correlations among multiple regions of interest (ROIs) were obtained using intraclass correlation coefficient (ICC) values. CT visual assessment, margin and texture parameters were compared for differentiating the two disease entities. The attenuation and margin parameters in multiple ROIs showed excellent ICC values. Attenuation slopes obtained at the margins revealed a difference between invasive mucinous adenocarcinoma and pneumonia (P<0.001), and mucinous adenocarcinoma produced a sharply declining attenuation slope. On multivariable logistic regression analysis, pneumonia had an ill-defined margin (odds ratio (OR), 4.84; 95% confidence interval (CI), 1.26–18.52; P = 0.02), ground-glass opacity (OR, 8.55; 95% CI, 2.09–34.95; P = 0.003), and gradually declining attenuation at the margin (OR, 12.63; 95% CI, 2.77–57.51, P = 0.001). CT-based margin analysis method has a potential to act as an imaging parameter for differentiating invasive mucinous adenocarcinoma and bacterial pneumonia.


Introduction
The International Association for the Study of Lung Cancer, the American Thoracic Society, and the European Respiratory Society have recommended changing the term "mucinous bronchioloalveolar carcinoma" to "mucinous adenocarcinoma" [1]. This entity differs from the PLOS  mucinous type of adenocarcinoma in situ or minimally invasive adenocarcinoma by having a focus of invasion >5-mm and size >3-cm [1]. Because of the bronchogenic dissemination and air space spread of the invasive mucinous adenocarcinoma, it is not easily differentiated radiologically from pneumonia [2][3][4]. Even in terms of clinical characteristics, the substantially overlapping conditions are always challenging for clinicians and radiologists. If we could differentiate malignancy and pneumonia in a quantitative manner, it would benefit decisions on appropriate treatment. Previous quantitative CT studies have analyzed the internal texture of nodules and mass [5][6][7]. Radiologists have typically used margin characteristics based on routine visual analysis; however, the attenuation changes at the margin of the lesion in CT images have not been quantitatively assessed. In this study, we investigated visual and texture analyses to compare invasive mucinous adenocarcinoma presenting as consolidation and bacterial pneumonia. Also, we established a margin analysis method by comparing target lesions with normal lung attenuation, drawing a linear slope to represent the attenuation changes.

Materials and methods
This retrospective study was approved by Asan Medical Center institutional review board (approval 2015-1312) with waiver of the requirement for patients' informed consent.

Study population and design
We searched the pathology database at our institution from Jan 2005 to April 2015 and found 278 consecutive patients who were pathologically diagnosed as having invasive mucinous adenocarcinoma of the lung. Patients who have other possible causes of consolidation including infection or other tumors were excluded. The diagnosis was made by bronchoscopic biopsy or bronchoalveolar lavage (n = 11), wedge resection or lobectomy (n = 103), and fluoroscopic or CT-guided transthoracic core needle biopsy (n = 164). To identify the invasive mucinous adenocarcinoma showing consolidation on CT, 203 patients were excluded for the following reasons: mass or nodule type (n = 191), ground-glass opacity (GGO) type (n = 8), unavailable preoperative CT scan (n = 3), and co-existing lung metastasis from colon cancer (n = 1). Unenhanced CT (n = 2) and outside hospital CT examinations (n = 21) were also excluded so that finally 52 patients with invasive mucinous adenocarcinoma remained in the study (Fig 1).
In addition, we searched culture databases and electronic medical records to identify consecutive patients with proven pneumococcal or Klebsiella pneumonia who had enhanced CT examinations between Jan 2005 and Dec 2014. The diagnosis of pneumonia was based on bacteremia (n = 42) or culture of expectorated or endotracheal aspiration sputum (n = 41). In our hospital, we routinely obtain three blood culture bottles from a patient who is suspected to have pneumonia. If there were more than two bottles of positive blood cultures, it was considered as true positive result. Also, we routinely perform repeated blood culture or sputum study if it is clinically suspected as contamination. Sputum cultures in 41 patients were performed with adequate specimens (> 25 polymorphonuclear cells per low power field) and < 10 squamous epithelial cells per low power field). Finally, 45 pneumonia patients showing air-space consolidation on enhanced CT were included in the study. Clinical data including patient demographics, symptoms, laboratory findings, and date of initial CT scan were collected using our electronic medical record system. The initial CT scans were analyzed visually and quantitatively. To obtain the parameters of CT-based texture and margin analyses, 1-mm slice thickness CT images were used, and 16 patients without 1-mm thickness CT images were excluded. In 81 CT examinations obtained with identical CT settings, the margins of 11 lesions could not be drawn because they abutted a fissure or adjacent structures or because of atelectasis (n = 9) or underlying severe emphysema (n = 2). Forty cases of invasive mucinous adenocarcinoma and 30 with pneumonia were used to compare the margin-based analysis (Fig 1).

CT image acquisition
Chest CT examinations were made using two CT scanners: SOMATOM Sensation 16 (n = 21; Siemens Healthcare, Erlangen, Germany) and SOMATOM Definition AS (n = 64; Siemens Healthcare). The scan parameters for the CT scanners were identical to the standard setting for thorax: 120 kV, 100 effective mA with dose modulation, 3 / 5 mm thickness reconstruction interval without a gap by standard algorithm, and 1 mm thickness with 5 mm gaps by high-frequency algorithm. In all cases, 100 mL of intravenous iopromide 300 (300 mg I/mL; Ultravist, Bayer Pharma, Berlin, Germany) was administered at a rate of 2.5 mL/s using a power injector to obtain contrast enhancement images; an enhanced CT scan was obtained after a 50 s delay. All CT scans were obtained on axial images and reconstructed as coronal images. Mediastinal (width, 450 Hounsfield unit (HU); level, 50 HU), lung (width, 1500 HU; level, -700 HU) and bone (width, 1000 HU; level 200 HU) windows were reviewed on the picture archiving and communication system (PACS).

CT visual analysis
Two independent thoracic radiologists (M.Y.K., 20 years' experience in thoracic radiology; H. X., fellowship-trained thoracic radiologist), blinded to the clinical and image analysis data except for the fact that the patient was included in the study, evaluated CT images using a PACS workstation. The final results of the visual analyses were reached in consensus. CT characteristics were thoroughly reviewed: 5-lobar location, lesion homogeneity referent to muscle, ill-defined margin, presence of cavity formation, internal bubble lucency, necrosis, open bronchus or vessel sign resulting from pulmonary vessels preserved within the consolidative lesion, fissure bulging, local pleural thickening, pleural retraction, adjacent GGO foci, concurrent bronchial wall thickening, interlobular septal thickening, centrilobular nodules (<1 cm), macronodules (>1 cm diameter), multiplicity, and presence of effusion [8; 9]. The conclusions of formal reading of the CT scans were recorded and divided into three categories: correct as first diagnosed, suggested from differential diagnosis, and incorrect diagnosis. CT visual analysis findings of all patients are included in S1 File. The minimal data for CT margin and texture analyses obtained from one ROI per patient are included in S2 File.

CT margin analysis
To obtain CT-based margin features, the digital imaging and communications in medicine (DICOM) data from CT scans were computed using an in-house developed software based on plug-in package for ImageJ (Bethesda, Maryland; http://rsbweb.nih.gov/ij/). To reduce selection bias, two ROIs (>20 pixels) with direction perpendicular to the margin of lesion were drawn at random (Fig 2). The selected areas were plotted as linear pixels and the attenuation slope was obtained from each straight line. To show the transition at the margin, the ROI should include both normal lung parenchyma and a part of the target lesion; thus, not all boundary regions could be selected. For example, if a target lesion was located near the fissure or chest wall, the part of the boundary near the adjacent structures could not reveal the transition to normal lung. Similarly, parts of a lesion with adjacent vessels or bronchi could not be used for the same reason.
In the ROI, pixel attenuation from the lesion to normal lung was plotted as a graph, and the mean and maximal slopes among the pixels were obtained (Figs 2D and 3D). The selected pixel numbers were 5, 7 and 9 pixels, and average values of multiple slopes of the pixel attenuations were also calculated (Figs 2E and 3E). The less steeply the attenuation slope declines from lesion to normal lung, the more the margin is regarded as fading out gradually. In contrast, the steeper the slope, the more distinct and rapid the attenuation of the transition from lesion to normal lung.
The correlations of the margin-based features obtained from two ROIs were obtained, and the mean values of the two ROIs were used as final values for a target lesion. The ROIs for margin-based analysis were drawn by two radiologists (H.J.K. and H.X. with 2 years of experience in thoracic radiology) in consensus and confirmed by an experienced radiologist (M.Y.K.). ROIs were semi-automatically selected by clicking a part of a lesion. Margin-based features were automatically computed to obtain the attenuation slopes from lesion to normal lung. The slope represents the gradient of attenuation transition at the margin of a target lesion. The two ROIs were drawn in 1-mm CT images, to avoid summation of attenuation values when using thicker slices.
To obtain CT texture-based features, DICOM data of CT scans were loaded and computed using ImageJ program. To reduce selection bias, three round ROIs (20 pixels) were randomly drawn within representative slices of consolidations (Fig 4). The correlation of texture features obtained from the ROIs was calculated and the mean value of the ROIs was used as a final value for the target lesion. The ROIs for texture analysis were drawn by two radiologists (H.J.K. and H.X.) in consensus and confirmed by an experienced radiologist (M.Y.K.). ROIs were semiautomatically selected by clicking parts of a lesion on 1-mm thickness CT images. In selection of ROIs, pulmonary vessels, bronchus, cavities, and adjacent chest wall were avoided. Texture parameters measured were attenuation, skewness, kurtosis, and entropy. Skewness was defined as the degree of asymmetry of a pixel distribution and calculated as E XÀ m s À Á 3 h i , where X = attenuation, σ = mean of attenuation, and μ = standard deviation of attenuation. Kurtosis was defined as the magnitude of the pixel distribution and calculated as k ¼ EðxÀ mÞ 4 s 4 À 3, where x = attenuation, σ = mean of attenuation, and μ = standard deviation of attenuation. Entropy was described as degree of randomness in the ROI, and noted as P n i¼1 pðx i Þ log pðx i Þ, where, x i = frequency from histogram of ROI and p(x i ) = probability on histogram. The values were derived automatically using ImageJ software.

Statistical analysis
Categorical variables are given as numbers and percentages, continuous variables as mean and standard deviation. Student t-test and the Chi square test were used to compare patient characteristics, CT visual analysis, texture and margin analyses results between invasive mucinous adenocarcinoma and bacterial pneumonia. Inter-value correlations among ROIs were obtained from intraclass correlation coefficients (ICCs). Receiver operating curves to demonstrate the diagnostic performances of the attenuation slopes at the margin of lesions for differentiating invasive mucinous adenocarcinoma and pneumonia were obtained. To classify  the patients into two groups using a binary slope cut-off, one of the receiver operating curves with the highest area under the curve was selected to define the cut-off value of the slope with optimal sensitivity and specificity. Univariate and multivariate logistic regression analyses were used to identify independent factors among the results for CT visual assessment, CT texture, and binary slope for differentiating invasive mucinous adenocarcinoma and pneumonia. SPSS version 21.0 (SPSS Inc., Chicago, IL, USA) was used for all statistical analyses.

Clinical characteristics
Patients' clinical characteristics, including smoking history, concomitant chronic respiratory disease, and co-morbidities such as chronic heart failure, diabetes, and liver cirrhosis, together with the initial presenting symptoms and laboratory findings are shown in Table 1. The duration from the initial onset of symptoms in patients with invasive mucinous adenocarcinoma was relatively long compared with the pneumonia patients (P <0.001). Symptoms such as fever, chest pain, sputum, and dyspnea were more frequently observed in pneumonia patients. White blood cell counts and C-reactive protein levels were also significantly higher in pneumonia patients. However, symptom durations, white blood cell counts, and C-reactive protein levels overlapped in parts of the population of the two groups.

CT visual analysis
The results of visual assessment of CT findings in the study patients were noted in Table 2. Of the 52 CT scans showing invasive mucinous adenocarcinoma, 44% were correctly diagnosed as lung cancer at first impression; lung cancer and pneumonia were suggested as differential diagnoses in a further 42%; the remaining seven cases (14%) were misdiagnosed as pneumonia. Among the 45 cases of pneumonia, 35 (78%) were correctly diagnosed as pneumonia at first impression; nine cases were suggested as pneumonia or lung cancer as differential diagnoses; one case was misdiagnosed as fungal infection.

CT margin analysis
The maximum attenuation transition slopes at the margin of the 5-pixel, 7-pixel, and 9-pixel distributions on histograms were automatically calculated and the average values of the slopes were obtained. Inter-ROI agreements for slopes were high 0.82-0.85 (P<0.001) ( Table 3). In comparisons of invasive mucinous adenocarcinoma and pneumonia, all measured slopes of the variable pixel numbers at the margins were significantly different, and invasive mucinous adenocarcinoma had slopes that declined more steeply than those of pneumonia (Table 4). In the receiver operating curves of attenuation slopes to differentiate the two disease entities, the C-indices for the graphs were 0.72-0.75 and the highest value was noted for the 7-pixel maximal slope (Fig 5). At a cut-off slope value of -154.21, sensitivity of 86.7% and specificity of 67.5% were noted for the diagnosis of invasive mucinous adenocarcinoma using the 7-pixel maximal slope. Using that cut-off value of -154.21, all patients were classified into two groups.

CT texture analysis
Using 81 CT examinations (43 invasive mucinous adenocarcinoma, 38 bacterial pneumonia) obtained with identical CT settings, three ROIs per lesion were chosen. Inter-ROI agreement for attenuation was high in 1-mm thickness CT images (0.96, P<0.001). For skewness (0.54, P<0.001) and kurtosis (-0.06, P = 0.06), the agreements among the three internal ROIs were not good. On univariate logistic regression analysis, no CT texture parameters were significant in differentiating invasive mucinous adenocarcinoma and bacterial pneumonia.

Discussion
Because of substantially overlapping clinical characteristics, including symptoms such as cough and sputum, differentiation of invasive mucinous adenocarcinoma and pneumonia is not always easy [2][3][4]. When invasive mucinous adenocarcinoma presents as multifocal lesions, it can mimic pneumonia, and delayed diagnosis with progression could result after treatment with antibiotics. Complicated bacterial pneumonia with resistance to antibiotics could also mimic malignancy. Previous studies for evaluating mucinous adenocarcinoma have used CT visual assessment [9][10][11][12][13]. If malignancy and pneumonia could be differentiated in a quantitative manner, both types of cases would benefit from it. On visual analysis of CT findings, pneumonia showed an ill-defined margin (odds ratio (OR), 4.84; P = 0.02) and ground-glass opacity (OR, 8.55; P = 0.003). In bacterial pneumonia, adjacent GGO foci around the consolidation may indicate multifocal pneumonia or inflammatory lesions. Although invasive mucinous adenocarcinoma also could present GGO by endogenous aspiration of mucin from the tumor cells, GGO was likely to be noted more frequently in pneumonia patients. Moreover, the attenuation slope at the margin of consolidation lesion in pneumonia had gradually declining attenuation (OR, 12.63; P = 0.001) compared to invasive mucinous adenocarcinoma.
Quantitative CT analysis has been developed in terms of shape-, texture-, and marginbased features. Shape-based parameters such as diameter, area, sphericity or lobulation of lesions are computed from 2-dimensional (D) or 3-D segmentation analysis [14][15][16]. Texturebased features such as skewness, kurtosis, and entropy are also used to differentiate malignancy or to monitor treatment responses [5; 17]. Several studies suggest margin-based features such as sharpness, acutance, and histogram spread of the average gradient (HSAG) of lesions to differentiate malignant and benign nodules [18; 19]. However, sharpness and acutance provide only boundary information without information on the continuous attenuation changes from lesion to normal lung, and HSAG shows only the average value of all boundary pixels of lesions.
Our study suggests that attenuation slopes are strong imaging markers for differentiation of invasive mucinous adenocarcinoma and bacterial pneumonia manifesting as air space consolidation. Because the margin is the battlefield of human body against cancer or pneumonia, margin sharpness and the attenuation distribution of the lesions are highly important and correlate well in discriminating tumor and inflammation on visual CT assessment. By measuring the attenuation slope at the margin of lesions, our findings introduce CT margin analysis as a potential biomarker for differentiating invasive mucinous adenocarcinoma and pneumonia manifesting as air space consolidation. Bacterial pneumonia has an ill-defined margin with large gray zone; in contrast, consolidative malignancy has a relatively distinct attenuation difference compared with normal lung, with a narrow gray zone at the margin. This may be because bacterial pneumonia involves relatively active changes caused by acute inflammatory cells in the lung compared with cancer, which replaces normal lung by growing cancer cells.
In terms of the CT setting for quantitative analysis, a previous study showed that reconstruction algorithm used affects the results of quantitative imaging analysis on CT [20]. In this study, we used 1-mm thickness images with high frequency kernel to obtain texture analysis results, and skewness and kurtosis gave different values among the ROIs even in a same lesion. This suggests that not only image thickness or reconstruction kernel but also selection bias may affect the results of texture analysis. However, the margin analysis method was quite reproducible in our study, with high ICC values.
Our study has several limitations. First, it was retrospective study at a single tertiary center. A prospectively designed larger cohort study would be necessary to confirm the preliminary results of the margin analysis method. Second, we included pneumococcal and Klebsiella The C-indices for the graphs are 0.72-0.75, and the highest value is noted at the 7-pixel maximal slope. At a cut-off slope value of -154.21, sensitivity was 86.7% and specificity was 67.5% for the diagnosis of invasive mucinous adenocarcinoma using the 7-pixel maximal slope. max., maximal; avg., average. https://doi.org/10.1371/journal.pone.0177379.g005 pneumonias as they are considered common and representative of consolidative pneumonia; however, the two entities could not cover all consolidative pneumonia. Further, not only bacterial pneumonia but other diseases such as fungal infection, organizing pneumonia, and even consolidative lymphoma might mimic invasive mucinous adenocarcinoma. [3; 21] Prospective studies that focus on margin information in various pulmonary diseases are needed and we speculate that this margin analysis method could be applied to other diseases to differentiate cancer and mimickers.

Conclusions
Using pathologically confirmed cases of invasive mucinous adenocarcinoma and bacterial pneumonia which are presenting as consolidation on CT, we investigated the transition of marginal attenuation from lesion to normal lung in the region of interest (ROI) and propose its application to discriminating between tumors and inflammatory lesions of the lung. Our results focusing on the margin of lesions could be promising as an imaging biomarker for future computer-aided diagnosis. The procedure can be performed in 1-minute using a conventional computer and open source ImageJ together with our Java software. We believe that the margin-analysis method for plotting attenuation changes will improve the differential diagnosis of invasive mucinous adenocarcinoma and bacterial pneumonia manifesting as air space consolidation. The findings of the method correspond to intuitive visual assessment of CT scans by chest radiologists. We hope to use our confirmed accumulated CT data sets on cancers and infections in a quantitative manner for machine learning and building artificial intelligence in the field of radiology.