SciELO - Scientific Electronic Library Online

 
vol.16 número2Antena Rectangular con Ranuras y Muescas para Aplicaciones BiomédicasSistema de Información Gerencial para la detección del alumno en situación extraordinaria índice de autoresíndice de materiabúsqueda de artículos
Home Pagelista alfabética de revistas  

Servicios Personalizados

Revista

Articulo

Indicadores

Links relacionados

  • No hay artículos similaresSimilares en SciELO

Compartir


Programación matemática y software

versión On-line ISSN 2007-3283

Program. mat. softw. vol.16 no.2 Cuernavaca jun. 2024  Epub 17-Sep-2024

https://doi.org/10.30973/progmat/2024.16.2/2 

Articles

Software to assist in the interpretation of bone scans

Software para ayudar en la interpretación de gammagrafías óseas

Bárbara Emma Sánchez-Rinza1  * 
http://orcid.org/0000-0002-9833-7570

Alberto Jaramillo Nuñez2 
http://orcid.org/0000-0002-1995-9743

1 Facultad de Ciencias de la Computación, Benemérita Universidad Autónoma de Puebla. 14 Sur y Avenida San Claudio, 72592, Puebla, Puebla, México

2 Coordinación de Óptica, Instituto Nacional de Astrofísica, Óptica y Electrónica. Luis Enrique Erro No. 1, 72840, Tonantzintla, Puebla, Mexico


Abstract

The purpose of this work is to develop a medical system that optimizes the sensitivity of the bone scintigraphy in the diagnosis to patients with bone cancer problems, bone disease, infections, bone wear, or malignancies like bone metastasis which will monitor the deterioration of the bones caused by the disease in case. In this work the sensitivity of bone scintigraphy was improved to help in their interpretation and therefore we aid in the radiological digitization, which consists of a process that allows to obtain a digitalized image from an analogue image. Which means it is susceptible to being stored in the form of a number representing the position of a pixel point, elementary surface unit. This can be done using the means of digitization and digital image processing (PDI), in addition to the enhancement tools offered by various processes, a greater sensitivity is projected in the radiological images, to evaluate the results potential gain in the diagnostic probability offered by this digitization process. The picture formats that can be used are JPG, BMP or DICOM. To have an improvement in the radiological diagnostic sensitivity, a conversion of a grayscale image to the color map in RGB (Red, Green and Blue) must be done, representing the values of the pixels of the grayscale image as follows: (1) The lowest values will be displayed in shades of blue, (2) Intermediate values are represented in shades of green, and (3) The lowest values will be displayed in shades of red. When using this color map, the image will be different tones by the combination of the above-mentioned colors.

Keywords: Metastasis; tumor; bone scintigraphy; scintigraphy; osteomyelitis; metabolism

Resumen

El propósito de este trabajo es desarrollar un sistema médico que optimice la sensibilidad de la gammagrafía ósea en el diagnóstico de pacientes con problemas de cáncer de huesos, enfermedades óseas, infecciones, desgaste óseo o neoplasias malignas como metástasis óseas que monitoreará el deterioro de los huesos causados por la enfermedad. En este trabajo se mejoró la sensibilidad de la gammagrafía ósea para ayudar en su interpretación y por tanto ayudamos en la digitalización radiológica, que consiste en un proceso que permite obtener una imagen digitalizada a partir de una imagen analógica. Lo que significa que es susceptible de ser almacenado en forma de un número que representa la posición de un punto de píxel, unidad de superficie elemental. Esto se puede realizar utilizando los medios de digitalización y procesamiento digital de imágenes (PDI), además de las herramientas de mejora que ofrecen los diversos procesos, se proyecta una mayor sensibilidad en las imágenes radiológicas, para evaluar los resultados potenciales ganancias en la probabilidad diagnóstica que ofrece este proceso de digitalización. Los formatos de imagen que se pueden utilizar son JPG, BMP o DICOM. Para tener una mejora en la sensibilidad del diagnóstico radiológico, se debe realizar una conversión de una imagen en escala de grises al mapa de colores en RGB (Rojo, Verde y Azul), representando los valores de los píxeles de la imagen en escala de grises de la siguiente manera: (1) Los valores más bajos se mostrarán en tonos de azul, (2) Los valores intermedios se representan en tonos de verde, (3) Los valores más bajos se mostrarán en tonos de rojo. Al utilizar este mapa de colores, la imagen tendrá diferentes tonos según la combinación de los colores mencionados anteriormente.

Palabras Clave: Metástasis; tumor; gammagrafía ósea; gammagrafía; osteomielitis; metabolismo

1. Introduction

The main indication for bone scintigraphy is when you want to look for a primary tumor or metastasis in the bones, it is a study that should be done in people who have been diagnosed with cancer to determine the degree of progression of the disease, especially in those that tend to spread to the bones, as in prostate cancer, breast cancer and thyroid cancer.

It is also very useful to be able to determine if there is a bone infection, known as osteomyelitis or a suspected fracture that fails to be well visualized on an x-ray. It is also used to detect disorders of bone metabolism that may weaken them.

At present, the interpretation of analog and digital radiographs is done visually. In the case of a digital radiograph stored in 12 bits the image can be displayed in 4096 possible shades of gray, but conventional monitors can only display 256 shades so to display the image on an x-ray the significant details must have high contrast to be easily detected. When this does not occur, the information is likely to be omitted or misdiagnosed1.

This system will support the doctors who in certain occasions have some difficulty analyzing the radiographs due to several external factors that at times it is impossible to control.

One of the main objectives of this work is that the system is friendly and easy to use for doctors, which helps in the diagnosis of patients. When bones are free from metastasis its grayscale will be stable to only one or two colors whereas if the bone has some kind of anomaly, it will have multiple grayscale colors. The software’s purpose is to help specialists take better decisions; this solution is more appropriate for oncology centers that have a high number of patients due to its efficiency in time.

2. Work development

At present the innovation of the new systems is very useful for the diagnosis to the patients, since it helps in the acceleration of the diagnoses, to generate this type of system reduces problems of erroneous diagnoses. For this, a system was implemented that uses digital image processing by means of certain algorithms of identification and graphical representation of frequencies in an image. The system will be composed of a main window in which the images can be loaded, and the necessary operations performed. The criteria to determine whether a bone is healthy or not is based on specialist diagnosis on bone scintigraphy and results from grayscale intervals for image analysis.

2.1. System requirements

One of the most important concerns of Software Engineering is to guarantee the success of these projects. For which they are, subjected to different analyzes and debates as they are important in the success or failure of software projects2.

The compilation of requirements is the process of collecting information about the proposed system and the existing ones, extracting the requirements of the user and the system. The sources of information for the analysis of requirements include documentation, interviews of interested parties in the system, to establish the scope of the problem and the formulation of the solution.

2.2. User requirements

  • Software should be the tool for the doctor and the patient to interact in the diagnosis.

  • The user should be able to accommodate the images as he sees fit to obtain the best result.

  • The system must provide an understandable histogram from the two x-rays analyzed (gammagrams).

2.3. Software requirements

  • Will not depend on a specific operating system.

  • The system will be supported by any type of architecture.

  • Requires a minimum memory of 1GB for proper operation.

  • A graphic interface and VGA Monitor are required.

3. System architecture

The software architecture consists of the design of components of an application (business entities), generally using architectural patterns. The architectural design must allow visualization of the interaction between the business entities and be validated, for example, through sequence diagrams. An architectural design generally describes how a software application will be built. This is documented using diagrams, for example:

  • Class diagrams

  • Diagram of sequence

  • Deployment diagram

The first two are the minimum necessary to describe the architecture of a project that will begin to be coded. Depending on the scope of the project, complexity and needs, the computer will choose which of the diagrams is required to elaborate.

3.1. Class diagram

A class diagram serves to visualize the relationships between the classes that involve the system, which can be associative, inheritance, use and aggregation, since a class is a description of a set of objects that share the same attributes, operations, methods, relationships and semantics. The classes are represented by rectangles that show the name of the class and optionally the name of the operations and attributes3. For our system we designed the following diagram Fig. 1, which corresponds to the interface and the corresponding operations.

3.2. Use cases

Use cases are a technique for specifying the behavior of a system: "A use case is a sequence of interactions between a system and someone or something that uses some of its services."

Figure 1 Class Diagram corresponding to the diagnostic system. 

Every software system offers its environment - those who use it - a series of services. A use case is a way of expressing how someone or something external to a system uses it. When we say "someone or something" we mean that systems are used not only by people, but also by other hardware and software systems4. In our system we obtained the following Diagram of use cases (Fig. 2).

Figure 2 Use case diagram. 

3.3. Diagram of sequence

To understand the behavior of the system, a sequence diagram is created which will represent the call of operations by the user. Fig. 3 shows the behavior of the system from a sequential diagram.

Figure 3 Sequence diagram of system calls. 

4. Detailed system design

In this medical system, the design of the following modules is developed, open image, Dynamic Ranges, 50 Ranges, Apply Ranges, besides obtaining the histograms for this, it is contemplated that each of the modules indicated above has its respective flow diagrams, and thus in turn verify and validate the required data, then, each of the modules is shown in detail. All this can be seen in Fig. 4.

Figure 4 System algorithm. 

4.1. Open image

For this process the user must select the Open Image option, a menu will be displayed to choose which image to open, the user can open three different images to be evaluated, then it must be placed in a folder containing the images that are to be analyzed already either ".jpg" or ".png" format5.

4.2. Dynamic ranges

For this process the user must select the Dynamic Ranges option, a menu will be displayed to choose which image to apply the process of painting the pixels according to the values that have been defined in the labels of ranges.

4.3. 50ranges

For this process the user must select the 50 ranges option, a menu will be displayed to choose which image to apply the process of painting them in a range of 50 colors included in the RGB color map.

4.4. Apply ranges

For this process the user must press the button Apply ranges, which verifies defining values that will be used for the Dynamic Ranges process. Each time you modify the values defined in the range labels, you must press this button to update the values.

4.5. Histogram

To obtain the histogram of the images, it’s mandatory to have passed through the module of "Open Image". It is necessary to have the two images that need to be analyzed otherwise the system will launch a popup window with the indication mentioned5,6.

5. Results

Then the results of the software will be shown through a tour of their functions. First, we must execute the application, to have as output the graphical interface of the system, as shown in Fig. 5 the interface contains four tabs: Open, Dynamic Range, 50 ranges and histograms, plus a ranges panel.

Figure 5 Graphical interface of the system. 

5.1. Open Images

In the Open tab there is a menu of three sub tabs, pressing one of them will open the image to be treated, each sub tab has a quick command to select the images faster. The following Fig. 6 shows the output.

Figure 6 Open Menu tabs. 

Clicking any of the tabs will display the image that has been selected in one of the boxes. Fig. 7 shows the image that has been selected using the "Image 1" tab or the "Ctrl + A" command in the first frame.

Figure 7 Select Image 1. 

5.2. Dynamic range

In the Dynamic Range tab there is a menu of three sub tabs. When you press any of them the color ranges will be applied to the desired image, the predefined ranges are in spaces of 25 jumps, if you want to modify those jumps, they can be modified in the panel to the right. Each of the sub tabs has a quick command to apply the process faster to the images. Fig. 8 shows the output.

Figure 8 Dynamic range menu. 

When one of the tabs is selected, the result of applying the color ranges in the box below the selected image will be displayed. The following figure shows the result of applying the Dynamic Range to the processed image. Fig. 9 shows the output.

Figure 9 Obtaining an image processed by the dynamic color ranges. 

5.3. 50 ranges

In the 50 Ranges tab there is a menu of three sub tabs. Pressing any of them will apply 50 color ranges included in the RGB color map, to the desired image, the ranges are defined in spaces of 5 jumps. Each of the sub tabs has a quick command to apply the process faster to the images. The output is shown in Fig. 10.

Figure 10 Menu tabs 50 ranges. 

When choosing one of the tabs you can see the result of applying the 50 ranges of colors in the box that is below the image that has been selected. Fig. 11 shows the output after applying the 50 fixed color ranges to the processed image.

Figure 11 Result of applying the 50 color ranges to the selected image. 

5.4. Histograms

In the Histograms tab there is a menu that is divided into three sub tabs. Pressing one of them will apply a process to see the color levels that the image contains in the grayscale, this process is called histogram calculation, and is applied to the desired image. Each of the sub tabs has a quick command to apply the process faster to the images. Fig. 12 shows the output.

Figure 12 Menu tabs Histograms. 

To visualize the result of applying the process of histograms to the selected image, one of the tabs is pre-selected and the result will appear in the box below the image that has been selected. Fig. 13 shows the result of applying the histogram calculation to the processed image.

Figure 13 Calculation of histograms to obtain the intensity of shades of gray. 

5.5. Color ranges

The Color Ranges panel contains twenty labels to receive the values that will give the color ranges that will be applied in the Dynamic Ranges menu. By default, the ranges are defined in jumps of 25, the user is free to change them as desired, when finished capturing them you must press the Apply Ranges button to save the values. The panel with modified values is shown in Fig. 14.

Figure 14 Panel of ranges modified by the user. 

Once you have established the new color ranges you can press the Dynamic Ranges menu, choose the image to be processed and it will be selected, the result of applying the color ranges in the box below the image that was selected will be displayed. Fig. 15 shows the result of applying the modified Dynamic Range to the processed image.

Figure 15 Application of new values to the image treated by the dynamic ranges. 

Fig. 16 shows a comparison between three images: image in the left has a skull without metastasis in colors, then we have the center image which has a skull with bone abnormality different to metastasis and finally we have left image which shows how a skull with advanced metastasis looks like. The three images were processed with the same color code ranges we see on the right side, although these color ranges are specific to exemplify this functionality.

Figure 16 Result of applying color range Interval to 3 different skulls. 

To analize the false color we have to look at Fig. 17 which has the ideal setup, a healthy skull will have only 2 colors, royal blue for the image background and blueue for the skull. Due to the fact that the skull is made of several bones with different densities, its surface is not homogeneous that being the reason why we can visualize 2 colors. The closest image to a healthy skull it’s the middle one except for the small green section which is related to the nasal region resulting in a different color absorbtion so it should not be taken as an anolmaly. The picture on the right its also ideal except for the five small royal blue stains. Finally the image on the left has a yellow region wich may be concerning but since its placement, metastasis irs ruled out and this might be related to non-malignant lesion.

Figure 17 Result of applying the color range Interval on the right to the 3 healthy skull images. 

In Fig. 18 we have the result of applying the same color range Interval to 3 different skull images. The image on the right shows a bone anomaly in its initial state and it’s detected by the software. Since it’s an anomaly in progress it’s hard to know if it’s metastasis. This is where the specialist should apply his criteria to get a diagnosis. However due to its form and localization it can be inferred that it’s in fact metastasis. The two images left show an increment in its marker absorption, but its location and extension don’t indicate the presence of something malicious. Nevertheless, it’s advised to get the specialist analysis

Figure 18 Result of applying color range Interval to 3 skull images with anomalies. 

The software is now more robust and complete due to the implementation of functionalities that deploy colored images to the original software that does the image segmentation. Thus, now we have both functionalities in one piece of software making it easier to perform diagnosis.

6. Conclusions

Having a system as this one, can help a doctor give a better service, faster and which will be more efficient to patients, previously the doctors have had problems or some difficulty when analyzing the radiographs in addition to comparing the progress or the regression of their patients, the problems in evaluating an X-ray are due to several external factors that are sometimes impossible to control, with this system you can avoid those problems.

This system will seek to improve the diagnosis by increasing the sensitivity of the X-rays, which can evaluate the progress of a patient under treatment, see how it improves with the passage of time and if it is advisable to continue with their treatment or if it is necessary to apply a change of medicine or lifestyle, for this type of project it is important to have the necessary software to provide a better and more effective quality to the user.

A method to check the false color of a certain segmented regions of a bone scan was implemented. This functionality is adequate to be used in oncology clinics where speed and precision are a key factor.

References

Jaramillo-Núñez A. ¿Es posible incrementar la sensibilidad diagnóstica de una radiografía?. Anales de Radiología. México, 2013, 12(3), 140-146 [ Links ]

Sommerville I. Ingeniería de software. 9na. Ed., Pearson, 2011. [ Links ]

Presman, RS. Ingenieria de software un enfoque práctico. 7ma. Ed., Mc Graw Hill, 2010. [ Links ]

Pianykh, OS. Digital Imaging and Communications in Medicine (DICOM): A Practical Introduction and Survival Guide. 2nd Ed., Springer, 2009. [ Links ]

Jaramillo-Núñez A, Sánchez-Rinza B, Pérez-Meza M. Visualizando Gammagramas Óseos en Colores. Revista Mexicana de Ingeniería Biomédica, 39(3), 225-237, 2018, doi: 10.17488/rmib.39.3.2. [ Links ]

Jaramillo-Núñez A, Gómez Conde JC. Método para incrementar la sensibilidad diagnóstica del gammagrama óseo, Anales de Radiología, México, 2015, 14, 11-19. [ Links ]

Received: November 23, 2023; Accepted: May 08, 2024; Published: June 01, 2024

* Corresponding author: Bárbara Emma Sánchez-Rinza, email: rrbrinza@hotmail.com

ACERCA DE LOS AUTORES

Dra. Bárbara Emma Sánchez Rinza. Licenciada en física egresada de la BUAP, maestría en ciencias, doctorado en ciencias, especialidad en óptica egresada del INAOE, ha escrito 65 capítulos de libro nacionales e internacionales, 84 artículos en revistas nacionales e internacionales indexadas, 175 imparticiones de conferencias, en diferentes foros nacionales y extranjeros. Ha dirigido 40 tesis de licenciatura y 10 tesis de maestría y una tesis de doctorado. Pertenezce al sistema nacional de investigadores de Conacyt (SNI).

Alberto Jaramillo Núñez se graduó de Lic. en física en la Benemérita Universidad Autónoma de puebla en 1990, curso una maestría y un doctorado en óptica en el instituto nacional de astrofísica óptica y electrónica donde se graduó en 1992 y 1996, respectivamente. Actualmente sus campos de interés son el análisis de imágenes médicas e interferometría.

Creative Commons License This is an open-access article distributed under the terms of the Creative Commons Attribution License