image registration carlton chu l.
Skip this Video
Loading SlideShow in 5 Seconds..
Image Registration Carlton CHU PowerPoint Presentation
Download Presentation
Image Registration Carlton CHU

Loading in 2 Seconds...

play fullscreen
1 / 65

Image Registration Carlton CHU - PowerPoint PPT Presentation

  • Uploaded on

Image Registration Carlton CHU. Smooth Realign Normalise Segment DARTEL. With slides by John Ashburner, Chloe Hutton and Jesper Andersson. Overview of SPM Analysis. Statistical Parametric Map. Design matrix. fMRI time-series. Motion Correction. Smoothing. General Linear Model.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Image Registration Carlton CHU' - lenka

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
image registration carlton chu

Image RegistrationCarlton CHU






With slides by John Ashburner, Chloe Hutton and Jesper Andersson

overview of spm analysis

Overview of SPM Analysis

Statistical Parametric Map

Design matrix

fMRI time-series




General Linear Model

Parameter Estimates



Anatomical Reference

  • Preliminaries
    • Smooth
    • Rigid-Body and Affine Transformations
    • Optimisation and Objective Functions
    • Transformations and Interpolation
  • Intra-Subject Registration
  • Inter-Subject Registration

Smoothing is done by convolution.

Each voxel after smoothing effectively becomes the result of applying a weighted region of interest (ROI).

Before convolution

Convolved with a circle

Convolved with a Gaussian

image registration
Image Registration
  • Registration - i.e. Optimise the parameters that describe a spatial transformation between the source and reference (template) images
  • Transformation - i.e. Re-sample according to the determined transformation parameters
2d affine transforms
2D Affine Transforms
  • Translations by tx and ty
    • x1 = x0 + tx
    • y1 = y0 + ty
  • Rotation around the origin by  radians
    • x1 = cos() x0 + sin() y0
    • y1 = -sin() x0 + cos() y0
  • Zooms by sx and sy
    • x1 = sx x0
    • y1 = sy y0
  • Shear
    • x1 = x0 + h y0
    • y1 = y0
2d affine transforms7
2D Affine Transforms
  • Translations by tx and ty
    • x1 = 1 x0 + 0 y0 + tx
    • y1 = 0 x0 + 1 y0 + ty
  • Rotation around the origin by  radians
    • x1 = cos() x0 + sin() y0 + 0
    • y1 = -sin() x0 + cos() y0 + 0
  • Zooms by sx and sy:
    • x1 = sx x0 + 0 y0 + 0
    • y1 = 0 x0 + sy y0 + 0
  • Shear
    • x1 = 1 x0 + h y0 + 0
    • y1 = 0 x0 + 1 y0 + 0
3d rigid body transformations
3D Rigid-body Transformations
  • A 3D rigid body transform is defined by:
    • 3 translations - in X, Y & Z directions
    • 3 rotations - about X, Y & Z axes
  • The order of the operations matters



about x axis


about y axis


about z axis

voxel to world transforms
Voxel-to-world Transforms
  • Affine transform associated with each image
    • Maps from voxels (x=1..nx, y=1..ny, to some world co-ordinate system. e.g.,
      • Scanner co-ordinates - images from DICOM toolbox
      • T&T/MNI coordinates - spatially normalised
  • Registering image B (source) to image A (target) will update B’s voxel-to-world mapping
    • Mapping from voxels in A to voxels in B is by
      • A-to-world using MA, then world-to-B using MB-1
      • MB-1 MA
  • Optimisation involves finding some “best” parameters according to an “objective function”, which is either minimised or maximised
  • The “objective function” is often related to a probability based on some model

Most probable solution (global optimum)

Objective function

Local optimum

Local optimum

Value of parameter

objective functions
Objective Functions
  • Intra-modal
    • Mean squared difference (minimise)
    • Normalised cross correlation (maximise)
    • Entropy of difference (minimise)
  • Inter-modal (or intra-modal)
    • Mutual information (maximise)
    • Normalised mutual information (maximise)
    • Entropy correlation coefficient (maximise)
    • AIR cost function (minimise)
  • Images are re-sampled. An example in 2D:

for y0=1..ny0% loop over rows

for x0=1..nx0% loop over pixels in row

x1 = tx(x0,y0,q) % transform according to q

y1 = ty(x0,y0,q)

if 1x1nx1 & 1y1ny1 then % voxel in range

f1(x0,y0) = f0(x1,y1) % assign re-sampled value

end % voxel in range

end % loop over pixels in row

end % loop over rows

  • What happens if x1 and y1 are not integers?
simple interpolation
Simple Interpolation
  • Nearest neighbour
    • Take the value of the closest voxel
  • Tri-linear
    • Just a weighted average of the neighbouring voxels
    • f5 = f1 x2 + f2 x1
    • f6 = f3 x2 + f4 x1
    • f7 = f5 y2 + f6 y1
b spline interpolation
B-spline Interpolation

A continuous function is represented by a linear combination of basis functions

2D B-spline basis functions of degrees 0, 1, 2 and 3

B-splines are piecewise polynomials

Nearest neighbour and trilinear interpolation are the same as B-spline interpolation with degrees 0 and 1.

  • Preliminaries
  • Intra-Subject Registration
    • Realign
      • Mean-squared difference objective function
      • Residual artifacts and distortion correction
    • Coregister
  • Inter-Subject Registration
mean squared difference
Mean-squared Difference
  • Minimising mean-squared difference works for intra-modal registration (realignment)
  • Simple relationship between intensities in one image, versus those in the other
    • Assumes normally distributed differences
residual errors from aligned fmri
Residual Errors from aligned fMRI
  • Re-sampling can introduce interpolation errors
    • especially tri-linear interpolation
  • Gaps between slices can cause aliasing artefacts
  • Slices are not acquired simultaneously
    • rapid movements not accounted for by rigid body model
  • Image artefacts may not move according to a rigid body model
    • image distortion
    • image dropout
    • Nyquist ghost
  • Functions of the estimated motion parameters can be modelled as confounds in subsequent analyses
movement by distortion interaction of fmri
Movement by Distortion Interaction of fMRI
  • Subject disrupts B0 field, rendering it inhomogeneous

=> distortions in phase-encode direction

  • Subject moves during EPI time series
  • Distortions vary with subject orientation

=> shape varies

correcting for distortion changes using unwarp
Correcting for distortion changes using Unwarp

Estimate reference from mean of all scans.

  • Estimate new distortion fields for each image:
  • estimate rate of change of field with respect to the current estimate of movement parameters in pitch and roll.

Unwarp time series.

Estimate movement parameters.



Andersson et al, 2001

  • Preliminaries
  • Intra-Subject Registration
    • Realign
    • Coregister
      • Mutual Information objective function
  • Inter-Subject Registration

Inter-modal registration

  • Match images from same subject but different modalities:
    • anatomical localisation of single subject activations
    • achieve more precise spatial normalisation of functional image using anatomical image.
mutual information
Mutual Information
  • Used for between-modality registration
  • Derived from joint histograms
  • MI= ab P(a,b) log2 [P(a,b)/( P(a) P(b) )]
    • Related to entropy: MI = -H(a,b) + H(a) + H(b)
        • Where H(a) = -a P(a) log2P(a) and H(a,b) = -a P(a,b) log2P(a,b)
  • Preliminaries
  • Intra-Subject Registration
  • Inter-Subject Registration
    • Normalise
      • Affine Registration
      • Nonlinear Registration
      • Regularisation
    • Segment
spatial normalisation reasons
Spatial Normalisation - Reasons
  • Inter-subject averaging
    • Increase sensitivity with more subjects
      • Fixed-effects analysis
    • Extrapolate findings to the population as a whole
      • Mixed-effects analysis
  • Standard coordinate system
    • e.g., Talairach & Tournoux space
spatial normalisation procedure
Spatial Normalisation - Procedure
  • Minimise mean squared difference from template image(s)

Affine registration

Non-linear registration

spatial normalisation templates
Spatial Normalisation - Templates












Template Images

“Canonical” images

Spatial normalisation can be weighted so that non-brain voxels do not influence the result.

Similar weighting masks can be used for normalising lesioned brains.


A wider range of contrasts can be registered to a linear combination of template images.



spatial normalisation affine
Spatial Normalisation - Affine
  • The first part is a 12 parameter affine transform
    • 3 translations
    • 3 rotations
    • 3 zooms
    • 3 shears
  • Fits overall shape and size
  • Algorithm simultaneously minimises
    • Mean-squared difference between template and source image
    • Squared distance between parameters and their expected values (regularisation)
spatial normalisation non linear
Spatial Normalisation - Non-linear

Deformations consist of a linear combination of smooth basis functions

These are the lowest frequencies of a 3D discrete cosine transform (DCT)

Algorithm simultaneously minimises

  • Mean squared difference between template and source image
  • Squared distance between parameters and their known expectation
spatial normalisation overfitting
Spatial Normalisation - Overfitting

Without regularisation, the non-linear spatial normalisation can introduce unnecessary warps.

Affine registration.

(2 = 472.1)







(2 = 287.3)





(2 = 302.7)

  • Preliminaries
  • Intra-Subject Registration
  • Inter-Subject Registration
    • Normalise
    • Segment
      • Gaussian mixture model
      • Intensity non-uniformity correction
      • Deformed tissue probability maps
  • Segmentation in SPM5 also estimates a spatial transformation that can be used for spatially normalising images.
  • It uses a generative model, which involves:
    • Mixture of Gaussians (MOG)
    • Bias Correction Component
    • Warping (Non-linear Registration) Component
gaussian probability density
Gaussian Probability Density
  • If intensities are assumed to be Gaussian of mean mk and variance s2k, then the probability of a value yi is:
non gaussian probability distribution
Non-Gaussian Probability Distribution
  • A non-Gaussian probability density function can be modelled by a Mixture of Gaussians (MOG):

Mixing proportion - positive and sums to one

belonging probabilities
Belonging Probabilities

Belonging probabilities are assigned by normalising to one.

mixing proportions
Mixing Proportions
  • The mixing proportion gk represents the prior probability of a voxel being drawn from class k - irrespective of its intensity.
  • So:
non gaussian intensity distributions
Non-Gaussian Intensity Distributions
  • Multiple Gaussians per tissue class allow non-Gaussian intensity distributions to be modelled.
    • E.g. accounting for partial volume effects
probability of whole dataset
Probability of Whole Dataset
  • If the voxels are assumed to be independent, then the probability of the whole image is the product of the probabilities of each voxel:
  • A maximum-likelihood solution can be found by minimising the negative log-probability:
modelling a bias field
Modelling a Bias Field
  • A bias field is included, such that the required scaling at voxel i, parameterised by b, is ri(b).
  • Replace the means by mk/ri(b)
  • Replace the variances by (sk/ri(b))2
modelling a bias field40
Modelling a Bias Field
  • After rearranging...




tissue probability maps
Tissue Probability Maps
  • Tissue probability maps (TPMs) are used instead of the proportion of voxels in each Gaussian as the prior.

ICBM Tissue Probabilistic Atlases. These tissue probability maps are kindly provided by the International Consortium for Brain Mapping, John C. Mazziotta and Arthur W. Toga.

mixing proportions42
“Mixing Proportions”
  • Tissue probability maps for each class are included.
  • The probability of obtaining class k at voxel i, given weights g is then:
deforming the tissue probability maps
Deforming the Tissue Probability Maps
  • Tissue probability images are deformed according to parameters a.
  • The probability of obtaining class k at voxel i, given weights g and parameters a is then:
the extended model
The Extended Model
  • By combining the modified P(ci=k|q) and P(yi|ci=k,q), the overall objective function (E) becomes:

The Objective Function

  • The “best” parameters are those that minimise this objective function.
  • Optimisation involves finding them.
  • Begin with starting estimates, and repeatedly change them so that the objective function decreases each time.
steepest descent
Steepest Descent



Alternate between optimising different groups of parameters

schematic of optimisation
Schematic of optimisation

Repeat until convergence…

Hold g, m, s2 and a constant, and minimise E w.r.t. b

- Levenberg-Marquardt strategy, using dE/db and d2E/db2

Hold g, m, s2 and b constant, and minimise E w.r.t. a

- Levenberg-Marquardt strategy, using dE/da and d2E/da2

Hold a and b constant, and minimise E w.r.t. g, m and s2

-Use an Expectation Maximisation (EM) strategy.


levenberg marquardt optimisation
Levenberg-Marquardt Optimisation
  • LM optimisation is used for nonlinear registration (a) and bias correction (b).
  • Requires first and second derivatives of the objective function (E).
  • Parameters a and b are updated by
  • Increase l to improve stability (at expense of decreasing speed of convergence).
expectation maximisation is used to update m s 2 and g
Expectation Maximisation is used to update m, s2 and g
  • For iteration (n), alternate between:
    • E-step: Estimate belonging probabilities by:
    • M-step: Set q(n+1) to values that reduce:
  • Some bias fields and warps are more probable (a priori) than others.
  • Encoded using Bayes rule (for a maximum a posteriori solution):
  • Prior probability distributions modelled by a multivariate normal distribution.
    • Mean vector ma andmb
    • Covariance matrix Sa andSb
    • -log[P(a)] = (a-ma)TSa-1(a-ma) + const
    • -log[P(b)] = (b-mb)TSb-1(b-mb) + const
initial affine registration
Initial Affine Registration

The procedure begins with a Mutual Information affine registration of the image with the tissue probability maps. MI is computed from a 4x256 joint probability histogram.

See D'Agostino, Maes, Vandermeulen & P. Suetens. “Non-rigid Atlas-to-Image Registration by Minimization of Class-Conditional Image Entropy”. Proc. MICCAI 2004. LNCS 3216, 2004. Pages 745-753.

Joint Probability Histogram

Background voxels excluded

background voxels are excluded
Background Voxels are Excluded

An intensity threshold is found by fitting image intensities to a mixture of two Gaussians. This threshold is used to exclude most of the voxels containing only air.


Spatially normalised BrainWeb phantoms (T1, T2 and PD)

Tissue probability maps of GM and WM

Cocosco, Kollokian, Kwan & Evans. “BrainWeb: Online Interface to a 3D MRI Simulated Brain Database”. NeuroImage 5(4):S425 (1997)

image registration54
Image Registration
  • Figure out how to warp one image to match another
  • Normally, all subjects’ scans are matched with a common template
current spm approach
Current SPM approach
  • Only about 1000 parameters.
    • Unable model detailed deformations
a one to one mapping
A one-to-one mapping
  • Many models simply add a smooth displacement to an identity transform
    • One-to-one mapping not enforced
  • Inverses approximately obtained by subtracting the displacement
    • Not a real inverse

Small deformation approximation

Large deformation


  • Parameterising the deformation
  • φ(0)(x) = x
  • φ(1)(x) = ∫u(φ(t)(x))dt
  • u is a flow field to be estimated




Initial Average

Iteratively generated from 471 subjects

Began with rigidly aligned tissue probability maps

Used an inverse consistent formulation

After a few iterations

Final template


Subject 1

Subject 2


VBM results of Patients with Alzheimer’s Disease

Both sets were smoothed with only 3mm FWHM Gaussian kernel, (FWE p>0.05)

Conventional SPM5 normalized image

DARTEL normalized image


VBM results of Patients with Huntington’s Disease

Both sets were smoothed with only 6mm FWHM Gaussian kernel, (FWE p>0.05)

Conventional SPM5 normalized image

DARTEL normalized image

  • Friston et al.Spatial registration and normalisation of images.Human Brain Mapping 3:165-189 (1995).
  • Collignon et al.Automated multi-modality image registration based on information theory. IPMI’95 pp 263-274 (1995).
  • Ashburner et al.Incorporating prior knowledge into image registration.NeuroImage 6:344-352 (1997).
  • Ashburner & Friston.Nonlinear spatial normalisation using basis functions.Human Brain Mapping 7:254-266 (1999).
  • Thévenaz et al.Interpolation revisited.IEEE Trans. Med. Imaging 19:739-758 (2000).
  • Andersson et al.Modeling geometric deformations in EPI time series.Neuroimage 13:903-919 (2001).
  • Ashburner & Friston.Unified Segmentation.NeuroImage in press (2005).
  • Ashburner. A fast diffeomorphic image reigstration algorithm. NeuroImage in press (2007).