Classification and Diagnosis of Pulmonary Nodules in Thoracic Surgery Using CT Image Segmentation Algorithm

*is study was aimed at studying the pulmonary nodule (PN) classification and diagnosis through computed tomography (CT) images based on segmentation algorithms. 120 PN patients were taken as research subjects. Linear filter fine segmentation algorithm under 3D region growth was compared with the initial segmentation algorithm and applied to images of PN patients. *e results showed that the segmentation effect of the proposed algorithmwas at the upper-middle level.*e cases of patients with smoking history were greatly more than those without (χ �1.256, P< 0.05). Benign and malignant PNs were classified, and morphological features included rough ones and round-like ones.*e size characteristics included edge length and area.*e grayscale features included the uniformity of the gray-scale value and the mean value of the gray-scale value. *e operation time of pulmonary lobectomy (76.2± 23.1min) was obviously longer than that of pulmonary wedge resection (27.5.2± 4.5min) (P< 0.05). *e surgical blood loss of patients who underwent pulmonary lobectomy (125± 42mL) was remarkably higher versus patients who underwent pulmonary wedge resection (51.6± 13.8mL) (P< 0.05). After the operation, the length of stay of patients who underwent lobectomy (8.6± 1.4 days) was evidently longer than that of patients who underwent wedge resection (6.4± 1.2 days) (P< 0.05). *e classification of benign and malignant PNs can effectively obtain the shape and size characteristics of PNs. Preoperative positioning surgery based on classification can shorten the operation time, reduce the amount of bleeding during the operation, and help improve the success rate of surgical resection.


Introduction
Lung cancer is a kind of malignant tumor, and the mucosal epithelium of the bronchus is the main source of cancer cells [1].In recent years, lung cancer has become the cancer with the highest incidence and death rate in the world [2].Early detection of lung cancer is mainly based on surgical treatment, supplemented by other treatments, which can remarkably improve the survival rate.However, due to the influence of smoking and surrounding environmental factors, the incidence and mortality of lung cancer in countries with more developed industries in the world are still rising, and male patients occupy the first place in lung cancer [3].PN is the early form of lung cancer, which is similar to round and irregular shape lesions.Whether there are burrs around the nodules is the criterion for judging whether PN is benign or malignant [4].
Clinical medicine often uses CT to classify and evaluate PN morphology.CT adopts X-rays, gamma rays, and ultrasound to scan a certain part of the human body together with a highly sensitive detector.It has the characteristics of fast scanning time and clear scanned images [5].Since PN is an ellipse in mathematical geometry, CT images are utilized to analyze it, and Gaussian distribution equation can be utilized to analyze and extract the PN shape.However, the gray values of the nodules and blood vessels in the image are very close, which makes it difficult to segment the nodules attached to the blood vessels [6], so an accurate image segmentation algorithm is urgently needed to solve this problem.In recent years, Star et al. [7] utilized a 3D reconstruction algorithm to classify CT images according to the characteristics of PN, and the classification results were ideal.However, a large amount of data needed to be input, and the calculation time was too long, which was not easy to implement in practical applications.Ierardi et al. [8] utilized single-slice spiral CT images to classify PN, but the results did not show the 3D reconstruction information characteristics of PN.Farhangi et al. [9] evaluated PN based on the 3D reconstruction segmentation algorithm and found that the 3D effect was remarkable, but during the research process, manual intervention was constantly required and cannot be fully automated.
In this study, the linear filter fine segmentation algorithm based on 3D region growth was compared with the initial segmentation algorithm, and it was applied to CT images of 120 PN patients.e aim was to classify the benign and malignant pulmonary nodules of all patients and perform feature extraction, and then adopt the corresponding surgical treatment according to the classification, hoping to help standardize the clinical operation of pulmonary nodules.

Materials and Methods
2.1.Research Subjects.120 patients who were medically diagnosed as PN in hospital from January 2018 to January 2020 were taken as the research subjects.
ere were 65 males and 55 females, with an average age of 56.41 ± 15.47 years.is study had been approved by the medical ethics committee of the hospital.e patients and their families understood the situation of this research and signed the informed consent forms, respectively.
Inclusion criteria: I, PN patients diagnosed by CT imaging examination with imaging data can be called; II, PN size below 9 mm; III, patients with detailed clinical data in this hospital; IV, patients who did not receive chest surgery before admission.
Exclusion criteria: I, patients with local swelling of lymph nodes; II, patients with only clinical diagnosis and lack of direct evidence; III, patients with mental illness; IV, patients with atelectasis; V, patients with unclear CT images.

Observation Indicators.
Collection of general statistical data included patient's name, age, gender, bed number, medical record number, smoking history, and clinical imaging and pathological data, and PN size, location, density, and distance statistics between PN and pleura.Surgery-related information included the surgical method utilized, the statistical operation time, the amount of bleeding during the operation, the puncture time, and the angle and depth of the puncture needle.Postoperative related information included pathological observation and diagnosis after operation and hospitalization time after operation.

CT Scan for Patients with PN.
e GE light Speed VCT 64-slice spiral CT scanner was utilized to scan the patients, who were instructed to remove the metal jewelry on the chest before the scan.e iodine allergy test was tested in advance, and the scanning process was explained, so that the patient maintained a calm state of mind.First, left and right plain scan on the chest was performed, followed by scan from top to bottom.e scan range was from the upper thorax to the diaphragm, and then an enhanced scan was taken.
e scanning layer thickness was 0.625 mm, the scanning interval was 0.5 mm, the pitch was 0.984 : 1, the matrix was 512 × 512, the voltage was 120 kV, and the current was 220∼500 mA. e scanned images were evaluated and collated by two senior physicians.e data needed to be checked and proofread repeatedly to ensure the accuracy of the data.Before operation, it was imperative to perform a second scan of the local lesions on CT and use the Bard needle for puncture.

Benign and Malignant PN Classification Method.
e features of the region of interest of the chest PN were extracted from the CT images under the linear filter fine segmentation algorithm.
en, according to the image features of PN, the computer deep learning classification machine was utilized to classify the benign and malignant PN.
e specific classification flow chart was as follows (Figure 1).Benign and malignant PN classification mainly included four steps: segmentation of PN, extracting PN features, screening features, and benign and malignant PN classification.
e specific classification steps were as follows.I: the region of interest extracted from the CT images of 120 patients by the linear filter fine segmentation algorithm was taken as the feature extraction database.II: PN features extraction.IBEZ software was adopted to extract features and quantitatively analyze the data in the database.III: screening of PN features.e screening quality directly affected the final benign and malignant classification results.IV: benign and malignant PN classification.e classifier was adopted to perform statistics on the extracted feature data, and finally the classification of benign and malignant tumors was completed.

PN Positioning Method.
Before the puncture positioning, it was necessary to evaluate the general information of the patient, including age, gender, and smoking history.Patient's CT images of PN were observed to determine the size, position, and shape of the PN, so as to reduce the patient's surgical risk.It was crucial to review the patient's examination data in detail and focus on the patient's cardiopulmonary function and blood coagulation function indicators.According to the CT scan before the operation, the position and size of the PN can be determined, and the appropriate puncture position, angle, and depth can be determined as well.Local pulmonary anesthesia was performed with lidocaine reagent.Under the guidance of CT images, Bard's needle was punctured through the pulmonary cortex, and the needle was inserted into the isolated PN with a depth of less than 6 mm.During the second CT scan, a 3 mm scan was performed at a radius of 4 mm around the isolated PN.After accurate positioning, the sleeve needle was withdrawn and the wire was left inside the skin.If no pulmonary hemorrhage occurred, the patient would be transferred to the operating room for surgical treatment.
2.6.Surgical Treatment of Patients.Prior to the operation, the patient was given general anesthesia and intubated on both sides of the thorax.According to the position of isolated PN, the appropriate operating position was selected.Generally, the 6th rib in the anterior axillary region would be selected.e thoracoscopic lens was placed at the observation site, the wire around the chest was pulled out, and the lesions were clamped out with thoracoscopic tissue forceps.e lesions around the normal lung tissue were then removed with a cutting and suturing device, and the lesion samples were immediately sent to the surgery for pathological examination.One side of the lesion was ventilated and leakage and bleeding in the lungs were checked.Depending on the results of pathological examination, the surgical treatment was determined.If the patient was diagnosed as benign lesions or microinfiltrates, the surgery can be completed, the incision can be fixed and sutured, and the thoracic cavity can be closed layer by layer.If the patient was diagnosed as malignant infiltration, lobectomy and lymph node dissection would be required.If the patient was too ill to undergo lobectomy, a wedge resection of the lung was required.

Linear Filter Fine Segmentation Algorithm Based on 3D
Region Growth.Multiscale filter is often utilized in medical image segmentation of tubular structures.
e working principle of the filter includes three aspects.First, the convolution operation is utilized to combine the pixel of the initial image with the Gaussian filter, and then the multiscale parameters are set according to the actual situation.e second is calculating the segmentation results according to the parameters, and finally collating and combining the segmentation results of all scales to get a clear image.
Pulmonary blood vessels and pulmonary trachea are distributed in the 3D space in the form of tubular radiations, which can be expressed based on the eigenvalue equation of 3D region growth.e local features of the initial image in the pixel a 0 can be calculated using Taylor's equation, which is as follows.
In equation ( 1), R represents the local characteristic objective function, θ a 0 represents the increase, ∇ 0,t represents the gradient value of the pixel a 0 in the initial image, G 0,t represents the matrix of the pixel a 0 in the 2D space, and the equation is as follows.
In equation ( 2), R xx (0, t), R xy (0, t), R yx (0, t), and R yy (0, t) represent the second-order differential calculated by the pixel a 0 in the initial image.en, the 2D image is improved into a 3D image, and the equation is as follows.
Each element in equation ( 3) represents the secondorder differential calculated by the pixel a 0 in the initial image.e equation between eigenvalue and eigenvector is as follows.2).e relationship between eigenvalues shows different size relationships in different 3D structures.For the tubular structure in this study, the following equation is satisfied.

Pulmonary nodules segmentation algorithm
The characteristics of pulmonary nodules were extracted Lung nodules were screened for their characteristics

Feature extraction database
Gray feature

The geometric characteristics
The chaos characteristics

Benign pulmonary nodules
Optimal subset library

Scientific Programming
In equation ( 5), the absolute value of ζ 3 is close to 0, but the absolute value of ζ 1 and ζ 2 is close, which is far greater than 0. e distribution of the tubular structure should be broken under normal conditions.To detect different sizes of tubular structures, the edges of the tubular structures should be connected and Gaussian distribution is utilized for calculation.e calculation equation is as follows.
In equation ( 6), θ represents the scale factor in the Gaussian distribution.Q (x,y,θ) represents the output data of pixel (x, y) calculated by the Gaussian distribution formula, H (x,y,θ) represents the Gaussian distribution model, and Q (x,y) is the CT value corresponding to the pixel (x, y) in the initial image.
e equation of the Gaussian distribution model is as follows.
H (x,y,z,θ) � e x 2 +y 2 +z 2 /2θ 2 ( ) In equation (7), θ represents the dispersion of the coefficients in the Gaussian distribution model.e larger the θ, the smaller the difference in the coefficients in the model, which indicates the density in the Gaussian distribution template is more dispersed, the final image will be smoother, and the second-order partial derivative of the final output value will be smaller.If θ is smaller, the result of the Gaussian distribution model will be smaller than the surrounding results, making the image not smooth enough, and the second-order partial derivative of the output value will be larger.e 3D image equation of the tubular structure is as follows.
To use the tubular structure filter to extract the tubular morphological features, the output value of the filter must be continuously changed according to the change of ζ 3 , and the function value corresponding to the sheet structure is controlled to obtain the following equation.
e function value of g(ζ 1 , ζ c ) will change with the gradual decrease of ζ 1 .ζ c means that the input results of the filter are unified, and the value represented by β 1 and β 2 is meaningless.
2.8.Statistical Analysis.SPSS 22.0 statistical software was utilized for analysis, and mean ± standard deviation was how calculation data that satisfied the normal distribution was expressed.Operation time, surgical blood loss, and hospitalization days were counted.Data that did not satisfy the normal distribution was expressed as cases and percentage.For analysis of number of pixels and division rate segmented by the two algorithms, χ 2 test was adopted.P < 0.05 indicated considerable differences.

Comparison of Results between Initial Segmentation Algorithm and Fine Segmentation Algorithm.
e results of the initial segmentation algorithm were compared with those of the fine segmentation algorithm, which were both applied to images of 120 patients with PN. e patients were randomly divided into two groups.e chest CT images of the two groups were processed, and then the data were quantitatively analyzed.It was found that there was no segmentation defect in the sequence of the lung CT pattern of the algorithm of this research.Moreover, strict inspection standards were utilized for local area scans, so that changes in lung bronchus volume presented a better segmentation effect.e lung CT image data of the two algorithms were quantitatively analyzed, the number of pixels in the lung parenchyma in the initial segmentation and the fine segmentation was compared, and the segmentation rate of the initial segmentation and the fine segmentation were also compared.e results showed that, in the two sets of data, the number of pixels in the fine segmentation algorithm was more than the number of the mutual segmentation algorithm, and the difference was substantial (P < 0.05).e segmentation rate of the two groups (0.64%, 0.71%) was higher than that of the initial segmentation (0.52%, 0.54%), and the difference was 4 Scientific Programming statistically considerable (P < 0.05).It meant that the fine segmentation algorithm proposed had an optimization function for the initial segmentation algorithm, and it was at the upper-middle level in the segmentation effect as shown in Figure 3.

Statistics of Clinical Characteristics of PN Patients.
e clinical data of 120 patients were statistically analyzed, including gender, age, and smoking history.No evident difference was found between the gender (χ 2 � 0.315) and age (χ 2 � 0.148) of the patients (P > 0.05).e cases of patients with a history of smoking were greatly more than those without (χ 2 � 1.256, P < 0.05).Figure 4 shows that smoking patients were more likely to have PN.

CT Imaging Characteristics of PN Patients.
e diagnosis of benign and malignant PN in clinical medicine depends on the size, shape, and degree of calcification of the nodule.e CT imaging characteristics of PN mainly included the following types.e spicule sign was around the PN, with many prominent spicule shapes, generally showing a radial shape.
ere were two types of spicules: one was long spicule and the other was short spicule.Long spicules had no great effect on benign and malignant classification.Short spicules with a length of 2-4 mm were helpful for classification of and malignant.e main manifestation of the lobulation sign was the ups and downs around the nodule, and the growth rate of the nodule was different in different parts, so the lobulation sign included the deep lobulation sign and the shallow lobulation sign.e deep lobulation sign was one of the indicators for judging benign and malignant nodules, which is presented in Figure 5. Membrane depression sign was mainly manifested as a triangle-like image near the pleura.e direction of the triangle's vertex was the position of the nodule.Calcification refers to the appearance of high signal around the nodules.Since many tissues of PN were necrotic, the calcium carbonate produced was formed by continuous precipitation.Generally, nodules with calcification were benign, as illustrated in Figure 6.

Univariate Analysis of Complications in PN Patients.
In 120 patients, there was no substantial difference between the upper lobe (59 cases) and the lower lobe (61 cases) (P > 0.05).ere was also no significant difference between the solid nodules (65 cases) and nonsolid nodules (55 cases) (P > 0.05).
e farther the distance between the nodule and the pleura, the higher the probability of complications (P < 0.05).
e longer the puncture takes, the higher the risk of complications (P < 0.05) Figure 7.

PN Geometric Feature Extraction.
e extracted geometric features mainly included the morphological features and size features, which were generally utilized as the criterion for judging benign and malignant clinically.e morphological features included rough, round, compact, and asymmetrical types of nodule.
e roughness of the nodule can reflect the pathological characteristics, while the comparison between the nodule and the circle can describe the general shape of the nodule in detail.e tighter the nodule, the shorter the edge length of the nodule.Due to the impact of image clarity and hidden nodules, only part of the nodule features was extracted.e extraction ratio of each item in the morphological characteristics is shown in axis, and shortest axis, and the extraction ratio of each item in the size features is shown in Figure 9.
3.6.PN Gray Feature Extraction.In CT scan, the final image is mainly gray.erefore, the change of gray information can reflect the specific texture of benign and malignant nodules.
In general, gray features included gray value uniformity, mean value of gray value, and variance of gray value (Figure 10).Among them, gray value uniformity accounted for 20.8%, mean value of gray value accounted for 48.4%, and variance of gray value accounted for 30.8%.

Surgical Treatment
Results.Among the 120 patients, 67 patients were diagnosed as invasive PN, and the surgical method was lobectomy.25 patients were diagnosed as PN in situ, and the surgical method was wedge-shaped pulmonary resection.e operation time and the amount of bleeding during the operation of different kinds of operations are counted in Figure 11.e operation time of pulmonary lobectomy (76.2 ± 23.1 min) was obviously longer than that of pulmonary wedge resection (27.5.2 ± 4.5 min) (P < 0.05).

Discussion
Lung cancer has become the disease with the highest fatality rate among cancers in the world, and it is increasing year by year [10].In clinical medicine, the diagnosis of lung cancer still depends on the CT image observation and delineation to confirm the lesion condition.erefore, the diagnosis result not only is affected by the subjective factors of the physician, but also increases the task load, leading to misdiagnosis [11].CT imaging is one of the most widely utilized methods for organ examination in the medical field in recent years.It uses accurate and effective methods to obtain research areas of interest and gradually extracts valuable information that humans cannot see directly from massive data.
Qi et al. [12] pointed out that early PN location resection can effectively improve the prognosis of patients, as well as the survival rate of patients.Wu et al. [13] classified benign and malignant PNs to help reduce the rate of clinical missed diagnosis and misdiagnosis.Chae et al. [14] performed lobectomy on invasive PN based on the classification of benign and malignant PNs and proved that the determination of benign and malignant PN was a key measure for later surgical treatment.In this work, the benign and malignant PNs were classified, the image features were extracted, and preoperative positioning and surgical treatments were implemented according to classification results.e results were consistent with the above researches.67 patients were diagnosed with invasive PN and required lobectomy.In contrast to the study of Usuda et al. [15], the operative time (27.5.2 ± 4.5 min) was shortened, the intraoperative blood loss (51.6 ± 13.8 mL) was decreased, and the length of hospital stay (6.4 ± 1.2 days) was also decreased.e preoperative positioning in this study can stretch the shrunken tissues and facilitate surgical resection.

Conclusion
Linear filter fine segmentation algorithm based on 3D region growth was proposed, which was compared with the initial segmentation algorithm after being applied to images of 120 patients with PN.It was found that the segmentation effect of this algorithm was at the upper-middle level.Classification of benign and malignant PNs can effectively obtain the morphological characteristics, size characteristics, and gray value characteristics of PN.According to classification results, preoperative positioning can shorten the operation time, reduce the amount of bleeding during the operation,  and help improve the success rate of surgical resection.e distance between the nodule and the pleura, as well as the length of puncture time, had a certain influence on the occurrence of complications.e limitation of this study is that the patient's pathological data are still insufficient.e patient's PN disease history and benign and malignant pathological classification are not clearly noted in the portfolio, which has a certain impact on the judgment of benign and malignant classification.In the future work, the algorithm and platform functions should be further improved to reduce the memory occupied by the research data.In short, this work proposes a novel classification method of benign and malignant PNs, which has certain clinical application value.

)
It is assumed that b 1 , b 2 , b 3 and ζ 1 , ζ 2 , ζ 3 represent the eigenvalue and eigenvector in the matrix, respectively, and the eigenvalue satisfies |ζ 3 | ≤ |ζ 2 | ≤ |ζ 1 |.From a geometrical point of view, ζ 1 is consistent with the direction of the tubular structure, while ζ 2 and ζ 3 were perpendicular to the direction of the tubular structure.ζ 1 , ζ 2 , and ζ 3 not only intersect each other, but also are perpendicular to each other (Figure

Figure 1 :
Figure 1: Flow chart of benign and malignant PN classification.

Figure 3 :Figure 4 :
Figure 3: Comparison of the segmentation results of the two algorithms.Note.* and # represent considerable differences versus the first group and the second group of initial segmentation, respectively, P < 0.05.

Figure 7 :
Figure 7: Comparison of nodule position and nodule density.

Figure 8 :Figure 9 :
Figure 8: Extraction ratios of each feature in the morphological characteristics of PNs.

Figure 10 :
Figure 10: Extraction ratios of various gray-scale features of PNs.

Figure 11 :Figure 12 :
Figure 11: Comparison of operation time and blood loss of the two operations.Note.* suggests considerable differences in contrast to lobectomy, P < 0.05.