Article

AQMI: Software for assessing the quality of mammographic images

A. D. Mangussi
Universidade Federal de Ciências da Saúde de Porto Alegre , Brazil
T. A. Pianoschi
Universidade Federal de Ciências da Saúde de Porto Alegre , Brazil
B. Cecchetto
Universidade Federal de Ciências da Saúde de Porto Alegre , Brazil
V. R. Botelho *
Universidade Federal de Ciências da Saúde de Porto Alegre , Brazil

AQMI: Software for assessing the quality of mammographic images

Brazilian Journal of Radiation Sciences, vol. 11, no. 3, e2254, 2023

Sociedade Brasileira de Proteção Radiológica

Received: 06 February 2023

Accepted: 18 July 2023

Published: 24 July 2023

Abstract: Objective: AQMI - "Assessment of the quality of mammographic images" was developed to support the quality control (QC) of digital mammographic images. Materials and Methods: The software was implemented in the Python programming language via the Streamlit library, which involved content structuring and environmental planning. The experimental data that were selected from a public domain repository [19]. From the selected database, relevant information that was present in the DICOM file was studied to perform the image quality test. Then, from searching the literature, indicators that measure image quality were found, such as the signal-to-noise ratio, the contrast-to-noise ratio, figure of merit and image histogram. Results: AQMI assists in analyzing the image quality test established in IN 92 by the Agência Nacional de Vigilância Sanitária [8]. It also has quality addition indicators, trend graphs, and the image assessment history. Conclusion: For the functionalities of this work, the developed software is a promising tool for use in clinical practice, since it consists of a free, friendly, and easy-to-use interface.

Keywords: Mammography, Image quality, ACR, DICOM, Software.

1. INTRODUCTION

Breast cancer is the neoplasm with the highest incidence and mortality rate in women [1]. Early detection of the tumor significantly improves the chances of successful eradication through appropriate treatment. Diagnostic imaging tests, including mammography, magnetic resonance imaging, and ultrasound, can be utilized for detection [2]. Among these methods, mammography is the gold standard for diagnosis of breast cancer [3].

Mammographic screening can identify lesions in the early stages of cancer [4], and when this is used in routine screening programs for women over 40, it helps reduce breast cancer mortality by more than 25% [5]. The 5-year survival rate of women whose tumors are detected early is 82%, compared to 60% for those whose tumors are not detected early [6].

In mammography, low-energy X-rays are used to produce high spatial resolution high contrast images in order to observe differences between healthy tissue and the radiographic findings [7]. Due to the significance of mammography in detection and diagnostics, ensuring image quality is crucial for reliable diagnosis. Therefore, mammography units undergo regular quality control (QC) tests, which aim to evaluate and provide an assessment of image quality.

Normative Instruction (IN) 92 of Resolution 611 of the Collegiate Board of the Brazilian Health Regulatory Agency (ANVISA) establishes the requirements for quality assurance and the safety of mammography systems [8]. The different mandatory tests have well-defined periodicity, tolerances, and restriction levels [9]. Of these, image quality tests have to be carried out on a daily basis and consist in acquiring a mammographic image using an object-oriented simulator (OOS). An OOS, also called phantom, is a physical apparatus that contains objects that simulate clinically-relevant mammographic findings of different sizes, thicknesses, and geometries. Several types are available in the market, with the American College of Radiology (ACR) phantom being one of the most widely used in clinical practice. This OOS is schematically illustrated in Figure 1.

Representation of the ACR mammographic object-oriented simulator representing the position of the fibers (F), microcalcifications (S), and tumor masses (M).
Figure 1
Representation of the ACR mammographic object-oriented simulator representing the position of the fibers (F), microcalcifications (S), and tumor masses (M).

Source: [10]

The ACR phantom simulates a standard average breast (50% adipose tissue, 50% glandular tissue), whose thickness, when compressed, is equal to 4.5 cm [11]. The objects present in it are characterized by microcalcifications, fibrous structures, and tumors [11]. These breast pathology structures are simulated by way of: six fibers, whose thicknesses are 1.56 mm (F1), 1.12 mm (F2), 0.89 mm (F3), 0.75 mm (F4), 0, 54 mm (F5), and 0.40 mm (F6); five groups of microcalcifications with diameters of 0.54 mm (S1), 0.40 mm (S2), 0.32 mm (S3), 0.24 mm (S4) and 0.16 mm (S5); and five groups of masses with diameters of 2 mm (M1), 1 mm (M2), 0.75 mm (M3), 0.50 mm (M4) and 0.25 mm (M5) [11].

The OOS is imaged in a mammography device and the image assessment is performed by structure visual counting. The equipment is deemed compliant when it allows visualization of the four largest fibers, three largest microcalcifications, and three largest masses [12]. IN 2, on the other hand, specifies that the smallest visible fiber must have a minimum thickness of 0.75 mm, the smallest visible microcalcification must have a minimum diameter of 0.32 mm, and the smallest visible mass must have a minimum diameter of 0.75 mm for an image to be considered compliant. Both of the above-mentioned counting criteria are equivalent and, therefore, accepted by ANVISA.

In addition to the above-mentioned test, the literature has other image quality indicators, which are determined from calculations that use the pixel intensity of the OOS image. Although they are not mandatory quality tests (according to IN 92), however, determining them can help to reduce the subjectivity of the visual tests.

Digital radiology, already a reality in Brazil, enables new possibilities with regard to acquiring and processing images in diagnostic imaging [13]. The communication and storage of images created by all the equipment in the medical field are standardized in a single format that is structured in protocols: the DICOM (Digital Imaging Communications in Medicine) file [14]. Unlike other formats, this file comprises images with their descriptions and the elements that identify them as medical images [15]. Among the information included in the DICOM file, some of the parameters can help in mammography QC, since this format stores image acquisition information, such as current-time product (mAs), peak kilovoltage (kVp), the entrance skin dose (DEP), the mean glandular dose (MGD) and exposure time [16]. So it is convenient to access DICOM tags easily.

It is clear that a wide range of information relevant to QC can be extracted from an OOS image. The periodicity of the IN 92 image quality test corroborates the volume of images acquired for QC. This demands greater organization in the storage of these images and enables a comparative assessment of them for early detection of any signs of degradation in the equipment.

Considering the aforementioned factors, it is important to develop software that brings together information that is relevant to the QC of mammograms and enables this information to be organized and managed. This will allow the clinical team to have a broad view of the operational quality of the mammography equipment in service. Despite this, most health centers do not have access to tools of this nature. There are a few reports in the literature of similar tools, as is the case with the work by Visanuyanont etal. (2021), who proposed the DOSESTAT-QC software which, according to the authors, has an intuitive interface that is easy to use and automatically provides the results of assessments, such as the visibility of groups of contrast details, homogeneity, signal-to-noise ratio, and contrast-to-noise ratio [17]. However, the disadvantage of Visanuyanont et al. (2021) was that it is not a free tool. Moreover, this software was not developed considering the Brazilian legislation.

Thereby, this work describes the development of the AQMI software, the acronym for "Assessment of the Quality of Mammographic Images", a software to support the QC of the images taken on digital mammography devices. This software is able to determine and store image quality indicators as required by Brazilian legislation (IN 92), additional indicators, the acquisition of DICOM file parameters for image quality verification, and the comparative analysis of the histories of quality-controlled images.

2. MATERIALS AND METHODS

The proposed software was developed in the Python programming language. The Streamlit library was used for creating the environment as this allows data scripts to be transformed into Web apps, and there is no need for any front-end experience [18]. The Matplotlib and Plotly libraries were also used at the same time for data visualization, as were Pandas for database manipulation, Numpy and Scipy for calculating statistical metrics and histograms of the image, Pydicom for reading the image in DICOM format, and Tkinter for implementing interaction between the software and the user.

The development steps can be outlined as follows: software structuring, selection of experimental data, extraction of relevant information from the DICOM file, and incorporation of additional indicators. These steps will be elaborated upon in the subsequent sections.

2.1. Structuring the software

At this stage in the work, the software was planned, including an analysis of its content and environment design. Thus, a comprehensive survey of the existing Brazilian legislation regarding mammography was conducted and based on the periodicity of the image quality test and the level of tolerance. The modules were then selected for composing the software structure, which is identified by way of a navigation menu. This was followed by structuring the composition of the software, the objective being to develop a simple and intuitive interface for the user.

To use this tool in image quality testing, the user must select the storage directories from the software results, and the location of the images acquired during the test; the user uses their own directory for locating the images. There is no need for the computer to be connected to the Internet, however, since it is local. In order to guarantee that the history is preserved, all the analyzed images are copied into a specific internal directory linked to the software.

2.2. Selecting the experimental data

To consolidate the functionality of each module that is developed, and to define parameters for adjusting the software and its layout, the public domain database proposed by Guzmán et al. (2019) was used, which contains 126 images of the ACR phantom object in DICOM format [19]. How the images were acquired is described in the work by Guzmán et al. (2019).

2.3. Selecting relevant information (tags) in the DICOM file

To select relevant tags in the DICOM file, a study of which information is correlated with the quality of the image in the DICOM file was carried out. DICOM 3.0 [20] documentation, which is the current version, was used as a basis for this with the purpose of understanding what each tag represents, and how it is determined, that is, if they come from a calculation or are obtained from sensors in the equipment. From this study, the following tags were selected for inclusion in the software with regard to the operational parameters: (0018, 0060) KVP, (0018, 1152) Exposure, (0018, 1191) Anode Material, (0018, 7050) Filter Material, and (0018, 7060) Automatic Exposure Control. These tags were selected to inform and facilitate the work of the professional responsible since these are selected during image acquisition.

The (0040, 0316) Organ Dose tag, corresponds to the MGD in dGy, which is deposited in the phantom during image acquisition [20]. This parameter was selected to make the dose value accessible in mammographic procedures. The (0018, 1147) and (0018, 1190) tags were selected because they represent the shape of the field of view and the focal point of the mammogram, respectively [20]. These influence the spatial resolution of the image [21], but the (0018, 1149) tag, Field of View Dimension, interferes with the contrast resolution. The (0018, 1111) Patient Distance, and (0018, 1110) Detector Distance tags represent the distance from the patient, which in the case of the image quality test is the OOS, and the distance from the detector. These distances alter image distortion and detail, respectively [21], while (0018, 11a0), Body Part Thickness, alters the density. For image acquisition, the density will remain constant as all acquisitions will be performed using the same phantom. Therefore, the density will correspond to that of the phantom itself. Grids are used to contain the scattered radiation of the beam since this reduces image quality [21]; therefore, the (0018, 1166) tag, Grid, was also selected to be displayed in the interface. Finally, the (0018, 0022) tag, Acquisition Date, was selected to inform the user of the date on which the image was acquired.

2.4. Additional indicators

The literature presents some options for image quality indicators, such as signal-to-noise ratio (SNR), contrast-to-noise ratio (CNR), and figure of merit (FOM). To determine these indicators, it is initially necessary to select a Region of Interest (ROI) that contains a visible structure (in the case of this work, region M1 was selected) and a Background Region (BG) that are free of structures between S1, S2, and M1 [22], as shown in Figure 2. Both the ROI and the BG have a radius of 40 pixels.

ROIs for calculating additional indicators.
Figure 2
ROIs for calculating additional indicators.

The SNR, described in Equation 1, is for assessing image quality from the point of view of excessive noise, a factor that is associated with poor image quality. On the other hand, the parameter that best describes the ability to detect breast lesions is the CNR [23]. This indicator, which is calculated using Equation 2, allows the sensitivity to be identified when detecting structures, and describes the size of the signal in relation to the background noise in an image, which is particularly useful for simple objects [24].

Equation (1)

Equation (2)

In which is the average value of the pixel intensity of the background (BG), is the standard deviation of the pixels in the background of the image, and is the average value of the pixels of the ROI [24]. All the variables in Equations 1 and 2 were calculated using the Pythonlibraries.

FOM is a quality indicator that relates image quality to the dose required to produce it. High FOM values indicate the ability of the system to provide an image with good contrast and a low dose [25]. Borg et al. (2012) proposed Equation 3 for calculating this.

Equation (3)

In which MGD represents the Mean Glandular Dose [26]. This information will be taken from tag (0040, 0316), OrganDose, in the DICOM file. CNR is the contrast-to-noise ratio determined in Equation 2.

A histogram is a graphical representation of the statistical distribution of the gray levels in an image in terms of the number of pixels. In addition to the aforementioned additional indicators, a histogram of the image pixels was also incorporated into the software. Although the histogram is not a specific tool in mammography image QC, it was included in the software because it is related to image quality from a general point of view. This is because histograms of images can be comparatively analyzed in the search for peaks and/or troughs that can be used, for example, to determine thresholds or to detect atypical behavior in images [27].

3. RESULTS AND DISCUSSION

The AQMI software was developed on the basis of the methodology described, and in order to use it the user must have the DICOM images stored locally.

Figure 3 presents a diagram of the modules that the software provides, as well as the input and output data of each module. To navigate between them, a navigation menu, shown in Figure 4, is available to the user on the left-hand side of the screen.

Diagram of the functionality of the AQMI software. Each box represents a software module.
Figure 3
Diagram of the functionality of the AQMI software. Each box represents a software module.

In starting the software's functions, the software itself automatically creates a folder called CQMAMO on the local disk. Once this is done, the user can view the guidelines for carrying out the image quality test in the "Homepage" module, using the OOS of the ACR and image storage (Figure 4). They must also register the identity of the mammography equipment, provided it is the first time the software is being used. With the registration completed, the user can see if the equipment is in the interface. Note that this name will be used to store the images inserted for test assessment. For those users who do not want to use this folder for saving the image quality test information, there is a "Change storage directory" button to allow a new directory to be selected for storing the software results (Figure 4).

First page of the AQMI software module.
Figure 4
First page of the AQMI software module.

In the "Image quality test" module, the user can visually assess the acquired image according to the instructions of IN 92, using the interface shown in Figure 6. The user must first select the image that will be assessed. This image will be displayed and the user will be able to count the structures manually. Based on the number of structures informed by the user, the software automatically informs whether the image complies with the determination of IN 92 (Figure 5). The relevant DICOM tags are also shown to the user in this module in the expandable menu "Technical acquisition parameters of the image".

For the "Additional Indicators" module, the user must select the image for analysis. The software then automatically calculates all the indicators in this module. Figure 6 shows the results of the SNR, CNR and FOM indicators in the interface. The module also has an expandable menu for describing the calculations of these indicators. Figure 6 also shows the histogram of the image, along with its statistical metrics.

Layout for the user to assess the image quality test.
Figure 5
Layout for the user to assess the image quality test.

It is important to mention that in the current version of the software, the ROI and BG coordinates (Equations 1 and 2) are selected from fixed coordinates. This represents a limitation of the work, since small variations in the size of the image can lead to unwanted regions being selected, but automatic ROI selection methodologies are being developed by the research group and should be incorporated into the software in future versions.

Finally, the module entitled "Test History" offers a visualization of the results of the image quality test assessments that are stored in the working directory selected by the user. This visualization can be obtained from the module itself, which is given in the software interface (Figure 7). There is, however, an option to access the "Equipment Room" folder, which is automatically created in the directory chosen on the "Homepage" and stores the results of the assessments on Microsoft Excel files.

Layout for the user to visualize the SNR, CNR, FOM and histogram of the assessed image and the statistical metrics of the pixel matrix and the histogram shown in the software interface.
Figure 6
Layout for the user to visualize the SNR, CNR, FOM and histogram of the assessed image and the statistical metrics of the pixel matrix and the histogram shown in the software interface.

Layout for the user to visualize the SNR, CNR, FOM and histogram of the assessed image and the statistical metrics of the pixel matrix and the histogram shown in the software interface.
Figure 7
Layout for the user to visualize the SNR, CNR, FOM and histogram of the assessed image and the statistical metrics of the pixel matrix and the histogram shown in the software interface.

In this same module the software also provides trend graphs, shown in Figure 8, of the analyses carried out, which enable the results to be compared over time. The user can select the period of interest for which they wish to view the results.

Layout for the user to visualize the SNR, CNR, FOM and histogram of the assessed image and the statistical metrics of the pixel matrix and the histogram shown in the software interface.
Figure 8
Layout for the user to visualize the SNR, CNR, FOM and histogram of the assessed image and the statistical metrics of the pixel matrix and the histogram shown in the software interface.

4. CONCLUSION

The aim of this work was to develop software for supporting image quality tests in mammography that enables information relating to such tests to be organized and managed. It allows image quality tests to be analyzed, as established in IN 92, and also contains additional quality indicators, trend graphs, and an assessment history. For the functionalities of this work, therefore, the software that was developed satisfactorily meets its purpose and is a potential tool for using in clinical practice, since it consists of a friendly interface, is easy to use, and is free of charge.

In the future it is intended to include the automatic selection of regions of interest for calculating additional indicators since these regions are selected from fixed coordinates in the current version of the software. It is also intended to improve the histogram-based comparative indicator in order to make it more intuitive. Finally, the aim is to validate the software from the opinions of professionals who work in clinical practice.

5. SUPPLEMENTARY MATERIAL

The source code is available at: https://github.com/ArthurMangussi/AQM

REFERENCES

Cancer today . Available at: http://gco.iarc.fr/today/home. Last accessed on November 4, 2022.

MOHANTY, F. ; RUP, S. ; DASH, B. Automated diagnosis of breast cancer using parameter optimized kernel extreme learning machine. In : Biomed Signal Process Control, 2020.

MAULAZ, C. M.; VALENTINI, B. B.; MARQUES DA SILVA, A. M.; PAPALEO, R. M. Estudo Comparativo do Desempenho de Imagens por Ressonância Magnética, Mamografia e Ecografia na Avaliação de Lesões Mamárias Benignas e Malignas. In: Revista Brasileira de Física Médica, v.12, n.2, p.23-29, 2018.

SABINO, S. M. P. de S. Implantação de um programa de qualidade clínico da mamografia: análise da efetividade em um programa de rastreamento mamográfico. In: Hospital de Câncer de Barretos, 2014.

YAFFE, M. J. Developing a quality control program for digital mammography: achievements so far and challenges to come. In: Imaging in Medicine, v .3, p.123-133, 2011.

CHENG, H.D.; CAI, X.; CHEN, X.; HU, L.; LOU X. Computer-aided detection and classification of microcalfications in mammograms: a survey. In: Pattern Recignit, v.36, p. 2967-2991, 2003.

CALDAS, F. A. A. et al. Controle de qualidade e artefatos em mamografia. In: Radiologia Brasileira, v.38, n.4, p. 295-300, 2005.

ANVISA. Instrução Normativa n°92, 2021.

SOUZA, A. V. D.; NUNES, P. F. Controle de qualidade em mamografia digital: Uma revisão integrativa. – Florianópolis, SC, 2020. 54.p.

Lee, T.; TSAI, D.Y.; SHINOHARA, N. Computerized quantitative evaluation of mammographic accreditation phantom images. In: Medical Physics, v.37, n.12, p.6323-6331.

MAMMOGRAPHIC ACCREDITATION PHANTOM – GAMMEX 156. Disponível em: https://www.supertechx-ray.com/BreastImagingandMammography/QCC/Gammex-156.php>. Último acesso 29 de agosto de 2022.

HENDRICK, R. E. et al. Quality Control Manual: Radiologist’s Section Clinical Image Section Radiologic Technologist’s Section Medical Physicist’s Section, 1999.

GOTO, R.E.; PIRES, S. R.; MEDEIROS, R.B. Hardcopy quality parameters to ensure structures detection at digital mammography. In: Radiologia Brasileira, v.46, n.3, p. 156-162, 2013.

MACIEL, V.N. Visualizador DICOM para auxílio em diagnóstico médico por imagem, 2016.

SAMPAIO, S.C. Modelagem e implementação orientada a objetos de um cliente de rede para banco de dados de imagens médicas digitais utilizando o padrão DICOM 3.0. Dissertação (Mestrado) - Universidade Federal de Santa Catarina, 1999.

CAVALCANTE, A.L.C. Fatores que influenciam na variação de dose nos exames mamográficos, Trabalho de Conclusão de Curso – Universidade Federal de Uberlândia, 2019.

VISANUYANONT, T.; GLUCHOWSKI, P.; HILLBERG, E.; et al. Automated QC for interventional systems and mammography systems. In: Radiation Protection Dosimetry, v.195, n.3-4, p.399-406, 2021.

STREAMLIT. The fast way to build and share data apps. Disponível em: https://streamlit.io. Último acesso em: 29 de agosto de 2022.

GUZMÁN, V.C.; RESTREPO, H.D.B.; HURTADO, E.S. Natural Scene Statistics of Mammography Accreditation Phantom Images. In: 2019 XXII Symposium on Image, Signal Processing and Artificial Vision (STSIVA), p. 1-5, 2019.

DICOM. DICOM PS3.1 2022D – Introduction and Overview. Disponível em: https://dicom.nema.org/medical/dicom/current/output/html/part01.html>. Último acesso em: 20 de agosto de 2022

BUSHONG, S. C. Radiologic Science for Technologists EBook: Physics, Biology, and Protection. [n.a.]: Elsevier Health Sciences, 2016. 430493 p. ISBN 9780323429429.

SANDRIK, J. M. Helathcare G. GE Digital Mammography Systems, 2007.

NECZYPOR, M. R.; VILLA REAL, J.; BOCAMINO DORO, R. Avaliação da qualidade da imagem através da análise da relação sinal-ruído e contraste-ruído em um sistema de mamografia digital. Revista Brasileira de Física Médica, v. 15, p. 622, 2021.

BERNS, E. A. et al. Quality control manual : radiologist’s section radiologic technologist’s section medical physicist’s section, 2018.

XAVIER, A.C.S. Dosimetria e qualidade da imagem em mamografia digital. Dissertação (Mestrado) – Universidade Federal de Pernambuco, 2015

BORG, M. ; ROYLE, G.J. The use of figure-of-merit (FOM) for optimisation in digital mammography : aliterature review. In: Radiation Protection Dosimetry, v. 151, n.1, p.81-88, 2012.

YILDIRAY, Y.A. Histogram based Image Quality Index. Przeglad Elektrotechniczny, 2012.

Author notes

*vivianerb@ufcspa.edu.br

Conflict of interest declaration

Conflict of Interests: The authors have declared that no conflict of interests exist.
HTML generated from XML JATS4R by