This lesson is still being designed and assembled (Pre-Alpha version)

sMRI Spatial Normalization


Teaching: 30 min
Exercises: 15 min
  • What are reference coordinate systems

  • What are ‘templates’, ‘atlases’?

  • What is spatial normalization?

  • Understand reference spaces and registration process

You Are Here!


Why do we need spatial normalization

Compare and combine brain images across modalities, individuals, and studies

What do we need for spatial normalization

1. A reference frame: A 3D space that assigns x,y,z coordinates to anatomical regions (independent of voxel dimensions!).

2. A common template: a single or an average image volume as an alignment target

3. An image registration algorithm

1. Coordinate systems and spaces


Image source

World coordinates

The world coordinates refer to a Cartesian coordinate system in which a MRI (or other modality) scanner is positioned.

Anatomical coordinates

The anatomical space is coordinate system (X,Y,Z) that consists of three planes to describe the standard anatomical position of a human

The origin and directions of anatomical coordinate system are defined by conventions. In neuroimaging the most commonly used definition is the stereotaxic space.

Stereotaxic space


Image coordinates

The image coordinate system (i,j,k) describes the acquired image (voxels) with respect to the anatomy. The MR images are 3D voxel arrays (i.e. grids) whose origin is assigned at the upper left corner. The i axis increases to the right, the j axis to the bottom and the k axis backwards.

The MR image metadata stores the anatomical location of the image origin and the spacing between two voxels (typically in mm).

For examples:


Image source

Quiz: coordinate systems

What happens when you downsample a MR image?


Downsampling reduces the number of total voxels in the image. Consequently the voxel-spacing is increased as more anatomical space is “sampled” by any given voxel. Note that the new intensity values of the resampled voxels are determined based on the type of interpolation used.

2. MR image templates

T1 templates (MNI305, Collin27, MNI152 (linear), MNI152 (nonlinear))


Multimodal MNI/ICBM152 atlas


3. Image registration

A process that aligns an image from one coordinate space to another.

Note: Linear registrations are often used as an initialization step for non-linear registration.


Algorithm Deformation ~ parameters
FSL FLIRT Linear 9
ANIMAL Non-linear (Local translation) 69K
DARTEL Toolbox Non-linear (diffeomorphic) 6.4M
ANTs (SyN) Non-linear (bi-directional diffeomorphic) 28M



Quiz: Image registration

What would the information encoded in the non-linear deformation tell you about the subject?


The deformation fields encode information regarding local morphometric brain changes. These can be quantified using “Jacobians” of the deformation field, and can be used to assess subtle morphometric differences between groups or timepoints.

Python snippet (see ../code/3_sMRI_spatial_norm.ipynb for detailed example.)

from nilearn import plotting
from nilearn import image
from nibabel.affines import apply_affine
cut_coords = (-40,10,0)

A = np.array([[1.053177, -0.061204, -0.060685, 90.310684],
             [0.070210, 1.009246, 0.117766, -9.806847],
             [0.023069, -0.117785, 1.186777, 13.209366],
             [0. ,0. , 0., 1.]])

cut_coords_affine_transformed = apply_affine(A, cut_coords)
x,y,z = cut_coords_affine_transformed
cut_coords_affine_transformed_str = "({},{},{})".format(int(x),int(y),int(z))

print("Subject space to refernce space mapping:\n {} --> {}".format(cut_coords,cut_coords_affine_transformed_str))

Subject space to refernce space mapping:
 (-40, 10, 0) --> (47,-2,11)


Subject space vs reference space: use cases


Key Points

  • Reference coordinate spaces and spatial normalization offer a way to map and compare brain anatomy across modalities, individuals, and studies