Next Article in Journal
Virtual Teleoperation System for Mobile Manipulator Robots Focused on Object Transport and Manipulation
Next Article in Special Issue
Full-Wave Simulation of a Helmholtz Radiofrequency Coil for Magnetic Resonance Applications
Previous Article in Journal
Fault Detection of Wheelset Bearings through Vibration-Sound Fusion Data Based on Grey Wolf Optimizer and Support Vector Machine
Previous Article in Special Issue
A Review of Automatic Pain Assessment from Facial Information Using Machine Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Training Artificial Neural Networks to Detect Multiple Sclerosis Lesions Using Granulometric Data from Preprocessed Magnetic Resonance Images with Morphological Transformations

by
Edgar Rafael Ponce de Leon-Sanchez
1,*,†,
Jorge Domingo Mendiola-Santibañez
2,*,†,
Omar Arturo Dominguez-Ramirez
3,
Ana Marcela Herrera-Navarro
1,
Alberto Vazquez-Cervantes
4,
Hugo Jimenez-Hernandez
1,
Diana Margarita Cordova-Esparza
1,
María de los Angeles Cuán Hernández
2 and
Horacio Senties-Madrid
5
1
Facultad de Informática, Universidad Autónoma de Querétaro, Querétaro 76230, Mexico
2
Facultad de Ingeniería, Universidad Autónoma de Querétaro, Querétaro 76010, Mexico
3
Centro de Investigación en Tecnologías de Información y Sistemas, Universidad Autónoma del Estado de Hidalgo, Pachuca 42039, Mexico
4
Centro de Ingeniería y Desarrollo Industrial, Querétaro 76125, Mexico
5
Hospital HMG Coyoacán, Mexico City 04380, Mexico
*
Authors to whom correspondence should be addressed.
These authors contributed equally to this work.
Technologies 2024, 12(9), 145; https://doi.org/10.3390/technologies12090145
Submission received: 19 June 2024 / Revised: 26 August 2024 / Accepted: 28 August 2024 / Published: 31 August 2024
(This article belongs to the Special Issue Medical Imaging & Image Processing III)

Abstract

:
The symptoms of multiple sclerosis (MS) are determined by the location of demyelinating lesions in the white matter of the brain and spinal cord. Currently, magnetic resonance imaging (MRI) is the most common tool used for diagnosing MS, understanding the course of the disease, and analyzing the effects of treatments. However, undesirable components may appear during the generation of MRI scans, such as noise or intensity variations. Mathematical morphology (MM) is a powerful image analysis technique that helps to filter the image and extract relevant structures. Granulometry is an image measurement tool for measuring MM that determines the size distribution of objects in an image without explicitly segmenting each object. While several methods have been proposed for the automatic segmentation of MS lesions in MRI scans, in some cases, only simple data preprocessing, such as image resizing to standardize the input dimensions, has been performed before the algorithm training. Therefore, this paper proposes an MRI preprocessing algorithm capable of performing elementary morphological transformations in brain images of MS patients and healthy individuals in order to delete undesirable components and extract the relevant structures such as MS lesions. Also, the algorithm computes the granulometry in MRI scans to describe the size qualities of lesions. Using this algorithm, we trained two artificial neural networks (ANNs) to predict MS diagnoses. By computing the differences in granulometry measurements between an image with MS lesions and a reference image (without lesions), we determined the size characterization of the lesions. Then, the ANNs were evaluated with the validation set, and the performance results (test accuracy = 0.9753; cross-entropy loss = 0.0247) show that the proposed algorithm can support specialists in making decisions to diagnose MS and estimating the disease progress based on granulometry values.

1. Introduction

Multiple sclerosis (MS) is a chronic inflammatory disease of the central nervous system (CNS), characterized pathologically by demyelination and clinically by episodes of neurological dysfunction disseminated in space and time, which produces a wide variety of symptoms such as alteration of the body’s sensitivity [1]. Symptoms are determined based on the location of demyelinating lesions along the CNS [2]. Initially, MS pathology was defined as an inflammatory process associated with focal plaques of primary demyelination in the white matter of the brain and spinal cord [3]. A reliable and accurate diagnosis of MS is necessary to introduce early treatments for the disease. Disease-modifying drug therapies can help to control symptoms and prevent progression [4,5]. Currently, magnetic resonance imaging (MRI) is the most common tool for diagnosing MS, detecting MS lesions, understanding the course of the disease, and analyzing the effects of treatments [6,7].
MRI is a non-invasive method of obtaining detailed images of the internal structure of the body, such as organs and tissues. MRI uses radiofrequency (RF) radiation in the presence of controlled magnetic fields to generate cross-sectional images of the body. An MRI scan is obtained by placing the patient inside a large magnet, which induces a relatively strong external magnetic field. This causes the cores of the body atoms to align with the magnetic field, and then the RF signal is applied. The energy released from the body is detected and used to create the MRI scan via a computer [8]. As with any other data acquisition system, in the generation of MRI scans, there may be components not correlated with the desired signal, known as noise or random signals. This noise signal is generally caused by spontaneous fluctuations such as the thermal movement of free electrons within real or equivalent electrical components [9]. The signal-to-noise ratio (SNR) is essential for evaluating image quality and determining the use of image-processing techniques such as noise removal [10]. On the other hand, diagnosing MS using MRI requires a long time due to the large number of images that need to be labeled (e.g., T1-weighted, T2-weighted, and fluid-attenuated inversion recovery (FLAIR) magnetic resonance images), so the manual diagnostic approach is susceptible to errors. This can affect image quality and make it difficult to identify areas of CNS injury. Therefore, it is necessary to implement new methods for automatically processing MRI scans to remove undesirable components and correctly detect MS lesions in order to determine the progress of the disease.
Most image-processing applications require extensive analyses of the objects within an image. Segmentation refers to dividing an image into regions of interest according to their features, such as their grayscale characteristics, colors, spatial texture, and geometric shapes [11]. The most common form of segmentation is binary, where each pixel is classified as belonging to either the foreground or the background. One of the most useful methods for segmenting images is thresholding, which includes choosing an intensity value and then classifying pixels below this value as false and pixels above it as true [12]. Fully supervised, semi-supervised, and unsupervised learning have been widely applied to medical image segmentation tasks [13,14,15]. Most existing medical image segmentation approaches have applied semi-supervised learning. Semi-supervised segmentation is a more practical method since it employs large amounts of unlabeled data in conjunction with small amounts of labeled data. You et al. [16] proposed a novel contrastive voxel-wise representation learning (CVRL) method to effectively learn low-level and high-level features by capturing 3D spatial context and rich anatomical information along both the feature dimension and the batch dimension. You et al. [17] presented SimCVD, a simple contrastive voxel-wise distillation framework that performed on the same level as previous fully supervised methods with much less labeled data. You et al. [18] developed an iterative contrastive distillation algorithm (ACTION, an Anatomical-Aware Contrastive Distillation Framework) by labeling the negatives rather than employing binary supervision between positive and negative pairs. You et al. [19] introduced a novel 2D medical image segmentation framework termed Mine Your Own Anatomy (MONA), and made three contributions. First, they observed that every pixel does not have the same importance to define anatomical features. Second, they reinforced the model to decompose medical images into a collection of anatomical features. Lastly, they demonstrated the efficacy of MONA on three benchmark datasets with different labeled settings. You et al. [20] proposed a contrastive learning (CL) framework (ARCOARCO) through the concept of variance-reduced estimation. You et al. [21] also presented an improved contrastive learning framework (ACTION++) with adaptive anatomical contrast. Fully supervised segmentation aims to acquire expert-examined comments (labeled data) for training models. You et al. [22] proposed MORSE, a generic implicit neural rendering framework designed at an anatomical level to support learning in medical image segmentation. On the other hand, unsupervised segmentation only utilizes unlabeled data. You et al. [23] presented an approach based on the Wasserstein distance-guided disentangled representation to achieve 3D multi-domain liver segmentation.
Also, some deep learning tools have been developed for automated MS lesion detection/segmentation, such as computational algorithms based on convolutional neural networks (CNNs) and U-Nets [24,25,26]. Ghosh et al. [27] proposed four convolutional encoder networks (CENs) with different network architectures (U-Net, U-Net++, Linknet, and Feature Pyramid Network models) to determine the optimal MRI sequence to reduce automatic segmentation times in MS lesion detection. La Rosa et al. [28] proposed a generative adversarial network (GAN) that retrospectively generates realistic uniform images (UNIs) based on magnetization-prepared 2 rapid acquisition gradient echoes (the MP2RAGE method) from MPRAGE images in order to improve the automatic segmentation of MS lesions and tissues. Bandyopadhyay et al. [29] implemented a multi-level thresholding method using evolutionary metaheuristics. Their proposal incorporates the concept of altruism into the Harris Hawks Optimization (HHO) algorithm to improve its exploitation capabilities. Macin et al. [30] developed a machine learning (ML) model for MS diagnosis using brain MRI (axial and sagittal), wherein features were generated with a fixed-size patch-based (exemplar) feature extraction based on local phase quantization (LPQ). The resulting exemplar multiple-parameter LPQ (ExMPLPQ) features were concatenated to form a final feature vector. De Oliveira et al. [31] proposed a deep learning (DL) technique for the volumetric quantification of lesions in MRI scans of MS patients using automatic brain and lesion segmentation via two CNNs. The first CNN was used to perform brain extraction, and the second was for lesion segmentation. Acar et al. [32] proposed a CNN model for identifying MS lesions in brain FLAIR MRI scans. Hashemi et al. [33] implemented a method to segment MS lesions on FLAIR and T2 MRI scans using a modified U-Net and a modified attention U-Net. Wang et al. [34] proposed a complete CNN U-Net for the automatic segmentation of MRI scans, based on spine features and the contrast between gray levels of intervertebral discs and vertebrae. Rondinella et al. [35] implemented a model that includes a U-Net architecture augmented with a long short-term memory (LSTM) convolutional layer and an attention mechanism, capable of segmenting and quantifying MS lesions detected in MRI scans. Bose et al. [36] implemented a refined version of the fuzzy c-means (FCM) type 2 technique (EMT2FCM) to isolate diverse tissues in brain MRI scans, achieved through an improved entropy-based membership function.
While several methods have been proposed for the automated segmentation of MS lesions in MRI scans, in some cases, only simple data preprocessing, such as image resizing to standardize the input dimensions, is performed before the algorithm training. Mathematical morphology (MM) is a classic image analysis technique that helps to filter the image and extract relevant structures. Granulometry is an image measurement tool for measuring MM that determines the size distribution of objects in an image without explicitly segmenting each object [37]. Therefore, this paper proposes an alternative method based on an MRI preprocessing algorithm that includes two stages:
  • Stage 1 involves performing morphological opening transformations on brain MRI scans (of MS patients and healthy individuals diagnosed by medical experts) to delete noise and other undesirable components, and then computing the granulometry of objects in the MRI scans in order to characterize the demyelination lesions in the brain white matter caused by MS. The resulting data are used to train two artificial neural network (ANN) models to predict MS diagnoses.
  • Stage 2 involves performing morphological closing transformations on the brain MRI scans (of MS patients) to create a reference image (without lesions), and computing the granulometry of the objects within the image containing lesions and within the reference image in order to compare them. Then, the size of the MS lesions is estimated by calculating the differences in granulometry measurements. These measurements could support specialists’ decision-making processes to determine the course or progression of this disease.

2. Materials and Methods

2.1. Database

The analyzed database is the same as that used in [30], and it can be downloaded at https://www.kaggle.com/datasets/buraktaci/multiple-sclerosis (accessed on 20 October 2023). The acquired dataset includes 200 brain FLAIR MRI scans (100 axial and 100 sagittal) from MS patients and healthy individuals who attended the Ozal University Faculty of Medicine in 2021. Medical experts analyzed the sections of axial and sagittal images of MS patients with identifiable MS lesions and these were assigned to the MS class, and image sections of healthy individuals with a normal appearance, without white-matter lesions, were assigned to the healthy class.

2.2. Proposed Algorithm

This paper proposes an alternative MRI preprocessing algorithm including elementary morphological transformations on brain images of MS patients and healthy individuals (axial and sagittal MRI scans), and granulometry measurements to characterize MS lesions without affecting the original dimensions of the image. Figure 1 and Figure 2 describe the two-stage procedure of the proposed algorithm. Table 1 and Table 2 present the implemented pseudocode of the preprocessing algorithm.

Artificial Neural Network

An ANN structure consists of an input layer of neurons that receive the sample inputs X = x 1 , x 2 , , x m , and one or more hidden layers of neurons that convert the values from the previous layer into a weighted linear sum, w 1 x 1 + w 2 x 2 + + w m x m , followed by a nonlinear activation function used to learn the weights. Then, the output layer predicts the class label of the samples [38]. During the learning stage, the ANN compares the true class labels with the continuous output values of the nonlinear activation function in order to compute the classification loss and update the weights.
Our dataset was randomly divided into training (80%) and test (20%) sets to validate the ANN models. Then, the test accuracy, the Dice similarity coefficient ( D S C ), the true positive rate (TPR) or sensitivity, and the true negative rate (TNR) or specificity were computed with the validation dataset to evaluate the performance of the prediction models [39,40,41]. The D S C is given by the following equation:
D S C = 2 T P F P + 2 T P + F N ,
where T P represents the numbers of true positives, T N the true negatives, F P the false positives, and F N the false negatives. Also, the cross-entropy loss was calculated with different regularization strength values (the lambda hyperparameter) to train the ANNs. The weighted cross-entropy loss is calculated as
L = j = 1 n w j l o g ( m j ) K n ,
where the weights w j are normalized to sum to n instead of 1. The test accuracy was calculated using A c c = 1 L . The lambda value was adjusted to minimize the loss function. Table 3 describes the hyperparameters configured for the ANNs’ training.

2.3. Mathematical Morphology

MM is a powerful image analysis technique based on set theory, integral geometry, and lattice algebra. The target of morphological operators is to extract relevant structures from an image. This is achieved by testing the image with another set of known shapes called a structuring element (SE). The fundamental morphological operators need the definition of an origin for each SE. This origin allows the positioning of the SE at a given point or pixel: an SE at point x means its origin matches x. The elementary planar isotropic SEs are represented in Figure 3 for octagonal and disk graphs. The pixels that match with each elemental planar SE centered on a given pixel p correspond to the neighbors of p in the graph G plus the pixel itself p, as N ¯ G ( p ) . The shape and size of each SE are chosen according to the geometric properties of the relevant and irrelevant structures in the image. Irrelevant structures refer to noise or objects to be deleted [42].

2.4. Geodesic Transformations

Some morphological transformations include combinations of an input image with specific SEs. The geodesic transformation approach regards two input images. Initially, a morphological transformation is applied to the first image and then forced to remain either above or below the second image. In this case, morphological transformations are limited to elementary erosions and dilations. In practice, geodetic transformations are iterated until stability [43].
Geodesic dilation also involves two images: a marker image and a mask image. By definition, both images must have the same domain and the mask image must be greater than or equal to the marker image. First, the marker image is dilated by the elemental isotropic SE. Then, the resulting dilated image is forced to remain below the mask image. Therefore, the mask image acts as a limit to the spread of the marker image dilation. Let f be the marker image and g be the mask image ( D f = D g and f g ). The geodesic dilation of size 1 of the marker image f concerning the mask image g is denoted by Equation (3) and it is defined as the minimum point between the mask image and the elemental dilation δ ( 1 ) of the marker image. The geodesic dilation of a binary image is shown in Figure 4.
δ g ( 1 ) ( f ) = δ ( 1 ) ( f ) g .
Geodesic erosion is the double transformation of geodesic dilation concerning the complementation of sets:
ε g ( 1 ) ( f ) = δ ( 1 ) ( f c ) g c c ( ε ( 1 ) ( f ) ) c g c c ε ( 1 ) ( f ) g ,
where f g and ε ( 1 ) is the elemental erosion. First, the marker image is eroded and then the maximum point is computed with the mask image. Figure 5 shows an example of geodesic erosion. Here, the mask image acts as a limit for the marker image reduction.

2.5. Morphological Reconstruction

In practice, geodesic transformations of a given size are rarely used. However, when they are iterated until stability, very efficient morphological reconstruction algorithms can be created. Geodesic transformations of bounded images always converge after a finite period of iterations (i.e., until the mask image completely obstructs the propagation of the marker image and stops it from being reduced). The morphological reconstruction of a mask image g from a marker image f is based on this principle. Geodesic transformations by reconstruction allow the deletion of some undesired components without considerably affecting the remaining structures [43].
Like geodesic dilations and erosions, the iteration of the autodual geodesic transformation v always achieves stability for a definition domain of a bounded image. The corresponding transformation is known as the self-dual reconstruction of a mask image g from a marker image f, and it is defined as follows:
R g v ( f ) = v g ( i ) ( f ) ,
where i exists such that v g ( i + 1 ) ( f ) = v g ( i ) ( f ) . Figure 6 displays self-dual reconstruction. In practice, self-dual reconstruction can be obtained by computing erosion and dilation reconstruction in parallel, determining the output at a given pixel x alternating between erosion and dilation reconstruction depending on whether f ( x ) is above or below g ( x ) :
R g v ( f ) ( x ) = R g δ ( f ) ( x ) , i f f ( x ) g ( x ) R g ε ( f ) ( x ) , o t h e r w i s e .

Opening and Closing by Reconstruction

For morphological reconstruction, the erosion and dilation of size 1 are iterated until stability is achieved. The geodesic dilation δ f 1 ( g ) and the geodesic erosion ε f 1 ( g ) of size 1 are given by δ f 1 ( g ) = f δ ( g ) with g f , and ε f 1 ( g ) = f ε ( g ) with g f , respectively. When the function g is equal to the morphological erosion or dilation of the original function, the opening by reconstruction γ ˜ μ B ( f ) ( x ) is given as
γ ˜ μ B ( f ) ( x ) = δ f 1 δ f 1 δ f 1 ( ε μ B ( f ) ) ( x ) , U n t i l s t a b i l i t y
or the closing by reconstruction φ ˜ μ B ( f ) ( x ) is given as
φ ˜ μ B ( f ) ( x ) = ε f 1 ε f 1 ε f 1 ( δ μ B ( f ) ) ( x ) , U n t i l s t a b i l i t y
where B represents the SE and μ is a size parameter. For this research, a disk-shaped SE with radius r = μ ( r B = μ B ) was chosen. For example, a disk of radius r = 5 represents a disk of 9 × 9 pixels; therefore, 9 neighbors are analyzed in this study. So, an SE of size n consists of a disk of ( 2 n 1 ) × ( 2 n 1 ) pixels.

2.6. Image Measurements

Image measurements aim to characterize objects in an image by computing some numerical values. For a given criterion, the measurement is discriminant if the obtained values for objects satisfying this criterion differ from those for all other objects. MM provides various image measurement tools, such as pattern spectrography or granulometry, direction analysis, texture analysis, shape description, etc. These measures define a vector of features that can be used as an input for a statistical analysis or classification method [42].
Granulometry determines the size distribution of objects in an image without explicitly segmenting (detecting) each object, and it is used in some areas to describe the features of the size and shape of individual granules within an object [44]. The formal definition of this concept is presented below.
Let ( ψ λ ) λ Z be a transformation family depending on a unique positive parameter λ . This family comprises a granulometry if, and only if, the following properties are fulfilled: (i) λ is a positive, and Ψ λ is increasing; (ii) λ is a positive, and Ψ λ is antiextensional; (iii) λ and μ are positives, and Ψ λ Ψ μ = Ψ m a x ( λ , μ ) .
In particular, the family of morphological openings and closings for the numerical instance γ μ B , φ μ B with μ = { 1 , 2 , , n } satisfy the previous definition.
The granulometric measurement associated with the clear regions is denoted as χ , and it is computed as
χ = v o l [ γ ( μ 1 ) B ( f ) ( x ) ] v o l [ γ ( μ ) B ( f ) ( x ) ] v o l [ f ( x ) ] ,
where v o l refers to the total number of pixels in an image. The granulometric measurement associated with the dark regions is denoted as ζ and is calculated as
ζ = v o l [ φ μ B ( f ) ( x ) ] v o l [ φ ( μ 1 ) B ( f ) ( x ) ] v o l [ f ( x ) ] .

3. Results

The proposed MRI preprocessing algorithm was implemented on 100 MS sample images (axial) and 100 healthy sample images (sagittal). Also, granulometry was calculated to acquire relevant information about some structures in the brain images. In particular, the morphological opening transformation was used as a filter that satisfies the definition of granulometry and mainly affects the clear regions directly associated with MS lesions.

3.1. Algorithm (Stage 1)

In the first stage, the preprocessing algorithm was implemented for all MS and healthy images (axial and sagittal MRI). Figure 7 and Figure 8 describe the results obtained with the applied opening morphological transformations.
Then, the granulometry of objects was computed for all MRI samples for SEs of different radius values ( r = 1 , 2 , 3 , , 15 ). Figure 9 compares the granulometry measurement results between the brain images of two MS patients (axial and sagittal) and those of two healthy individuals (axial and sagittal) with similar dimensions (569 × 1158 pixels, respectively).
After granulometry was computed, the resulting data were entered into two arrays (100 × 15 samples) to train the ANNs. Figure 10 displays the values of the sum of granulometry for 80 MRI samples (axial and sagittal).
Then, the performance metrics ( D S C , sensitivity, and specificity) were computed using the confusion matrix results to evaluate the ANN models. Figure 11 shows the classifications of the ANNs’ predictions.
Also, the cross-entropy loss was calculated with different regularization strength values; the corresponding results are displayed in Figure 12.
The ANNs were trained using the best lambda regularization strengths. Figure 13 and Figure 14 show the loss function’s behavior throughout different iterations.
Table 4 compares the performance metric results between the implemented ANN models.

3.2. Algorithm (Stage 2)

In the second stage of the implemented algorithm, the MS lesion areas (acquired at the intensity adjustment step) were subtracted from the mask image (original image), and the morphological closing transformation of the resulting image (with lesion holes) was computed. Then, the image was closed by reconstruction to fill the holes, and a reference image (without lesions) was created to be compared with the mask image (with lesions). The previous procedure was applied to two MS sample images (axial and sagittal), and the results are displayed in Figure 15 and Figure 16.
Finally, the granulometry of objects in the mask image and the reference image was computed. Figure 17 and Figure 18 show the granulometry results for two MS sample images (axial and sagittal). The observed differences demonstrate that it is possible to estimate the size of MS lesions by computing the granulometry of objects within a mask image (with lesions) and a reference image (without lesions).

4. Discussion

Segmentation is useful for analyzing and identifying damaged tissues or other abnormalities in MRI scans and for different tasks such as disease diagnosis [11]. Although several computational models have been proposed for the automatic segmentation of MS lesions in MRI scans, in some cases, only simple data preprocessing (image resizing to standardize the input dimensions) has been performed before the algorithm training [27,28,29,37]. Therefore, this paper proposes an MRI preprocessing algorithm based on elementary morphological transformations and granulometry computing. The algorithm helps filter the image by eliminating undesired components without affecting its original dimensions. Also, it improves the characterization of MS lesions by extracting only the relevant structures.
For the first stage of the proposed algorithm, morphological opening transformations were performed on the brain images to identify high-intensity objects (clear objects that can be associated with MS lesions), followed by intensity adjustment to increase the contrast and extract the relevant structures. Also, the granulometry of objects in the preprocessed images was computed. The granulometry results in Figure 9 show that the intensity values for MS brains are higher than those for healthy brains, meaning that these measurements are directly associated with the lesions. Then, these granulometry values were used to train two ANN models to predict MS diagnoses. The performance metric results in Table 4 prove that granulometry measurements work as efficient predictors to train ANN models. In this way, this algorithm can support the decisions of specialists when diagnosing MS based on granulometry computing. Also, the loss function behavior in Figure 13 and Figure 14 indicates that it is not necessary to spend so much time tuning the hyperparameters of a learning model; it is possible to minimize the loss by only adjusting the regularization strength hyperparameter (lambda). Table 5 presents the performance results reported in some other studies concerning the analysis of MS lesions in MRI scans. According to these data, the results obtained in our paper show a high accuracy (0.9753) and the highest D S C value (1.0) compared to other studies. A limitation of this paper is that some MRI scans available in the analyzed database had different dimensions, so only 100 images of MS patients (axial and sagittal) and 100 images of healthy individuals (axial and sagittal) were chosen, with dimensions of 569 × 1158 × 3 pixels.
In the second stage of the implemented algorithm, morphological closing transformations were performed on brain MRI scans (of MS patients) to create an image of a healthy brain (the reference image approach). Then, the granulometry of the objects within the images containing MS lesions and the reference image was computed to determine the size of the lesions. The results in Figure 12 and Figure 13 show that it is possible to estimate the size of MS lesions by calculating the difference in granulometry measurements at each data point. These measurements could support specialists and decision-makers to estimate the progress of this disease and possibly prescribe certain specific treatments.
In order to validate the findings of this paper, the results were analyzed by a neurologist expert. He remarked that characterizing the size of lesions based on granulometry measurements could be useful for monitoring periods of disease activity (new plaques in MS), monitoring the progress of other demyelinating diseases such as Devic disease [45] (at the spinal cord level), and monitoring the growth of low-grade glioma tumors or even glioblastoma multiform (GBM) tumors [46] (in order to evaluate the tumor’s response to treatment and reduce its growth).

Author Contributions

Conceptualization, E.R.P.d.L.-S. and J.D.M.-S.; methodology, E.R.P.d.L.-S. and J.D.M.-S.; software, E.R.P.d.L.-S.; validation, H.S.-M.; formal analysis, O.A.D.-R., A.M.H.-N., A.V.-C., H.J.-H., D.M.C.-E. and M.d.l.A.C.H.; investigation, E.R.P.d.L.-S.; resources, J.D.M.-S., O.A.D.-R., A.M.H.-N., A.V.-C., H.J.-H., D.M.C.-E., M.d.l.A.C.H. and H.S.-M.; writing—original draft preparation, E.R.P.d.L.-S.; writing—review and editing, E.R.P.d.L.-S. and J.D.M.-S.; supervision, O.A.D.-R., A.M.H.-N., A.V.-C., H.J.-H., D.M.C.-E. and M.d.l.A.C.H.; project administration, E.R.P.d.L.-S., J.D.M.-S. and O.A.D.-R. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

This research has been approved on ethical grounds by the Non-Interventional Research Ethics Board Decisions, Turgut Ozal University on 3 March 2022.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in the study are included in the article.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
MSmultiple sclerosis;
MRImagnetic resonance imaging;
MMmathematical morphology;
ANNartificial neural network;
CNScentral nervous system;
RFradiofrequency;
SNRsignal-to-noise ratio;
FLAIRfluid-attenuated inversion recovery;
CNNconvolutional neural network;
CENconvolutional encoder network;
GANgenerative adversarial network;
MP2RAGEmagnetization-prepared 2 rapid acquisition gradient echoes;
UNIuniform image;
HHOHarris Hawks Optimization;
MLmachine learning;
LPQlocal phase quantization;
ExMPLPQexemplar multiple-parameter local phase quantization;
LSTMlong short-term memory;
FCMfuzzy c-means;
SEstructuring element;
D S C Dice similarity coefficient;
TPRtrue positive rate;
TNRtrue negative rate.

References

  1. Fernández, O.; Fernández, V.E.; Guerrero, M. Esclerosis múltiple. Med. Programa Form. Méd. 2015, 11, 4610–4621. [Google Scholar] [CrossRef]
  2. Milo, R.; Miller, A. Revised diagnostic criteria of multiple sclerosis. Autoimmun. Rev. 2014, 13, 518–524. [Google Scholar] [CrossRef]
  3. Marrodan, M.; Gaitán, M.I.; Correale, J. Spinal cord involvement in ms and other demyelinating diseases. Biomedicines 2020, 8, 130. [Google Scholar] [CrossRef]
  4. Hočevar, K.; Ristić, S.; Peterlin, B. Pharmacogenomics of multiple sclerosis: A systematic review. Front. Neurol. 2019, 10, 134. [Google Scholar] [CrossRef] [PubMed]
  5. Washington, F.; Langdon, D. Factors affecting adherence to disease-modifying therapies in multiple sclerosis: Systematic review. J. Neurol. 2022, 269, 1861–1872. [Google Scholar] [CrossRef] [PubMed]
  6. Lladó, X.; Oliver, A.; Cabezas, M.; Freixenet, J.; Vilanova, J.C.; Quiles, A.; Rovira, À. Segmentation of multiple sclerosis lesions in brain MRI: A review of automated approaches. Inf. Sci. 2012, 186, 164–185. [Google Scholar] [CrossRef]
  7. Wildner, P.; Stasiołek, M.; Matysiak, M. Differential diagnosis of multiple sclerosis and other inflammatory CNS diseases. Mult. Scler. Relat. Disord. 2020, 37, 101452. [Google Scholar] [CrossRef]
  8. Katti, G.; Ara, S.A.; Shireen, A. Magnetic resonance imaging (MRI)—A review. Int. J. Dent. Clin. 2011, 3, 65–70. [Google Scholar]
  9. Xia, Y. Essential Concepts in MRI: Physics, Instrumentation, Spectroscopy and Imaging; John Wiley & Sons: Hoboken, NJ, USA, 2022. [Google Scholar]
  10. Bharati, S.; Khan, T.Z.; Podder, P.; Hung, N.Q. A comparative analysis of image denoising problem: Noise models, denoising filters and applications. In Cognitive Internet of Medical Things for Smart Healthcare: Services and Applications; Springer: Cham, Switzerland, 2021; pp. 49–66. [Google Scholar]
  11. Liu, X.; Song, L.; Liu, S.; Zhang, Y. A review of deep-learning-based medical image segmentation methods. Sustainability 2021, 13, 1224. [Google Scholar] [CrossRef]
  12. Norouzi, A.; Rahim, M.S.M.; Altameem, A.; Saba, T.; Rad, A.E.; Rehman, A.; Uddin, M. Medical image segmentation methods, algorithms, and applications. IETE Tech. Rev. 2014, 31, 199–213. [Google Scholar] [CrossRef]
  13. Jiao, R.; Zhang, Y.; Ding, L.; Xue, B.; Zhang, J.; Cai, R.; Jin, C. Learning with limited annotations: A survey on deep semi-supervised learning for medical image segmentation. Comput. Biol. Med. 2023, 169, 107840. [Google Scholar] [CrossRef] [PubMed]
  14. You, C.; Zhao, R.; Liu, F.; Dong, S.; Chinchali, S.; Topcu, U.; Duncan, J. Class-aware adversarial transformers for medical image segmentation. Adv. Neural Inf. Process. Syst. 2022, 35, 29582–29596. [Google Scholar] [PubMed]
  15. You, C.; Xiang, J.; Su, K.; Zhang, X.; Dong, S.; Onofrey, J.; Duncan, J.S. Incremental learning meets transfer learning: Application to multi-site prostate mri segmentation. In International Workshop on Distributed, Collaborative, and Federated Learning; Springer Nature: Cham, Switzerland, 2022; pp. 3–16. [Google Scholar]
  16. You, C.; Zhao, R.; Staib, L.H.; Duncan, J.S. Momentum contrastive voxel-wise representation learning for semi-supervised volumetric medical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention; Springer Nature: Cham, Switzerland, 2022; pp. 639–652. [Google Scholar]
  17. You, C.; Zhou, Y.; Zhao, R.; Staib, L.; Duncan, J.S. Simcvd: Simple contrastive voxel-wise representation distillation for semi-supervised medical image segmentation. IEEE Trans. Med. Imaging 2022, 41, 2228–2237. [Google Scholar] [CrossRef]
  18. You, C.; Dai, W.; Min, Y.; Staib, L.; Duncan, J.S. Bootstrapping semi-supervised medical image segmentation with anatomical-aware contrastive distillation. In International Conference on Information Processing in Medical Imaging; Springer Nature: Cham, Switzerland, 2022; pp. 641–653. [Google Scholar]
  19. You, C.; Dai, W.; Liu, F.; Min, Y.; Su, H.; Zhang, X.; Duncan, J.S. Mine your own anatomy: Revisiting medical image segmentation with extremely limited labels. arXiv 2022, arXiv:2209.13476. [Google Scholar]
  20. You, C.; Dai, W.; Min, Y.; Liu, F.; Clifton, D.; Zhou, S.K.; Duncan, J. Rethinking semi-supervised medical image segmentation: A variance-reduction perspective. Adv. Neural Inf. Process. Syst. 2024, 36, 9984–10021. [Google Scholar]
  21. You, C.; Dai, W.; Min, Y.; Staib, L.; Sekhon, J.; Duncan, J.S. Action++: Improving semi-supervised medical image segmentation with adaptive anatomical contrast. In International Conference on Medical Image Computing and Computer-Assisted Intervention; Springer Nature: Cham, Switzerland, 2023; pp. 194–205. [Google Scholar]
  22. You, C.; Dai, W.; Min, Y.; Staib, L.; Duncan, J.S. Implicit anatomical rendering for medical image segmentation with stochastic experts. In International Conference on Medical Image Computing and Computer-Assisted Intervention; Springer Nature: Cham, Switzerland, 2023; pp. 561–571. [Google Scholar]
  23. You, C.; Yang, J.; Chapiro, J.; Duncan, J.S. Unsupervised wasserstein distance guided domain adaptation for 3d multi-domain liver segmentation. In Interpretable and Annotation-Efficient Learning for Medical Image Computing: Third International Workshop, iMIMIC 2020, Second International Workshop, MIL3ID 2020, and 5th International Workshop, LABELS 2020, Held in Conjunction with MICCAI; Proceedings 3; Springer International Publishing: Berlin/Heidelberg, Germany, 2020; pp. 155–163. [Google Scholar]
  24. Spagnolo, F.; Depeursinge, A.; Schädelin, S.; Akbulut, A.; Müller, H.; Barakovic, M.; Granziera, C. Automated MS lesion detection and segmentation in clinical workflow: A systematic review. Neuroimage Clin. 2023, 39, 103491. [Google Scholar] [CrossRef] [PubMed]
  25. Schlaeger, S.; Shit, S.; Eichinger, P.; Hamann, M.; Opfer, R.; Krüger, J.; Hedderich, D.M. AI-based detection of contrast-enhancing MRI lesions in patients with multiple sclerosis. Insights Into Imaging 2023, 14, 123. [Google Scholar] [CrossRef]
  26. Shen, D.; Wu, G.; Suk, H.I. Deep learning in medical image analysis. Annu. Rev. Biomed. Eng. 2017, 19, 221–248. [Google Scholar] [CrossRef]
  27. Ghosh, S.; Huo, M.; Shawkat, M.S.A.; McCalla, S. Using convolutional encoder networks to determine the optimal magnetic resonance image for the automatic segmentation of multiple sclerosis. Appl. Sci. 2021, 11, 8335. [Google Scholar] [CrossRef]
  28. La Rosa, F.; Yu, T.; Barquero, G.; Thiran, J.P.; Granziera, C.; Cuadra, M.B. MPRAGE to MP2RAGE UNI translation via generative adversarial network improves the automatic tissue and lesion segmentation in multiple sclerosis patients. Comput. Biol. Med. 2021, 132, 104297. [Google Scholar] [CrossRef]
  29. Bandyopadhyay, R.; Kundu, R.; Oliva, D.; Sarkar, R. Segmentation of brain MRI using an altruistic Harris Hawks’ Optimization algorithm. Knowl.-Based Syst. 2021, 232, 107468. [Google Scholar] [CrossRef]
  30. Macin, G.; Tasci, B.; Tasci, I.; Faust, O.; Barua, P.D.; Dogan, S.; Acharya, U.R. An accurate multiple sclerosis detection model based on exemplar multiple parameters local phase quantization: ExMPLPQ. Appl. Sci. 2022, 12, 4920. [Google Scholar] [CrossRef]
  31. de Oliveira, M.; Piacenti-Silva, M.; da Rocha, F.C.G.; Santos, J.M.; Cardoso, J.D.S.; Lisboa-Filho, P.N. Lesion volume quantification using two convolutional neural networks in MRIs of multiple sclerosis patients. Diagnostics 2022, 12, 230. [Google Scholar] [CrossRef]
  32. Acar, Z.Y.; Başçiftçi, F.; Ekmekci, A.H. Convolutional Neural Network model for identifying Multiple Sclerosis on brain FLAIR MRI. Sustain. Comput. Inform. Syst. 2022, 35, 100706. [Google Scholar]
  33. Hashemi, M.; Akhbari, M.; Jutten, C. Delve into multiple sclerosis (MS) lesion exploration: A modified attention U-net for MS lesion segmentation in brain MRI. Comput. Biol. Med. 2022, 145, 105402. [Google Scholar] [CrossRef] [PubMed]
  34. Wang, Z.; Xiao, P.; Tan, H. Spinal magnetic resonance image segmentation based on U-net. J. Radiat. Res. Appl. Sci. 2023, 16, 100627. [Google Scholar] [CrossRef]
  35. Rondinella, A.; Crispino, E.; Guarnera, F.; Giudice, O.; Ortis, A.; Russo, G.; Battiato, S. Boosting multiple sclerosis lesion segmentation through attention mechanism. Comput. Biol. Med. 2023, 161, 107021. [Google Scholar] [CrossRef]
  36. Bose, A.; Maulik, U.; Sarkar, A. An entropy-based membership approach on type-II fuzzy set (EMT2FCM) for biomedical image segmentation. Eng. Appl. Artif. Intell. 2024, 127, 107267. [Google Scholar] [CrossRef]
  37. de Arruda, A.L.C.; Vital, D.A.; Kitamura, F.C.; Abdala, N.; Moraes, M.C. Multiple sclerosis segmentation method in magnetic resonance imaging using fuzzy connectedness, binarization, mathematical morphology, and 3D reconstruction. Res. Biomed. Eng. 2020, 36, 291–301. [Google Scholar] [CrossRef]
  38. Casalino, G.; Castellano, G.; Consiglio, A.; Nuzziello, N.; Vessio, G. MicroRNA expression classification for pediatric multiple sclerosis identification. J. Ambient. Intell. Humaniz. Comput. 2023, 14, 15851–15860. [Google Scholar] [CrossRef]
  39. Sudre, C.H.; Li, W.; Vercauteren, T.; Ourselin, S.; Jorge Cardoso, M. Generalised Dice Overlap as a Deep Learning Loss Function for Highly Unbalanced Segmentations; Springer: Cham, Switzerland, 2017; Volume 10553, pp. 240–248. [Google Scholar]
  40. Cardenas, C.E.; McCarroll, R.E.; Court, L.E.; Elgohari, B.A.; Elhalawani, H.; Fuller, C.D.; Aristophanous, M. Deep learning algorithm for auto-delineation of high-risk oropharyngeal clinical target volumes with built-in dice similarity coefficient parameter optimization function. Int. J. Radiat. Oncol. Biol. Phys. 2018, 101, 468–478. [Google Scholar] [CrossRef] [PubMed]
  41. Goyal, M.; Khanna, D.; Rana, P.S.; Khaibullin, T.; Martynova, E.; Rizvanov, A.A.; Khaiboullina, S.F.; Baranwal, M. Computational intelligence technique for prediction of multiple sclerosis based on serum cytokines. Front. Neurol. 2019, 10, 781. [Google Scholar] [CrossRef] [PubMed]
  42. Soille, P. Morphological Image Analysis: Principles and Applications; Springer: Berlin/Heidelberg, Germany, 1999; Volume 2, pp. 170–171. [Google Scholar]
  43. Soille, P. Geodesic transformations. In Morphological Image Analysis: Principles and Applications; Springer: Berlin/Heidelberg, Germany, 2004; pp. 183–218. [Google Scholar]
  44. Santibáñez, J.D.M.; Duarte, M.G.; Retana, J.J.O.; Campos, C.E.L. Segmentación y análisis granulométrico de sustancia blanca y gris en IRM para el estudio del estrabismo usando transformaciones morfológicas. Rev. Mex. Ing. Bioméd. 2007, 28, 13. [Google Scholar]
  45. Sharma, K.; Seachrist, E.; Tolaymat, S.; Joseph, J.; Feizi, P.; Sriwastava, S. Beyond MS: Other demyelinating disorders and common mimickers. In Clinical Aspects of Multiple Sclerosis Essentials and Current Updates; Elsevier: Amsterdam, The Netherlands, 2024; pp. 97–133. [Google Scholar]
  46. Aghajani, M.; Jalilzadeh, N.; Aghebati-Maleki, A.; Yari, A.; Tabnak, P.; Mardi, A.; Baradaran, B. Current approaches in glioblastoma multiforme immunotherapy. Clin. Transl. Oncol. 2024, 26, 1584–1612. [Google Scholar] [CrossRef]
Figure 1. First-stage procedure of the proposed algorithm. Opening morphological transformations on MS and healthy brain scans and granulometry measurements to predict MS diagnosis.
Figure 1. First-stage procedure of the proposed algorithm. Opening morphological transformations on MS and healthy brain scans and granulometry measurements to predict MS diagnosis.
Technologies 12 00145 g001
Figure 2. Second-stage procedure of the proposed algorithm. Closing morphological transformations on MS brain scans and granulometry measurements to estimate the course of the disease.
Figure 2. Second-stage procedure of the proposed algorithm. Closing morphological transformations on MS brain scans and granulometry measurements to estimate the course of the disease.
Technologies 12 00145 g002
Figure 3. Elementary flat isotropic SEs for octagonal and disk graphs: (a) Diamond. (b) Octagon. (c) Disk. The origin of each of these SEs is at their center.
Figure 3. Elementary flat isotropic SEs for octagonal and disk graphs: (a) Diamond. (b) Octagon. (c) Disk. The origin of each of these SEs is at their center.
Technologies 12 00145 g003
Figure 4. Geodesic dilation of a binary image or set Y within a geodesic mask X. The marker set is first dilated by the elementary isotropic SE and then intersected with the geodesic mask: δ X ( 1 ) ( Y ) = δ ( 1 ) ( Y ) X .
Figure 4. Geodesic dilation of a binary image or set Y within a geodesic mask X. The marker set is first dilated by the elementary isotropic SE and then intersected with the geodesic mask: δ X ( 1 ) ( Y ) = δ ( 1 ) ( Y ) X .
Technologies 12 00145 g004
Figure 5. Geodesic erosion of a 1D marker signal f with respect to a mask signal g. Owing to the point-wise maximum operator, all pixels of the elementary erosion of f with values lower than g are set to the value of g.
Figure 5. Geodesic erosion of a 1D marker signal f with respect to a mask signal g. Owing to the point-wise maximum operator, all pixels of the elementary erosion of f with values lower than g are set to the value of g.
Technologies 12 00145 g005
Figure 6. Self-dual morphological reconstruction R v of a mask image g from a marker image f.
Figure 6. Self-dual morphological reconstruction R v of a mask image g from a marker image f.
Technologies 12 00145 g006
Figure 7. Implementation of opening morphological transformations: (a) Mask image (MS axial). (b) Morphological opening. (c) Opening by reconstruction. (d) Intensity adjustment. One of the targets of the first stage was to highlight the lesion areas in MS samples (axial MRI scans) using a disk-shaped SE of radius r = 5 .
Figure 7. Implementation of opening morphological transformations: (a) Mask image (MS axial). (b) Morphological opening. (c) Opening by reconstruction. (d) Intensity adjustment. One of the targets of the first stage was to highlight the lesion areas in MS samples (axial MRI scans) using a disk-shaped SE of radius r = 5 .
Technologies 12 00145 g007
Figure 8. Implementation of opening morphological transformations: (a) Mask image (MS sagittal). (b) Morphological opening. (c) Opening by reconstruction. (d) Intensity adjustment. One of the targets of the first stage was to highlight the lesion areas in MS samples (sagittal MRI scans) using a disk-shaped SE of radius r = 5 .
Figure 8. Implementation of opening morphological transformations: (a) Mask image (MS sagittal). (b) Morphological opening. (c) Opening by reconstruction. (d) Intensity adjustment. One of the targets of the first stage was to highlight the lesion areas in MS samples (sagittal MRI scans) using a disk-shaped SE of radius r = 5 .
Technologies 12 00145 g008
Figure 9. Comparison of granulometry measurements in preprocessed brain images using the proposed algorithm (Stage 1): (a) MS axial image (SumVolGranu = 0.1011). (b) Healthy axial image (SumVolGranu = 0.0786). (c) MS sagittal image (SumVolGranu = 0.1389). (d) Healthy sagittal image (SumVolGranu = 0.1079). The sum of intensity values of objects (sumVolGranu) in MS brains is higher than that in healthy brains, due to the presence of lesion regions.
Figure 9. Comparison of granulometry measurements in preprocessed brain images using the proposed algorithm (Stage 1): (a) MS axial image (SumVolGranu = 0.1011). (b) Healthy axial image (SumVolGranu = 0.0786). (c) MS sagittal image (SumVolGranu = 0.1389). (d) Healthy sagittal image (SumVolGranu = 0.1079). The sum of intensity values of objects (sumVolGranu) in MS brains is higher than that in healthy brains, due to the presence of lesion regions.
Technologies 12 00145 g009
Figure 10. Comparison of the sum of granulometry of objects. The sum of granulometry values in MS samples (axial and sagittal) is higher than that in healthy ones.
Figure 10. Comparison of the sum of granulometry of objects. The sum of granulometry values in MS samples (axial and sagittal) is higher than that in healthy ones.
Technologies 12 00145 g010
Figure 11. Confusion matrix of predictions. ANN (axial) results: T P = 10 (true positives correctly classified as MS), T N = 10 (true negatives correctly classified as healthy), F P = 0 (false positives correctly classified as MS), and F N = 0 (false negatives correctly classified as healthy). ANN (sagittal) results: T P = 8 (true positives correctly classified as MS), T N = 10 (true negatives correctly classified as healthy), F P = 2 (false positives incorrectly classified as MS), and F N = 0 (false negatives correctly classified as healthy).
Figure 11. Confusion matrix of predictions. ANN (axial) results: T P = 10 (true positives correctly classified as MS), T N = 10 (true negatives correctly classified as healthy), F P = 0 (false positives correctly classified as MS), and F N = 0 (false negatives correctly classified as healthy). ANN (sagittal) results: T P = 8 (true positives correctly classified as MS), T N = 10 (true negatives correctly classified as healthy), F P = 2 (false positives incorrectly classified as MS), and F N = 0 (false negatives correctly classified as healthy).
Technologies 12 00145 g011
Figure 12. Cross-entropy loss function vs regularization strength graph. The corresponding lambda hyperparameters, X = 0.005 (axial) and X = 0.02 (sagittal), were adjusted to minimize the loss functions. At these points, the loss functions achieved the lowest values: Y = 0.0272 (axial) and Y = 0.0632 (sagittal), respectively.
Figure 12. Cross-entropy loss function vs regularization strength graph. The corresponding lambda hyperparameters, X = 0.005 (axial) and X = 0.02 (sagittal), were adjusted to minimize the loss functions. At these points, the loss functions achieved the lowest values: Y = 0.0272 (axial) and Y = 0.0632 (sagittal), respectively.
Technologies 12 00145 g012
Figure 13. ANN (axial) cross-entropy loss function behavior. At the 20th iteration (X = 20), the loss function converged to approximately Y = 0.0416.
Figure 13. ANN (axial) cross-entropy loss function behavior. At the 20th iteration (X = 20), the loss function converged to approximately Y = 0.0416.
Technologies 12 00145 g013
Figure 14. ANN (sagittal) cross-entropy loss function behavior. At the 20th iteration (X = 20), the loss function converged to approximately Y = 0.100. So, the axial ANN loss function achieved the lowest value when compared to the sagittal ANN loss function.
Figure 14. ANN (sagittal) cross-entropy loss function behavior. At the 20th iteration (X = 20), the loss function converged to approximately Y = 0.100. So, the axial ANN loss function achieved the lowest value when compared to the sagittal ANN loss function.
Technologies 12 00145 g014
Figure 15. Implementation of closing morphological transformations (MS axial): (a) Mask image (MS axial). (b) Mask image minus MS lesions. (c) Morphological closing. (d) Closing by reconstruction (reference image or healthy brain approach).
Figure 15. Implementation of closing morphological transformations (MS axial): (a) Mask image (MS axial). (b) Mask image minus MS lesions. (c) Morphological closing. (d) Closing by reconstruction (reference image or healthy brain approach).
Technologies 12 00145 g015
Figure 16. Implementation of closing morphological transformations (MS sagittal): (a) Mask image (MS sagittal). (b) Mask image minus MS lesions. (c) Morphological closing. (d) Closing by reconstruction (reference image or healthy brain approach).
Figure 16. Implementation of closing morphological transformations (MS sagittal): (a) Mask image (MS sagittal). (b) Mask image minus MS lesions. (c) Morphological closing. (d) Closing by reconstruction (reference image or healthy brain approach).
Technologies 12 00145 g016
Figure 17. Granulometry measurements (axial) of the mask image and the reference image using a disk-shaped SE with different radius values ( r = 1 , 2 , 3 , , 15 ). The size of MS lesions is estimated by calculating the difference between each data point.
Figure 17. Granulometry measurements (axial) of the mask image and the reference image using a disk-shaped SE with different radius values ( r = 1 , 2 , 3 , , 15 ). The size of MS lesions is estimated by calculating the difference between each data point.
Technologies 12 00145 g017
Figure 18. Granulometry measurements (sagittal) of the mask image and the reference image using a disk-shaped SE with different radius values ( r = 1 , 2 , 3 , , 15 ).
Figure 18. Granulometry measurements (sagittal) of the mask image and the reference image using a disk-shaped SE with different radius values ( r = 1 , 2 , 3 , , 15 ).
Technologies 12 00145 g018
Table 1. Implemented pseudocode of the MRI preprocessing algorithm (Stage 1).
Table 1. Implemented pseudocode of the MRI preprocessing algorithm (Stage 1).
Pseudocode
Start
rgb = readImg(‘sample’.png)
grayScale = rgbTogray(rgb)
maskImg = grayScale
markerImg1 = morphOpen(maskImg, SE 1(‘disk’, 5))
openRec1 = openRec(markerImg1, maskImg)
MSlesions = intensityAdjust(openRec1)
volMaskImg1 = 1.0×sum(maskImg)
Forradius = 1:15
markerImg2 = morphOpen(maskImg, SE(‘disk’, radius − 1))
openRec2 = openRec(markerImg2, maskImg)
volOpenRec1 = sum(openRec2)
markerImg3 = morphOpen(maskImg, SE(‘disk’, radius))
openRec3 = openRec(markerImg3, maskImg)
volOpenRec2 = sum(openRec3)
volGranu(radius) = (volOpenRec1 − volOpenRec2)/volMaskImg1
End
1 Structuring element.
Table 2. Implemented pseudocode of the MRI preprocessing algorithm (Stage 2).
Table 2. Implemented pseudocode of the MRI preprocessing algorithm (Stage 2).
Pseudocode
Start
subtract = imgSub(maskImg, MSLesions)
markerImg4 = morphClose(subtract, SE(’disk’, radius = 5))
closeRec1 1 = closeRec(markerImg4, maskImg)
volMaskImg2 = 1.0×sum(closeRec1)
Forradius = 1:15
markerImg5 = morphOpen(closeRec1, SE(’disk’, radius − 1))
openRec5 = openRec(markerImg5, closeRec1)
volOpenRec3 = sum(openRec5)
markerImg6 = morfOpen(closeRec1, SE(’disk’, radius))
openRec6 = openRec(markerImg6, closeRec1)
volOpenRec4 = sum(openRec6)
volGranu(radius) = (volOpenRec3 − volOpenRec4)/volMaskImg2
End
1 Reference image (without MS lesions).
Table 3. Configured ANN hyperparameters. ‘Activations’ is an activation function for the fully connected layers in the ANN. ‘Standardize’ is a flag to standardize the predictor data. ‘Lambda’ is the regularization term strength; the software composes the objective function for minimization from the cross-entropy loss function and the ridge (L2) penalty term. For ‘LayerSizes’, the ith element is the number of outputs in the ith fully connected layer of the ANN.
Table 3. Configured ANN hyperparameters. ‘Activations’ is an activation function for the fully connected layers in the ANN. ‘Standardize’ is a flag to standardize the predictor data. ‘Lambda’ is the regularization term strength; the software composes the objective function for minimization from the cross-entropy loss function and the ridge (L2) penalty term. For ‘LayerSizes’, the ith element is the number of outputs in the ith fully connected layer of the ANN.
ModelActivations (Default)Standardize (Enabled)Lambda (Adjusted)LayerSizes (Default)
ANN (axial)‘relu’true0.00510
ANN (sagittal)‘relu’true0.0210
Table 4. Performance metric results. The test accuracy is the proportion of correct predictions, the D S C measures the similarity between the test data and predictions, the TPR is the proportion of positives classified correctly, the TNR is the proportion of negatives classified correctly, and cross-entropy loss computes the loss between the test data and predictions. The performance of the ANN trained with axial images was higher than that of the ANN trained with sagittal images.
Table 4. Performance metric results. The test accuracy is the proportion of correct predictions, the D S C measures the similarity between the test data and predictions, the TPR is the proportion of positives classified correctly, the TNR is the proportion of negatives classified correctly, and cross-entropy loss computes the loss between the test data and predictions. The performance of the ANN trained with axial images was higher than that of the ANN trained with sagittal images.
ModelTest Accuracy D S C  1TPR 2TNR 3Cross-Entropy Loss
ANN (axial)0.97531.01.01.00.0247
ANN (sagittal)0.91970.8881.00.8330.0803
1 Dice similarity coefficient. 2 True positive rate (sensitivity). 3 True negative rate (specificity).
Table 5. Comparison of performance results across different studies analyzing MS lesions.
Table 5. Comparison of performance results across different studies analyzing MS lesions.
ReferenceImage-Processing TechniqueClassifierAccuracy DSC DSC DSC  1
[27]CENU-Net, U-Net++,-0.7159
Linknet
[30]ExMPLPQkNN0.9837 2-
0.9775 3-
[31]Lesion volumeCNN0.99690.9786
quantification
[32]CNNCNN0.98 4-
0.903 5-
[33]AttentionModified-0.823
U-NetU-Net
[34]U-NetU-Net++-0.88
[35]Augmented U-NetLSTM-0.89
This paperMorphology andANN0.9753 21.0
granulometry 0.9197 3
1 Dice similarity coefficient. 2 Axial. 3 Sagittal. 4 Cutting-level. 5 Patient-level.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ponce de Leon-Sanchez, E.R.; Mendiola-Santibañez, J.D.; Dominguez-Ramirez, O.A.; Herrera-Navarro, A.M.; Vazquez-Cervantes, A.; Jimenez-Hernandez, H.; Cordova-Esparza, D.M.; Cuán Hernández, M.d.l.A.; Senties-Madrid, H. Training Artificial Neural Networks to Detect Multiple Sclerosis Lesions Using Granulometric Data from Preprocessed Magnetic Resonance Images with Morphological Transformations. Technologies 2024, 12, 145. https://doi.org/10.3390/technologies12090145

AMA Style

Ponce de Leon-Sanchez ER, Mendiola-Santibañez JD, Dominguez-Ramirez OA, Herrera-Navarro AM, Vazquez-Cervantes A, Jimenez-Hernandez H, Cordova-Esparza DM, Cuán Hernández MdlA, Senties-Madrid H. Training Artificial Neural Networks to Detect Multiple Sclerosis Lesions Using Granulometric Data from Preprocessed Magnetic Resonance Images with Morphological Transformations. Technologies. 2024; 12(9):145. https://doi.org/10.3390/technologies12090145

Chicago/Turabian Style

Ponce de Leon-Sanchez, Edgar Rafael, Jorge Domingo Mendiola-Santibañez, Omar Arturo Dominguez-Ramirez, Ana Marcela Herrera-Navarro, Alberto Vazquez-Cervantes, Hugo Jimenez-Hernandez, Diana Margarita Cordova-Esparza, María de los Angeles Cuán Hernández, and Horacio Senties-Madrid. 2024. "Training Artificial Neural Networks to Detect Multiple Sclerosis Lesions Using Granulometric Data from Preprocessed Magnetic Resonance Images with Morphological Transformations" Technologies 12, no. 9: 145. https://doi.org/10.3390/technologies12090145

APA Style

Ponce de Leon-Sanchez, E. R., Mendiola-Santibañez, J. D., Dominguez-Ramirez, O. A., Herrera-Navarro, A. M., Vazquez-Cervantes, A., Jimenez-Hernandez, H., Cordova-Esparza, D. M., Cuán Hernández, M. d. l. A., & Senties-Madrid, H. (2024). Training Artificial Neural Networks to Detect Multiple Sclerosis Lesions Using Granulometric Data from Preprocessed Magnetic Resonance Images with Morphological Transformations. Technologies, 12(9), 145. https://doi.org/10.3390/technologies12090145

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop