S²M (Single-Subject Morphometry) is an open-source framework for individualized asseS²Ment of brain structural abnormalities using MRI. The software generates subject-specific maps of white and gray matter alterations and focal cortical dysplasia lesions based on normative models derived from healthy controls, enabling the detection and quantification of morphometric abnormalities at the voxel level. S²M supports the evaluation of atrophy, hypertrophy, and focal cortical dysplasia (FCD) recquiring only a high-quality T1-weighted MRI scan (FLAIR image optional). Demographic variables such as age and sex can be incorporated to improve model accuracy but are not required.
The framework features a fully integrated graphical user interface (GUI), providing an accessible workflow without the need for programming expertise. S²M supports both single-subject analyses and automated batch processing of large datasets. Brain tissue metrics are extracted using the CAT toolbox, while all harmonization and statistical mapping procedures are implemented within the S²M framework.
Key Features:
- Gray Matter Analysis: Analysis to identify regions of gray matter atrophies and hypertrophies (normalized and native space maps, slice view pictures and anatomical reports)
- White Matter Analysis: Analysis to identify regions of white matter atrophies and hypertrophies (normalized and native space maps, slice view pictures and anatomical reports)
- Focal Cortical Dysplasia Analysis: Analysis to identify regions suggestive of FCD (normalized and native space maps, slice view pictures and anatomical reports)
- Advanced Site Harmonization: Embedded with S²M_combat to eliminate scanner and sequence biases (e.g., T1w vs. FLAIR) using single-subject projection algebra.
- Biological Confounder Control: Automatic regression for Age, Gender, and Total Intracranial Volume (TIV).
- Fast Non-Parametric Inference: Cluster-based permutation testing with an intelligent caching system for empirical thresholds.
- Outlier & Quality Control: Automated IQR-based outlier detection routines to protect the batch analysis from structural noise during harmonization.
S²M third-party prerequisites:
Before running S²M, ensure you have the following dependencies installed and configured in your MATLAB environment.
- Matlab (The MathWorks Inc.): tested with versions from the 2019b to the 2026a
- Matlab Parallel Computing Toolbox (optional)
- Matlab Parallel Computing Toolbox (optional)
- Statistical Parametric Mapping 25 (SPM)
- Computational Anatomy Toolbox (CAT) Version 3347 (CAT26.0.rc4, from 2026-07-24)
- ComBat Multi-Site Harmonization Tool (Adapted version for S²M included with S²M code)
S²M was developed by Brunno M Campos, Ph.D. (brunno at unicamp dot br)
University of Campinas, Neuroimaging Laboratory
Example images:
Figure 1: S²M graphical user interface (GUI).
Figure 2: Example resut for focal cortical dysplasia (blue maps: drawn ROI; hot-scaled map: S²M FCD result).
Figure 3: Example resut for Grey Matter Atrophy Study on patient with left mesial temporal lobe epilepsy (hot-scaled map: S²M individual atrophy map).
Figure 4: Example of control quality plots.: Top-left, images intercorrelation and outlier detection; Top-Right, Bland-Altman plot for pre-harmonization data; Bottom-left, Bland-Altman plot for post-harmonization data; Bottom-Right, pre and post harmonization batches histograms (mean and individual);
Figure 5: Example of automated generated individual slice view plot;
Figure 6: Example of automated generated individual result anatomical report (Page 1);
Figure 6: Example of automated generated individual result anatomical report (Page 2);
Figure 6: Example of automated generated individual result anatomical report (Page 3);
Figure 6: Example of automated generated individual result anatomical report (Page 4);
