spatial preprocessing of fmri data methods & models for fmri data analysis 30 september 2009...

41
Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems Research Institute for Empirical Research in Economics University of Zurich Functional Imaging Laboratory (FIL) Wellcome Trust Centre for Neuroimaging University College London With many thanks for helpful slides to: John Ashburner Meike Grol Ged Ridgway

Post on 20-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Spatial preprocessing of fMRI data

Methods & models for fMRI data analysis30 September 2009

Klaas Enno Stephan

Laboratory for Social and Neural Systrems ResearchInstitute for Empirical Research in EconomicsUniversity of Zurich

Functional Imaging Laboratory (FIL)Wellcome Trust Centre for NeuroimagingUniversity College London

With many thanks for helpful slides to:

John Ashburner

Meike Grol

Ged Ridgway

Page 2: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Overview of SPM

RealignmentRealignment SmoothingSmoothing

NormalisationNormalisation

General linear modelGeneral linear model

Statistical parametric map (SPM)Statistical parametric map (SPM)Image time-seriesImage time-series

Parameter estimatesParameter estimates

Design matrixDesign matrix

TemplateTemplate

KernelKernel

Gaussian Gaussian field theoryfield theory

p <0.05p <0.05

StatisticalStatisticalinferenceinference

Page 3: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Functional MRI (fMRI)

• Uses echo planar imaging (EPI) for fast acquisition of T2*-weighted images.

• Spatial resolution:– 3 mm (standard 1.5 T scanner)– < 200 μm (high-field systems)

• Sampling speed:– 1 slice: 50-100 ms

• Requires spatial pre-processing and statistical analysis.

EPI(T2*)

T1

dropout

Page 4: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

subjects

sessions

runs

single run

volume

slices

Terminology of fMRI

TR = repetition timetime required to scan one volume

voxel

Page 5: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Terminology of fMRI

Slice thicknesse.g., 3 mm

Scan Volume:Field of View

(FOV),e.g. 192 mm

Axial slices

3 mm

3 mm

3 mm

Voxel Size(volumetric pixel)

Matrix Sizee.g., 64 x 64

In-plane resolution192 mm / 64

= 3 mm

Page 6: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Standard space

The Talairach Atlas The MNI/ICBM AVG152 Template

Page 7: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

World coords(2, 4, -4) mm

(4, 4, -2)

(2, 2, -4)

Voxel index(45, 66, 35)

(44, 66, 36)

(45, 65, 35)

x 2 92

y 2 -128

z 2 -74

W V

W V

W V

x

y

z

World space & voxel space

Page 8: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

74

128

92

z

y

x

200

020

002

z

y

x

V

V

V

W

W

W

1

z

y

x

1000

74200

128020

92002

1

z

y

x

V

V

V

W

W

WBy moving to 4D, one can includetranslations within a single matrix multiplication

These 4-by-4 “homogeneous matrices” are the currency of voxel-world mappings, affine coreg. and realignment. In SPM5 & SPM8, they are stored in the .hdr files.  In SPM2, they are stored in .mat files. 

To find inverse mappings, or results of concatenating multiple transformations, we simply follow the rules of matrix algebra

Changing coordinate systems

74-2zz

128-2y

922x

VW

VW

VW

y

x

Page 9: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Why does fMRI require spatial preprocessing?

• Head motion artefacts during scanning

• Problems of EPI acquisition: distortion and signal dropouts

• Brains are quite different across subjects

→ Realignment

→ “Unwarping”

→ Normalisation (“Warping”)→ Smoothing

Page 10: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Realignment or “motion correction”

• Even small head movements can be a major problem:– increase in residual variance– data may get completely lost if sudden movements occur

during a single volume– movements may be correlated with the task performed

• Therefore:– always constrain the volunteer’s head– instruct him/her explicitly to remain as calm as possible– do not scan for too long – everyone will move after while !

minimising movements is one of the most important factors for ensuring good data quality!

Page 11: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Realignment = rigid-body registration

• Assumes that all movements are those of a rigid body, i.e. the shape of the brain does not change

• Two steps:Registration: optimising six parameters that ptimising six parameters that

describe a rigid body transformation between describe a rigid body transformation between the source and a reference imagethe source and a reference image

Transformation: re-sampling according to the re-sampling according to the determined transformationdetermined transformation

Page 12: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Linear (affine) transformations

• Rigid-body transformations are a subset

• Parallel lines remain parallel

• Operations can be represented by: x1 = m11x0 + m12y0 + m13z0 + m14

y1 = m21x0 + m22y0 + m23z0 + m24

z1 = m31x0 + m32y0 + m33z0 + m34

• Or as matrices:

1

z

y

x

1000

mmmm

mmmm

mmmm

1

z

y

x

0

0

0

34333231

24232221

14131211

1

1

1

Page 13: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

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 radiansx1 = 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

Shearx1 = 1 x0 + h y0 + 0y1 = 0 x0 + 1 y0 + 0

Page 14: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Representing rotations

0

0

1

1

y

x

)θcos(θ)sin(

θ)sin()θcos(

y

x

0

0

0

1

1

1

z

y

x

100

0)θcos()θsin(

0)θsin()θcos(

z

y

x

Page 15: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

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

• Non-commutative: the order of the operations matters

1000

0100

00cossin

00sincos

1000

0cos0sin

0010

0sin0cos

1000

0cossin0

0sincos0

0001

1000

Zt100

Y010

X001

rans

trans

trans

ΩΩ

ΩΩ

ΘΘ

ΘΘ

ΦΦ

ΦΦ

Translations Pitchabout x axis

Rollabout y axis

Yawabout z axis

Page 16: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Realignment

• Goal: minimise squared differences between source and reference image

• Other methods available (e.g. mutual information)

Page 17: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

A special case ...

• If a subject remained perfectly still during a fMRI study, would realignment still be a good idea to perform?

• When is this issue of practical relevance?

Page 18: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

• Nearest neighbour– Take the value of the

closest voxel

• linear (2D: bilinear; 3D: trilinear)– 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 19: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

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 20: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Why does fMRI require spatial preprocessing?

• Head motion artefacts during scanning

• Problems of EPI acquisition: distortion and signal dropouts

• Brains are quite different across subjects

→ Realignment

→ “Unwarping”

→ Normalisation (“Warping”)→ Smoothing

Page 21: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Residual errors after realignment

• Resampling can introduce interpolation errors

• 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 included as confound regressors in subsequent statistical analyses.

Page 22: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Movement by distortion interactions

• Subject disrupts B0 field, rendering it inhomogeneous

→ distortions in phase-encode direction

• Subject moves during EPI time series

→ distortions vary with subject orientation→ shape of imaged brain

varies

Andersson et al. 2001, NeuroImage

Page 23: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Movement by distortion interaction

Page 24: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Movement by distortion interactions

after head rotationoriginal deformations

deformations after realignment mismatch in deformationsAndersson et al. 2001, NeuroImage

Page 25: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Different strategies for correcting movement artefacts

• liberal control:realignment only

• moderate control:realignment + “unwarping”

• strict control:realignment + inclusion of realignment parameters in statistical model

Page 26: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Why does fMRI require spatial preprocessing?

• Head motion artefacts during scanning

• Problems of EPI acquisition: distortion and signal dropouts

• Brains are quite different across subjects

→ Realignment

→ “Unwarping”

→ Normalisation (“Warping”)→ Smoothing

Page 27: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Individual brains differ in size, shape and folding

Page 28: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Spatial normalisation: why necessary?

• Inter-subject averaging– Increase sensitivity with more subjects

• Fixed-effects analysis

– Extrapolate findings to the population as a whole• Random / mixed-effects analysis

• Make results from different studies comparable by bringing them into a standard coordinate system– e.g. MNI space

Page 29: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Spatial normalisation: objective

• Warp the images such that functionally corresponding regions from different subjects are as close together as possible

• Problems:– Not always exact match between structure and function– Different brains are organised differently– Computational problems (local minima, not enough

information in the images, computationally expensive)

• Compromise by correcting gross differences followed by smoothing of normalised images

Page 30: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Spatial normalisation: affine step

• The first part is a 12 parameter affine transform– 3 translations– 3 rotations– 3 zooms– 3 shears

• Fits overall shape and size

Page 31: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Spatial normalisation: non-linear step

Deformations consist of a linear combination of smooth basis functions.

These basis functions result from a 3D discrete cosine transform (DCT).

Page 32: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Spatial normalisation: Bayesian regularisation

Deformations consist of a linear combination of smooth basis functions

set of frequencies from a 3D discrete cosine transform.

Find maximum a posteriori (MAP) estimates: simultaneously minimise – squared difference between template and source image – squared difference between parameters and their priors

)(log)(log)|(log)|(log yppypyp MAP:

MAP:

Deformation parametersDeformation parameters

“Difference” between template and source image

“Difference” between template and source image

Squared distance between parameters and their expected values

(regularisation)

Squared distance between parameters and their expected values

(regularisation)

Page 33: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Templateimage

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 34: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Segmentation

GM and WM segmentations overlaid on original images

Structural image, GM and WM segments, and brain-mask (sum of GM and WM)

Page 35: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Unified segmentation with tissue class priors

•Goal: for each voxel, compute probability that it belongs to a particular tissue type, given its intensity

•Likelihood model: Intensities are modelled by a mixture of Gaussian distributions representing different tissue classes (e.g. GM, WM, CSF).

•Priors are obtained from tissue probability maps (segmented images of 151 subjects).

•Goal: for each voxel, compute probability that it belongs to a particular tissue type, given its intensity

•Likelihood model: Intensities are modelled by a mixture of Gaussian distributions representing different tissue classes (e.g. GM, WM, CSF).

•Priors are obtained from tissue probability maps (segmented images of 151 subjects). Ashburner & Friston 2005, NeuroImage

p (tissue | intensity)

p (intensity | tissue) ∙ p (tissue)

Page 36: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Segmentation & normalisation

• Circular relationship between segmentation & normalisation:– Knowing which tissue type a voxel belongs to helps normalisation.– Knowing where a voxel is (in standard space) helps segmentation.

• Build a joint generative model:– model how voxel intensities result from mixture of tissue type distributions– model how tissue types of one brain have to be spatially deformed to

match those of another brain

• Using a priori knowledge about the parameters: adopt Bayesian approach and maximise the posterior probability

Ashburner & Friston 2005, NeuroImage

Page 37: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Normalisation options in practice

• Conventional normalisation:– either warp functional scans to EPI template directly– or coregister structural scan to functional scans and then

warp structural scan to T1 template; then apply these parameters to functional scans (“Normalise: Write”)

• Unified segmentation:– coregister structural scan to functional scans– unified segmentation provides normalisation parameters– apply these parameters to functional scans (“Normalise:

Write”)

Page 38: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Smoothing• Why smooth?

– increase signal to noise– inter-subject averaging– increase validity of Gaussian Random Field theory

• In SPM, smoothing is a convolution with a Gaussian kernel.

• Kernel defined in terms of FWHM (full width at half maximum).

Gaussian convolution is separable Gaussian smoothing kernel

Page 39: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Smoothing

Before convolution Convolved with a circleConvolved with a Gaussian

Smoothing is done by convolving with a 3D Gaussian which is defined by its full width at half maximum (FWHM).

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

Page 40: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Summary: spatial preprocessing steps

• Head motion artefacts during scanning

• Problems of EPI acquisition: distortion and signal dropouts

• Brains are quite different across subjects

→ Realignment

→ “Unwarping”

→ Normalisation (“Warping”)→ Smoothing

Page 41: Spatial preprocessing of fMRI data Methods & models for fMRI data analysis 30 September 2009 Klaas Enno Stephan Laboratory for Social and Neural Systrems

Thank you!