Image Registration John Ashburner

65
Image Registration John Ashburner

description

Image Registration John Ashburner. Pre-processing Overview. Statistics or whatever. fMRI time-series. Template. Anatomical MRI. Smoothed. Estimate Spatial Norm. Motion Correct. Smooth. Coregister. Spatially normalised. Deformation. Contents. Preliminaries Smooth - PowerPoint PPT Presentation

Transcript of Image Registration John Ashburner

Page 1: Image Registration John Ashburner

Image Registration

John Ashburner

Page 2: Image Registration John Ashburner

Pre-processing OverviewfMRI time-series

Motion Correct

Anatomical MRI

Coregister

100034333231

24232221

14131211

mmmmmmmmmmmm

Deformation

Estimate Spatial Norm

Spatially normalised

Smooth

Smoothed

Statistics or whatever

Template

Page 3: Image Registration John Ashburner

Contents* Preliminaries

* Smooth* Rigid-Body and Affine Transformations* Optimisation and Objective Functions* Transformations and Interpolation

* Intra-Subject Registration* Inter-Subject Registration

Page 4: Image Registration John Ashburner

Smooth

Before convolution Convolved with a circleConvolved with a Gaussian

Smoothing is done by convolution.

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

Page 5: Image Registration John Ashburner

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

Page 6: Image Registration John Ashburner

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

Page 7: Image Registration John Ashburner

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

Page 8: Image Registration John Ashburner

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

1000010000cossin00sincos

10000cos0sin00100sin0cos

10000cossin00sincos00001

1000Zt100Y010X001

rans

trans

trans

ΩΩΩΩ

ΘΘ

ΘΘ

ΦΦΦΦ

Translations Pitchabout x axis

Rollabout y axis

Yawabout z axis

Page 9: Image Registration John Ashburner

Voxel-to-world Transforms* Affine transform associated with each image

* Maps from voxels (x=1..nx, y=1..ny, z=1..nz) 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

Page 10: Image Registration John Ashburner

Left- and Right-handed Coordinate Systems

* NIfTI format files are stored in either a left- or right-handed system* Indicated in the header

* Talairach & Tournoux uses a right-handed system* Mapping between them sometimes requires a flip

* Affine transform has a negative determinant

Page 11: Image Registration John Ashburner

Optimisation* Image registration is done by optimisation.* 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

Value of parameter

Objective function

Most probable solution (global

optimum)Local optimumLocal optimum

Page 12: Image Registration John Ashburner

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)

Page 13: Image Registration John Ashburner

* 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

Simple Interpolation

Page 14: Image Registration John Ashburner

B-spline Interpolation

B-splines are piecewise polynomials

A continuous function is represented by a linear combination of basis

functions

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

2 and 3

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

Page 15: Image Registration John Ashburner

Contents* Preliminaries* Intra-Subject Registration

* Realign* Mean-squared difference objective function* Residual artifacts and distortion correction

* Coregister* Inter-Subject Registration

Page 16: Image Registration John Ashburner

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

Page 17: Image Registration John Ashburner

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

Page 18: Image Registration John Ashburner

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

Page 19: Image Registration John Ashburner

Movement by distortion interaction

Page 20: Image Registration John Ashburner

Correcting for distortion changes using Unwarp

Estimate movement parameters.

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.

Estimate reference from mean of all scans.

Unwarp time series.

0B 0B

+

Andersson et al, 2001

Page 21: Image Registration John Ashburner

Contents* Preliminaries* Intra-Subject Registration

* Realign* Coregister

* Mutual Information objective function

* Inter-Subject Registration

Page 22: Image Registration John Ashburner

• 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.

Inter-modal registration

Page 23: Image Registration John Ashburner

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)

Page 24: Image Registration John Ashburner

Contents* Preliminaries* Intra-Subject Registration* Inter-Subject Registration

* Normalise* Affine Registration* Nonlinear Registration* Regularisation

* Segment* DARTEL

Page 25: Image Registration John Ashburner

Spatial Normalisation - Procedure

Non-linear registration

* Minimise mean squared difference from template image(s)

Affine registration

Page 26: Image Registration John Ashburner

EPI

T2 T1 Transm

PD PET

305T1

PD T2 SS

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.

Spatial Normalisation - Templates

Page 27: Image Registration John Ashburner

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)

Page 28: Image Registration John Ashburner

Spatial Normalisation - Non-linearDeformations 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

Page 29: Image Registration John Ashburner

Targetimage

Affine registration.(2 = 472.1)

Non-linearregistration

withoutregularisation.(2 = 287.3)

Non-linearregistration

usingregularisation.(2 = 302.7)

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

Spatial Normalisation - Overfitting

Page 30: Image Registration John Ashburner

Contents* Preliminaries* Intra-Subject Registration* Inter-Subject Registration

* Normalise* Segment

* Gaussian mixture model* Intensity non-uniformity correction* Deformed tissue probability maps

* DARTEL

Page 31: Image Registration John Ashburner

Segmentation

* 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

Page 32: Image Registration John Ashburner

Mixture of Gaussians (MOG)* Classification is based on a Mixture of Gaussians model

(MOG), which represents the intensity probability density by a number of Gaussian distributions.

Image Intensity

Frequency

Page 33: Image Registration John Ashburner

Belonging Probabilities

Belonging probabilities are assigned by normalising to one.

Page 34: Image Registration John Ashburner

Non-Gaussian Intensity Distributions* Multiple Gaussians per tissue class allow non-Gaussian

intensity distributions to be modelled.* E.g. accounting for partial volume effects

Page 35: Image Registration John Ashburner

Modelling a Bias Field* A bias field is modelled as a linear combination

of basis functions.

Corrupted image

Corrected imageBias Field

Page 36: Image Registration John Ashburner

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.

Page 37: Image Registration John Ashburner

Deforming the Tissue Probability Maps* Tissue probability

images are deformed so that they can be overlaid on top of the image to segment.

Page 38: Image Registration John Ashburner

Optimisation* 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.

Page 39: Image Registration John Ashburner

Steepest DescentStart

Optimum

Alternate between optimising different

groups of parameters

Page 40: Image Registration John Ashburner

Tissue probability maps of GM

and WM

Spatially normalised BrainWeb phantoms

(T1, T2 and PD)

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

Page 41: Image Registration John Ashburner

Contents* Preliminaries* Intra-Subject Registration* Inter-Subject Registration

* Normalise* Segment* DARTEL

* Flow field parameterisation* Objective function* Template creation* Examples

Page 42: Image Registration John Ashburner

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

Page 43: Image Registration John Ashburner

DARTEL* Parameterising the deformation

* φ(0)(x) = x* φ(1)(x) = ∫ u(φ(t)(x))dt* u is a flow field to be estimated

* Scaling and squaring is used to generate deformations.

t=0

1

Page 44: Image Registration John Ashburner

Scaling and squaring example

Page 45: Image Registration John Ashburner

Forward and backward transforms

Page 46: Image Registration John Ashburner

Registration objective function* Simultaneously minimize the sum of:

* Likelihood component* Drives the matching of the images.* Multinomial assumption

* Prior component* A measure of deformation roughness* Regularises the registration.

* ½uTHu

* A balance between the two terms.

Page 47: Image Registration John Ashburner

Likelihood Model* Current DARTEL model is multinomial for matching

tissue class images.* Template represents probability of obtaining different

tissues at each point.

log p(t|μ,ϕ) = ΣjΣk tjk log(μk(ϕj))t – individual GM, WM and background

μ – template GM, WM and background

ϕ – deformation

Page 48: Image Registration John Ashburner

Prior Model

Page 49: Image Registration John Ashburner

Simultaneous registration of GM to GM and WM to WM

Grey matter

White matter

Grey matter

White matter

Grey matter

White matter

Grey matter

White matter

Grey matter

White matterTemplate

Subject 1

Subject 2

Subject 3

Subject 4

Page 50: Image Registration John Ashburner

TemplateInitial

Average

After a few iterations

Final template

Iteratively generated from 471 subjects

Began with rigidly aligned tissue probability maps

Used an inverse consistent formulation

Page 51: Image Registration John Ashburner

Grey matter average of 452 subjects – affine

Page 52: Image Registration John Ashburner

Grey matter average of 471 subjects

Page 53: Image Registration John Ashburner

Initial GM images

Page 54: Image Registration John Ashburner

Warped GM images

Page 55: Image Registration John Ashburner
Page 56: Image Registration John Ashburner
Page 57: Image Registration John Ashburner
Page 58: Image Registration John Ashburner
Page 59: Image Registration John Ashburner
Page 60: Image Registration John Ashburner
Page 61: Image Registration John Ashburner
Page 62: Image Registration John Ashburner
Page 63: Image Registration John Ashburner
Page 64: Image Registration John Ashburner

VBM Pre-processing* Use Segment button for

characterising intensity distributions of tissue classes.

* DARTEL import, to generate rigidly aligned grey and white matter maps.

* DARTEL warping to generate “modulated” warped grey matter.

* Smooth.* Statistics.

Page 65: Image Registration John Ashburner

References* 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 26:839-851 (2005).* Ashburner. A Fast Diffeomorphic Image Registration Algorithm. NeuroImage

38:95-113 (2007).