Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical & Research SuppliesReagents, PPE & instruments — chain-of-custody documented.Fast, traceable sourcing built for regulated research environments, from bench consumables to instrumentation.Shop lac.us CodeCASRAIlac.us

Statistical Parametric Mapping: Guide to SPM12

A comprehensive methodological guide to Statistical Parametric Mapping (SPM12), covering spatial preprocessing, mass-univariate GLM estimation, and Random Field Theory inference in neuroimaging.

Written and maintained by CASRAI Editorial Board

Last updated

Statistical Parametric Mapping (SPM) is an academic framework and open-source software suite designed for the statistical analysis of functional and structural brain imaging data sequences. Originally developed to test regional hypotheses in neuroimaging, SPM applies voxel-by-voxel univariate statistical tests across spatially extended processes such as functional magnetic resonance imaging (fMRI), positron emission tomography (PET), single-photon emission computed tomography (SPECT), electroencephalography (EEG), and magnetoencephalography (MEG). For neuroimaging researchers, SPM provides the mathematical foundation for converting raw scanner volumes into reproducible statistical maps of brain activation.

What It Is

In computational neuroscience, Statistical Parametric Mapping refers both to a theoretical methodology and to the software package that implements it. The theoretical approach constructs spatially extended statistical processes to test specific neurobiological hypotheses about regional brain specialization and functional integration. Rather than analyzing arbitrary regions of interest in isolation, SPM treats the brain volume as a continuous lattice of voxels.

SPM uses a mass-univariate approach: a General Linear Model (GLM) is fitted independently at every voxel across the acquired brain volume. The parameter estimates from these voxel-wise regressions are used to compute univariate statistics, such as Student t-statistics or Fisher F-statistics. When mapped back to their original anatomical coordinates, these values create a continuous volumetric statistical parametric map. To establish statistical significance while addressing multiple comparisons, SPM applies Gaussian Random Field Theory (RFT) to calculate corrected p-values based on peak height and spatial cluster extent.

Who Runs It and What It Covers

SPM is developed by members and collaborators of the Wellcome Centre for Human Neuroimaging at UCL Queen Square Institute of Neurology. Karl Friston developed SPM classic in 1991 at the MRC Cyclotron Unit for PET. The first major revision, SPM’94, was written by Karl Friston with John Ashburner, Jon Heather, Andrew Holmes, and Jean-Baptiste Poline. Successive releases—SPM’95, SPM’96, SPM’99, SPM2, SPM5, SPM8, and the current SPM12 (first released October 2014, updated January 2020)—introduced unified tissue segmentation and multi-modal support.

The platform natively supports multi-modal brain data pipelines:

  • Functional MRI (fMRI): BOLD time-series analysis for task and resting-state designs.
  • PET & SPECT: Radiotracer tracking, cerebral blood flow, and receptor binding assays.
  • M/EEG Electrophysiology: Sensor array mapping, event-related potentials (ERPs), and source localization via dipole models.
  • Voxel-Based Morphometry (VBM): Quantitative assessment of regional structural differences across cohorts.

SPM12 runs primarily within MATLAB (versions R2007a through R2023b) requiring core MATLAB without proprietary toolboxes. Computationally intensive operations execute via compiled C-MEX binaries for Windows, Linux, and macOS. A precompiled Standalone SPM executable is also available for clusters lacking MATLAB licenses. SPM12 relies on NIfTI-1 for 3D/4D volumetric images and GIfTI for surfaces, with built-in conversion for DICOM, MINC, and ECAT7 files. Researchers organizing data according to the Brain Imaging Data Structure can leverage automated ingest workflows alongside public repositories like OpenNeuro.

How to Use It: The SPM12 Analysis Workflow

Analyzing an experimental neuroimaging dataset in SPM12 follows a multi-stage pipeline, executed either via the graphical user interface (GUI) or through the matlabbatch scripting system. The following six steps reflect the standard official SPM12 processing architecture for functional MRI:

  1. Data Ingest and Format Conversion: Raw DICOM slices transferred from the scanner console are converted to 3D or 4D NIfTI files (.nii) using SPM’s DICOM Import utility, preserving acquisition geometry and slice timing parameters.
  2. Spatial Realignment: Functional time-series images are realigned to a reference volume using a rigid-body transformation characterized by six parameters: three translations (x, y, z) and three rotations (pitch, roll, yaw). The module outputs estimated head movement parameters (rp_*.txt) to be utilized as nuisance regressors.
  3. Coregistration: The subject’s high-resolution T1-weighted structural MRI scan is aligned with the mean functional volume using rigid-body transformations driven by mutual information, ensuring spatial concordance between functional activations and anatomy.
  4. Segmentation and Spatial Normalization: Structural scans undergo Unified Segmentation, which iteratively calculates tissue probability maps (grey matter, white matter, CSF) and estimates nonlinear warps to Montreal Neurological Institute (MNI) space. The deformation fields (y_*.nii) are applied to normalize both structural and functional images into MNI coordinates.
  5. Spatial Smoothing: Normalized functional images are convolved with an isotropic Gaussian kernel (commonly 6 to 8 mm Full Width at Half Maximum, FWHM). Smoothing increases signal-to-noise ratio and ensures data conform to the continuous spatial lattice requirements of Random Field Theory.
  6. Statistical Modeling and Inference: Using the Specify 1st-level module, the experimenter constructs a Design Matrix specifying task onsets convolved with the canonical Hemodynamic Response Function (HRF), high-pass filtering (default 128-second cutoff), and autoregressive AR(1) temporal autocorrelation modeling. Following Restricted Maximum Likelihood (ReML) estimation, contrast vectors (t-contrasts or F-contrasts) are defined. Significance thresholds are applied using Family-Wise Error (FWE) rate correction (p < 0.05) or False Discovery Rate (FDR) based on Random Field Theory.

Strengths and Limits

SPM offers clear technical strengths alongside operational trade-offs that neuroimaging laboratories evaluate during pipeline design.

Strengths

  • Theoretical Rigor: SPM represents the gold standard in statistical validation for parametric neuroimaging models, pioneering Random Field Theory to solve the topological multiple-testing problem without arbitrary spatial thresholds.
  • Unified Batch Architecture: The integrated matlabbatch manager allows complex, multi-subject pipelines to be assembled visually, saved as modular scripts, and scaled across compute clusters.
  • Multi-Modal Integration: Provides simultaneous support for fMRI, PET, structural VBM, and high-density EEG/MEG within a single statistical formulation.
  • Transparent Scripting: Open MATLAB and C source files allow researchers to inspect, debug, and customize every algorithmic step.

Limits

  • Proprietary Runtime Dependency: While the core SPM codebase is open source under GNU GPL, native interactive development requires a MATLAB license, though standalone compiled binaries mitigate this on execution nodes.
  • Volumetric Focus: SPM’s primary statistical architecture operates on volumetric voxel grids. Researchers specializing in high-resolution cortical sheet surface analyses frequently favor specialized tools like FreeSurfer.
  • Assumptions of Normality: Parametric modeling assumes that residual errors follow Gaussian distributions. While Gaussian smoothing helps satisfy this requirement, low-degree-of-freedom designs or non-Gaussian physiological noise require careful modeling.

Alternatives Compared

Neuroimaging research groups frequently evaluate SPM against other prominent open-source packages within neuroscience methodologies, including FSL and AFNI. The table below outlines core technical differences:

Platform Primary Computing Environment Primary Multiple Comparison Correction Data Domain & Architecture Key Differentiator
SPM (SPM12) MATLAB / Standalone C-MEX Gaussian Random Field Theory (RFT) Volumetric NIfTI (3D/4D) & GIfTI surface Unified segmentation, ReML variance modeling, seamless M/EEG integration
FSL (FMRIB Software Library) C++ / Python / Shell Permutation testing (randomise) & GRFT Volumetric NIfTI Integrated diffusion tractography (FDT/bedpostx) and robust ICA denoising (MELODIC)
AFNI C / Shell / Python Non-parametric clustering & Monte Carlo simulation Volumetric BRIK/HEAD & NIfTI Highly interactive real-time 3D visualization and flexible time-series modeling
FreeSurfer C / C++ / Python Surface cluster simulation & FDR Surface mesh (.pial, .white) Automated submillimeter cortical parcellation and cortical thickness morphometry

Frequently Asked Questions

What is SPM used for?

SPM is used to test statistical hypotheses about regional brain function and structure in neuroimaging experiments. It processes functional MRI, PET, SPECT, EEG, and MEG datasets to identify specific brain areas that exhibit significant changes in neural activity or metabolic response relative to sensory, motor, or cognitive tasks.

What is SPM in neuroimaging?

In neuroimaging, SPM refers both to the methodological discipline of constructing statistical parametric maps across brain volumes and to the open-source software suite maintained by University College London that carries out preprocessing, General Linear Model estimation, and topological statistical inference.

What are parametric models in statistics?

Parametric models in statistics assume the observed data and residual error terms are drawn from a known probability distribution defined by a fixed set of parameters (such as the mean and variance of a normal distribution). In SPM, the General Linear Model assumes that residual voxel errors conform to a Gaussian distribution after spatial smoothing, enabling precise calculation of t and F statistics.

What is SPM in neuroscience?

In neuroscience research, SPM provides the mathematical foundation for mapping functional specialization and functional integration across the central nervous system. Investigators use SPM to determine how distinct cortical and subcortical structures coordinate to mediate perception, memory, and cognitive tasks, advancing empirical discoveries across neuroscience and neurobiology.

What is statistical mapping?

Statistical mapping is the process of computing a statistical test metric at each spatially registered location (voxel or vertex) across an anatomical image space and projecting those values into a continuous topographical map. This map allows researchers to visualize exactly where experimental manipulations produce statistically significant physiological effects across the brain.

Sources

  • Wellcome Centre for Human Neuroimaging, UCL Queen Square Institute of Neurology. Statistical Parametric Mapping Overview and Documentation. https://www.fil.ion.ucl.ac.uk/spm/ (read 2026-11-08).
  • Wellcome Centre for Human Neuroimaging, UCL. SPM12 Software Release, Requirements, and Architecture. https://www.fil.ion.ucl.ac.uk/spm/software/spm12/ (read 2026-11-08).
  • Wellcome Centre for Human Neuroimaging, UCL. Introduction to Statistical Parametric Mapping. https://www.fil.ion.ucl.ac.uk/spm/doc/intro/ (read 2026-11-08).
  • Ashburner, J., & Friston, K. J. (2005). Unified segmentation. NeuroImage, 26(3), 839–851. https://doi.org/10.1016/j.neuroimage.2005.02.018 (read 2026-11-08).

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Statistical Parametric Mapping: Guide to SPM12

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →