Skip to content

Gray Matter Modality

Brunno M de Campos edited this page Sep 15, 2026 · 9 revisions

First, we would like to recommend you to read how the S²M resultant files are organized, and how this can impact your analysis. Please visit this page

The first step is to add your subject's T1-weighted image (T1-WI) in NIfTI format.

See this page for instructions on how to convert DICOM (DICOM/dcm) files to NIfTI using MRIcroGL.

image

image

For this first example, leave the harmonization option unchanged. To perform harmonization when processing a single subject, you must first estimate the harmonization parameters by running the corresponding procedure with at least 10 subjects (preferably control subjects). Check the specific instructions and considerations for harmonization procedures

You can now note two things:

  1. S²M is already ready to run S²M using the default settings, without providing any demographic information or applying regression.

  2. The "Single Case" panel is enabled for defining the case's age and sex, which can be used for subsequent corrections. By entering this information, the Age covariate and Sex covariate options will become available and will be automatically selected:

image

When analyzing a single case, only the Fixed Setting option will be available. This option allows you to define the demographic parameters used to select the subjects from the Reference Dataset for your analysis.

  1. You can use the entire loaded Reference Dataset by keeping “USE THE ENTIRE REF. DATASET” checked.

image

  1. Alternatively, uncheck “USE THE ENTIRE REF. DATASET” to define specific age ranges and sex criteria for the comparative dataset.

image

After making any modification, click the “Refresh Ref. Dataset Demography” button to display the actual demographics of the Reference Dataset that will be used in the analysis.

Note that the S²M-provided Reference Dataset has a uniform age distribution from 18 to 64 years. Thus, for each age within this range, data from four subjects are available. This makes the selection and manipulation of the Reference Dataset more predictable.

However, the sex distribution is not homogeneous.

The criteria used for age and sex matching are ultimately highly specific to each scientific application. What can be stated with confidence is that this decision should balance demographic matching precision against comparative sample size, which directly affects statistical power.

It is also important to consider that age and sex can be partially controlled through the corresponding regression covariates. Therefore, exact demographic matching is not necessarily required in every analysis, and the use of age and sex as covariates may provide an additional means of accounting for demographic differences between the case and the Reference Dataset.

image

The next step is to define the smoothing factor that will be applied to your image. This choice requires a Reference Dataset included in the S²M repository folder with the same smoothing kernel size.

The choice of smoothing kernel involves a trade-off between sensitivity and specificity. Lower smoothing levels preserve more spatial detail and may increase sensitivity to small focal alterations. However, they also tend to increase intersubject variability, which can result in more false-positive detections due to natural anatomical variability, noise, and subtle imaging artifacts. Conversely, higher smoothing levels reduce spatial variability and noise but may decrease sensitivity to small or spatially restricted abnormalities.

image

The final panel is the “Statistics and Results Report” panel. Here, you will be able to set the critical parameters for your analysis.

Let us start with the previously mentioned "covariates". Simply select whether you want to include age and sex as covariates in your statistical model, thereby accounting for their residual effects.

Note that total intracranial volume (TIV) is a mandatory covariate and will be included automatically.

image

The next subpanel is “Permutation Test.” Here, we will spend more time discussing the technical aspects of the procedure, as well as the available options and their implications.

  1. Number of perm. tests: Here, you will define the number of permutations to be performed to generate the empirical null distribution used by S²M to determine the statistical significance of the observed results. In general, a larger number of permutations provides a more precise estimation of the empirical distribution and, consequently, of the statistical thresholds. However, increasing the number of permutations also increases the computational time required for the analysis.

  2. Ref. Dataset subsampling factor: This option defines a factor that determines the size of the Reference Dataset, in terms of the number of subjects, used in each permutation test. This parameters requires some additional consideration and explanation. Please, visit this page.

  3. FWER alpha: This parameter defines the desired family-wise error rate (FWER) for the statistical inference. In practical terms, it determines the maximum probability of obtaining at least one false-positive result across the family of statistical tests. For example, setting FWER alpha = 0.05 means that the statistical thresholds are determined to control the probability of making at least one false-positive finding within the tested family at 5%.

  4. Extend Threshold (vx): Here, the user defines the minimum spatial extent of clusters to be considered in the final statistical maps. To improve analysis speed, we decided to make this parameter explicit and user-controlled. Alternative approaches, such as Threshold-Free Cluster Enhancement (TFCE) or permutation-based estimation of an empirical cluster-extent threshold, could be used to incorporate spatial information into the statistical inference. However, these approaches require additional computations during the permutation procedure and would substantially increase the computational burden and processing time. Therefore, in S²M, the cluster-extent criterion is explicitly defined by the user and applied to the final statistical maps, rather than being incorporated into the permutation-based inference itself.

  5. Finally, and no less importantly, the choice of the statistic used to characterize each permutation:

image

The options here are:

a) The traditional voxel-wise approach, in which the maximum statistical value across all voxels is identified and stored for each permutation, and the resulting distribution is subsequently used to define the statistical threshold.

b) The personalized S²M approach, the Blob-wise option. Instead of using a single maximum voxel, this approach identifies the maximum median statistical value within a spatially constrained blob for each permutation. This reduces the influence of isolated statistical extremes potentially arising from noise, residual artifacts, or boundary effects, while emphasizing spatially sustained effects.

This approach requires some additional consideration and explanation, please, check this page.

After all defined, you will be ready to click on "Run" button starting the preprocessing and analysis procedures.

image

Clone this wiki locally