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.
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.
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.
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.
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: .
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: .
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.
Figure 6.
Self-dual morphological reconstruction of a mask image g from a marker image f.
Figure 6.
Self-dual morphological reconstruction of a mask image g from a marker image f.
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 .
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 .
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 .
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 .
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.
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.
Figure 11.
Confusion matrix of predictions. ANN (axial) results: (true positives correctly classified as MS), (true negatives correctly classified as healthy), (false positives correctly classified as MS), and (false negatives correctly classified as healthy). ANN (sagittal) results: (true positives correctly classified as MS), (true negatives correctly classified as healthy), (false positives incorrectly classified as MS), and (false negatives correctly classified as healthy).
Figure 11.
Confusion matrix of predictions. ANN (axial) results: (true positives correctly classified as MS), (true negatives correctly classified as healthy), (false positives correctly classified as MS), and (false negatives correctly classified as healthy). ANN (sagittal) results: (true positives correctly classified as MS), (true negatives correctly classified as healthy), (false positives incorrectly classified as MS), and (false negatives correctly classified as healthy).
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.
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.
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.
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).
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).
Figure 17.
Granulometry measurements (axial) of the mask image and the reference image using a disk-shaped SE with different radius values (). 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 (). The size of MS lesions is estimated by calculating the difference between each data point.
Figure 18.
Granulometry measurements (sagittal) of the mask image and the reference image using a disk-shaped SE with different radius values ().
Figure 18.
Granulometry measurements (sagittal) of the mask image and the reference image using a disk-shaped SE with different radius values ().
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) |
| For | radius = 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 | |
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) |
| For | radius = 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 | |
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.
Model | Activations (Default) | Standardize (Enabled) | Lambda (Adjusted) | LayerSizes (Default) |
---|
ANN (axial) | ‘relu’ | true | 0.005 | 10 |
ANN (sagittal) | ‘relu’ | true | 0.02 | 10 |
Table 4.
Performance metric results. The test accuracy is the proportion of correct predictions, the 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 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.
Model | Test Accuracy | 1 | TPR 2 | TNR 3 | Cross-Entropy Loss |
---|
ANN (axial) | 0.9753 | 1.0 | 1.0 | 1.0 | 0.0247 |
ANN (sagittal) | 0.9197 | 0.888 | 1.0 | 0.833 | 0.0803 |
Table 5.
Comparison of performance results across different studies analyzing MS lesions.
Table 5.
Comparison of performance results across different studies analyzing MS lesions.
Reference | Image-Processing Technique | Classifier | Accuracy | 1 |
---|
[27] | CEN | U-Net, U-Net++, | - | 0.7159 |
| | Linknet | | |
[30] | ExMPLPQ | kNN | 0.9837 2 | - |
| | | 0.9775 3 | - |
[31] | Lesion volume | CNN | 0.9969 | 0.9786 |
| quantification | | | |
[32] | CNN | CNN | 0.98 4 | - |
| | | 0.903 5 | - |
[33] | Attention | Modified | - | 0.823 |
| U-Net | U-Net | | |
[34] | U-Net | U-Net++ | - | 0.88 |
[35] | Augmented U-Net | LSTM | - | 0.89 |
This paper | Morphology and | ANN | 0.9753 2 | 1.0 |
| granulometry | | 0.9197 3 | |