Analysis of Histogram and Grayscale on Chest X-Ray in Lung Cancer Using Image-J

Cancer often attacks the human body, one of which was the lung, and lung cancer was the main cause of death from cancer. Posteranterior (PA) chest radiographic examination is a screening tool for the diagnosis of lung cancer. The computed radiography (CR) modality produces thoracic images quickly and optimally and can be processed as needed, but so far, radiologists have only interpreted images with visual and subjective assessments. So that digital medical image processing is needed by looking at the histogram and gray scale values to increase the quantitative accuracy of lung cancer enforcement, This study aims to analyze the comparison of histograms and grayscale values on CR thoracic images between normal and lung cancer patients. This type of quantitative experimental research was carried out on a sample of 100 chest images consisting of a control group in normal patients and a treatment group in lung cancer patients, totaling 50 images each. Purposive sampling was used for the control group in patients aged 18–60 years and normal, and for the treatment group in patients aged 18–60 years and lung cancer clinicians. All images were calculated in grayscale and displayed as histogram graphics with the Image-J application, and the region of interest (ROI) was performed on the lung lobes at the point of fog or gloom due to pathology, then analyzed statistically using the Independent T-Test. The results show that there is a difference in grayscale values between normal chest images and lung cancer (p 0.001). The grayscale and histogram values in lung cancer chest images (104.780+5.942) are higher and tend to the right compared to the grayscale and histogram values in normal chest images (65.361+3.313). This was due to material differences in the lung sections, causing a radioopaque appearance on chest images of patients due to cancerous material in the lung and a radiolucent appearance on normal chest images. Finally, the histogram and grayscale values can be quantitatively and objectively interpreted in the diagnosis of lung cancer.


I. INTRODUCTION
Cancer is a condition in which abnormal cell growth occurs in the body.This disease often attacks parts of the human body, one of which is the lungs.Lung cancer is the leading cause of death from cancer [1] .The number of all deaths from cancer, especially lung cancer, occurs 32% in men and 25% in women.Individuals aged 35-75 years make up the majority of lung cancer clinical cases with the peak incidence occurring between the ages of 55-65 years.In 2010 approximately 157,300 people are projected to die from lung cancer in the United States which exceeds the total number of deaths from colon, rectum, breast, and prostate cancer [2] .A supporting medical examination in an effort to establish the diagnosis of lung cancer is radiological examination, namely chest radiography.Thoracic radiographic examination is one of the most frequently performed radiological examinations in diagnostic radiology services [3] .Chest X-rays are performed using the patient's anteroposterior (AP) or posteroanterior (PA) position according to the patient's condition with the image viewer modality, namely computed radiography (CR) [4] .Chest radiographic examination is used not only as a support for the clinical diagnosis of patients, but also as a procedure in a medical check-up.CR is one of the modalities that is widely used in radiology services in hospitals.In addition to its practical and easy use, the use of this modality speeds up the examination time.The image produced from this CR modality has advantages, namely in terms of image quality compared to manual radiographic image processing.In Accredited by Ministry of Research and Technology /National Research and Innovation Agency, Indonesia Decree No: 200/M/KPT/2020 Journal homepage: http://ijeeemi.poltekkesdepkes-sby.ac.id/index.php/ijeeemi182 addition, CR also has advantages in terms of price because it does not use film so that costs can be reduced.CR images that are classified as digital images (binary data combinations) can, of course, be measured by measuring the distribution of pixels in degrees of gray (gray scale) and the distribution of pixels from parts of the CR image or histogram [5] .In the technical procedure of chest radiographic examination in lung cancer clinics it is carried out with standard procedures without any special preparation for the patient.The radiographic results of a thoracic examination with clinical cancer are of course different compared to the results of examinations of normal people where this difference can be determined by looking at the distribution of pixel intensities in the two images [6] .However, a radiologist specialist in assessing a thoracic CR photo is not enough just with a visual assessment, it is also necessary to analyze the image with the pixel intensity of the image itself to see the distribution of pixels in the thoracic radiographic image in CR.Because it does not rule out that clinical acquisition causes low quality digital image results [7] .Digital image processing techniques can be performed by calculating grayscale values and histograms using Image-J software.Grayscale and histogram quantitatively can provide an overview of the value of the difference in image density in each calculated part, so that it can provide more information to radiologists in interpreting images in clinically diagnosing patients [8] .In a previous study, in CR thoracic images between patients with tuberculosis (TB) compared to nonpathological patients, there were differences in histogram graphs.The histogram results in TB patients tend to shift to the right, that is, in a lighter direction when compared to the histograms of non-TB patients.Whereas in the results of the gray scale values of the two studies, it was found that there was a significant difference between the gray scale values of patients with clinical TB and normal patients where the gray scale values in TB patients tended to be higher than normal patients [5], [9 ] .The difference with previous research is that this study will further analyze other clinical conditions, one of which is patients with clinical lung cancer.
The high mortality rate due to lung cancer makes medical services strive to provide accurate diagnosis and treatment results.In terms of establishing a diagnosis, one of the usual tests for clinical lung cancer is a chest radiographic examination.Currently, chest radiographic examinations usually use the CR modality and you can see the distribution of the gray scale values and the histogram.This research is expected to be an additional reference for medical personnel in diagnosing lung cancer by analyzing gray scale values and image histograms on CR.This research was expected to be an additional reference for medical personnel in diagnosing lung cancer by analyzing the gray scale values and image histograms on the CR of areas suspected of pathology.So quantitatively, you can see the difference in the grayscale and histogram values of the patient image.This study was conducted with the aim of analyzing histogram comparisons and the mean gray scale values on CR chest images between normal patients and patients with clinical lung cancer.It is hoped that this research can show differences in the distribution of pixel intensity in the histogram and gray scale values so that we can find out more details regarding the differences in the two images with digital image processing and can help radiologists diagnose patients more accurately.

II. MATERIALS AND METHODS
This is a quantitative experimental study with the control group on normal chest images and the treatment group on lung cancer chest images.The aim of this research is to find out the difference between grayscale and histogram in normal and cancer chest images in an effort to interpret the image quantitatively.The population of this study was all radiographic images of thoracic patients at the Radiology Installation of the Islamic Hospital (RSI) Purwokerto from April 2022 to May 2023, taking into account the number of patients, distance, and adequate availability according to research needs.The research sample used nonprobability sampling by purposive sampling with clinical considerations of lung cancer and normal patients according to the desired research objectives.The number of samples is 100 CR chest images, consisting of 50 chest images of normal patients and 50 chest images of lung cancer patients.The study inclusion criteria included patients who were willing to become respondents as evidenced by an informed consent sheet, aged 18-60 years, with clinical lung cancer and chest radiographic examination parameters according to the applicable routine standard operating procedures (SOP).
The radiographic images that have been produced from all research samples are digitally processed using Image-J, and the data analysis is as follows: 1) Radiographic images of all patients are displayed in the image-J application; 2) choose the area to be ROI in the form of a circle, namely in the lobe of the lung, namely in the area of fog or gloom where pathology is suspected; 3) the area that has been carried out ROI then appears a histogram graph and its grayscale value; 4) calculating the pixel intensity distribution using the graph on the histogram; 5) analysis of grayscale values and direction of the histogram graph on the two images is related to the patient's diagnosis quantitatively; and 6) statistical testing of gray scale values was carried out using the SPSS Independent Test T-Test because it used ratio data with two unpaired groups and to answer statistically the differences in grayscale values between the treatment and control groups in interpreting chest images quantitatively so as to assist in establishing a diagnosis lung cancer.This research was conducted based on the consent of patients who were willing to fill out informed consent forms and received ethical clearance from RSI Purwokerto.The characteristics of the study sample were categorized based on age, gender, treatment group (lung cancer patients) and control group (normal patients) using univariate analysis of frequency distribution (TABLE 1).A comparison of the image results between the thoracic radiographic images of normal patients and lung cancer patients can be seen in FIGURE 1. Then all thoracic radiographic images of all patients were measured with an ROI of 1 cm 2 to the area of the lung lobes (areas with fog or gloomy spots) due to pathology) using Image-J (can be seen in FIGURE 2) to analyze its grayscale and histogram values.The results of grayscale calculations can be seen in TABLE 2.

Accredited by
After carrying out grayscale calculations with ROI, then proceed with making histograms from chest radiographic images of lung and normal cancer patients using Image-J (can be seen in FIGURES 3).

Grayscale of Thorax Image p-values
Lung Cancer <0.001Normal Analysis of grayscale values was performed using the Independent T-Test statistical test to determine differences in grayscale values on chest radiographic images between normal patients and lung cancer (can be seen in Table 3).

IV. DISCUSSION
The sample in this study was dominated by lung cancer cases compared to male sex.The main causative factors besides the body's immunity and genetics are prolonged exposure to carcinogenic substances.In 1 in 9 male heavy smokers will suffer from cancer.Differences in the world lung cancer population are also due to population susceptibility, non-small cell lung cancer, especially adenocarcinoma, is more common in women and non-smokers.Besides smoking, the etiology of lung tumors that have been reported include exposure to carcinogens, such as asbestos, ionizing radiation in uranium mine workers, radon, arsenic, chromium, polycyclic nickel hydrocarbons, vinyl chloride, air pollution, genetics, and diet.In addition, the study sample was dominated by elderly patients.This is caused by the increasing number of exposure to risk factors, such as cigarette smoke and pollution and other carcinogenic substances in the work environment and the decreased ability of cell regeneration.
Another cause of lung cancer is the particulate matter contained in air pollution, which is closely related to lung cancer.Based on the original research, 18 new studies around the world have analyzed the correlation between PM2.5 and lung cancer.The final results show that for every 10 g/m3 increase in fine particulate matter, the probability of a person suffering from lung cancer increases by 9%.According to the latest research results released by the WHO, outdoor air pollution is the main environmental factor that causes the death of lung cancer patients and must receive full attention.In 2014, the International Agency for Research on Cancer (IARC) officially listed outdoor air pollution as a class I carcinogen.Air pollutants mainly include fine particulate matter (PM2.5) and inhaled particulate matter [10].Chest radiography examination is an examination that shows anatomical structures and abnormalities in the thoracic cavity to help establish the diagnosis.In this image a histogram graph can be displayed.Image histogram is a graph that describes the distribution of pixel intensity values of an image or a particular part of the image.Then from a histogram it can be seen the frequency of occurrence of the relative (relative) image.The histogram can also show a lot about the brightness and contrast of an image.Therefore, the histogram can be used as an image processing method that works both qualitatively and quantitatively.
Analysis using this histogram will certainly greatly assist in the diagnosis of lung cancer, because the assessment is based on differences in histograms on examination.A histogram is a radiodensity representation in terms of the relative impotence of electromagnetic radiation, particularly X-rays, as they pass through a particular material helpful in differentiating the diagnosis of an abnormality.This has been proven by several researchers, especially in studies conducted on bone quality.In this study, the histogram of a normal chest image shows a graph that tends to approach towards the left in black.The histogram of the thorax image of lung cancer patients shows a graph that tends to approach toward the right and white.The histogram shift and the difference in grayscale values between the thorax images of lung cancer patients and normal ones are due to material differences in the patient's lung sections.
On chest images of lung cancer patients, the presence of a solitary lung nodule will usually give a coin-shaped lesion known as a "coin lesion" with about 50% being malignant (40% due to primary lung cancer, 10% by solitary metastases).Approximately 20-30% of lung cancers give a radiological appearance in the form of a solitary nodule.Central carcinoma is different from solitary lung nodule, central lung carcinoma usually gives a radiographic appearance in the form of a mass at the hilum, or lung collapse and consolidation distal to the carcinoma.The following can be a marker for central lung carcinoma causing airway obstruction, namely: Golden S sign, indicating a deviation of the fissure around the tumor; Pneumonia limited to one lobe (or more, depending on the location of the obstruction in the bronchi); and Localized pneumonia that persists for more than 2 weeks or recurs in the same lobe.In the absence of rib erosions, CXR cannot differentiate between benign and malignant masses.It can detect the presence of pleural effusion, but it also does not allow to determine whether the lesion is benign or malignant [11] .Whereas normal lungs will look like a sponge which should be filled with air and when photographed using x-rays a relatively black shadow (radiolucent) will form.
In detecting a pulmonary nodule on a chest X-ray, there is the possibility of being missed due to various factors, including the presence of ribs, clavicles, trachea, blood vessels, and the heart, which can block or obscure the view of the nodule.In addition, suboptimal image acquisition and unclear margins add difficulty to radiological interpretation.Digital image processing offers a variety of enhancements and detection techniques that can facilitate more accurate detection of pulmonary nodules on chest radiographs [12].The histogram graph is one of the image processing methods for detecting pulmonary nodules.
In many health care systems, chest radiograph remains the first-line test for lung cancer for symptomatic patients [13] .These checks have found extensive use in the past for their wide availability, technical feasibility, low risk, and low cost.Once a suspicious lesion is detected, more detailed morphological information is needed.Lung tumors can present as central or peripheral masses, even adenocarcinomas, and can present as areas of chronic airspace disease [14] .However, this examination has major limitations in detecting pulmonary nodules, and sub-centimeter lesions of pulmonary nodules are easy to miss, about 22% to 85% of early lung cancers have a chance of being detected incorrectly.In cases of lung cancer, screening as a first-line investigation for primary care patients suspected of lung cancer with low dose helical computed tomography modalities is more sensitive and more effective in detecting smaller and earlier lung cancers than chest x-rays as a efforts to improve the diagnosis of early-stage disease and improve outcomes [10], [15].The National Lung Screening Trial (NLST) demonstrated a 20% reduction in lung cancer-specific mortality rates with low dose helical computed tomography screening among high-risk individuals, when compared with chest radiographs [16 ] .Recently, a similar trial with a median follow-up of 12 years confirmed the consistent benefit of using low-dose helical computed tomography for reducing mortality [17] .
In terms of the grayscale average on the PA chest image of lung cancer patients and normal patients, there is a significant difference.Table 2 states that there is a significant difference between the grayscale values of the thorax images of lung cancer patients and normal ones.The grayscale value range is a digital image that has an intensity value range of 0 (black) to 255 (white).This range can be used to present radiographic medical images and to recognize objects contained in these images [18].In this study, researchers measured ROI at lung lobe points and areas where there were fog or gloomy spots due to pathology.The grayscale average of lung cancer chest images has a higher value (104.780+5.942)compared to normal images (65.361+3.313).This difference is due to the different density values of the two images.In the images of lung cancer patients, an enlarged hilum is a common radiographic appearance, indicating a hilum or perihilum mass.The tumor mass and enlarged lymph nodes cause a more opaque appearance of the hilum.Other radiographic features that usually accompany the presence of lung carcinoma are calcification of the lesion, cavitation-shaped lesions, the presence of satellite lesions, the presence of metastatic signs to the ribs, and enlargement of the cardiac shadow due to pericardial effusion.In addition to the typical features that have been mentioned, lung carcinoma can give a radiographic appearance that is similar to that of other disorders or diseases, so that it gives a picture in the form of cystic airspace like presentation, pneumonia like presentation, pleural neoplasm like presentation, and tuberculosis like presentation.Thus, doctors must be able to distinguish radiographic images of lung carcinoma from similar disease features to be able to diagnose it quickly and accurately.
In imaging, the terms radiolucent and radioopaque can relate to tissue density or tissue capacity.The more radiolucent the image, the less dense the existing tissue or changes in structure to become more fluid, approaching the density of water/air.The information on the distribution of gray levels is very useful for separating objects from the background of an image.In addition, analysis of grayscale values is very helpful in establishing the diagnosis of lung cancer by looking at the increase in the value shown so that it can be seen how much the level of tissue density caused by lung cancer causes opacity in the image.After performing quantitative image analysis using grayscale and histogram values, differences between the two images can be obtained in relation to the diagnosis of lung cancer.The grayscale value and direction of the histogram graph provide quantitative information about the chest image itself so that it can assist radiologists in interpreting images more accurately and objectively, which can lead to early detection, follow-up treatment plans, and better and more targeted patient diagnosis results.However, this research is not without limitations.The limitations of this study include the relatively small number of samples, which certainly limits the accuracy of the research results.In addition, there is no analysis regarding the correlation between the histogram pattern and the type of lung cancer itself.In future research, further research can be carried out regarding optimization and correlation of grayscale values and certain histogram directions for types of lung cancer.Thus, in an effort to establish a diagnosis of lung cancer, it will be more informative and target to assess not only the presence or absence of cancer but also the type of cancer displayed through the resulting grayscale and histogram values.

V. CONCLUSION
The histogram graph and grayscale values between normal chest images and lung cancer show a significant difference.The histogram of a lung cancer chest image tends to approach to the right in white while the histogram of a normal chest image tends to approach to the left in black.Then the grayscale value on the lung cancer chest image is higher than the normal chest image.The difference is due to differences in material in the patient's lung.

FIGURE 3 .
FIGURE 3. Display of the patient's chest image histogram (A) is normal; (B) lung cancer . The histogram shows information on the frequency of use of the gray level in an image.The histogram of an image is very Accredited by Ministry of Research and Technology /National Research and Innovation Agency, Indonesia Decree No: 200/M/KPT/2020 Journal homepage: http://ijeeemi.poltekkesdepkes-sby.ac.id/index.php/ijeeemi185 Accredited by Ministry of Research and Technology /National Research and Innovation Agency, Indonesia Decree No: 200/M/KPT/2020 Journal homepage: http://ijeeemi.poltekkesdepkes-sby.ac.id/index.php/ijeeemi186

TABLE 1 Characteristics of Samples
Note.SD : Standard Deviation