Presentation is loading. Please wait.

Presentation is loading. Please wait.

SPM5- Methods for Dummies 2007 P. Schwingenschuh

Similar presentations


Presentation on theme: "SPM5- Methods for Dummies 2007 P. Schwingenschuh"— Presentation transcript:

1 SPM5- Methods for Dummies 2007 P. Schwingenschuh
Realignment SPM5- Methods for Dummies 2007 P. Schwingenschuh

2 Spatial Registration We use spatial registration to align images:
Realigning and unwarping Motion correction (realignment) adjusts for an individuals head movements → creates a spatially stabilized image But residual errors…..→ unwarping Co-registration aligns two images of different modalities from the same individual. Spatial Normalization aligns images from different people.

3 Realignment The aim is primarily to remove movement artefact in fMRI time-series.

4 Reasons for Motion Correction
Subjects will always move in the scanner The sensitivity of the analysis depends on the residual noise in the image series, so movement that is unrelated to the subject’s task will add to this noise and hence realignment will increase the sensitivity However, subject movement may also correlate with the task… …in which case realignment may reduce sensitivity (and it may not be possible to discount artefacts that owe to motion)

5 Realign SPM5 manual: This routine realigns a time-series of images acquired from the same subject using a least squares approach and a 6 parameter (rigid body) spatial transformation. The first image in the list specified by the user is used as a reference to which all subsequent scans are realigned. The reference scan does not have to the the first chronologically and it may be wise to chose a ”representative scan” in this role.

6 Realignment-2 steps Realignment (of same-modality images from same subject) involves two stages: 1. Registration - determining the 6 parameters that describe the rigid body transformation between each source image and a reference image (in fMRI first or representative scan) 2. Transformation (reslicing) - re-sampling each image according to the determined transformation parameters

7 Motion Correction Motion Correction (‘Realignment’) is crucial:
We want to compare same part of the brain across time. If we do not MC, there will be a lot of variability in our data. Mathematically, We assume that all images show the same brain, so rigid body transform is sufficient. All images have the same contrast. Image realignment involves estimating a set of 6 rigid-body transformation parameters for each image in the time series. For each image, this is done by finding the parameters that minimise the mean squared difference between it and a reference image. It is not possible to exhaustively search through the whole 6-dimensional (7 if the intensity scaling is included) parameter space, so the algorithm makes an initial parameter estimate (zero rotations and translations), and begins to iteratively search from there. At each iteration, the model is evaluated using the current parameter estimates, and the cost function re-computed. A judgment is then made about how the parameter estimates should be modified, before continuing on to the next iteration. This optimisation is terminated when the cost function stops decreasing. In order to be successful, the cost function needs to be smooth. Interpolation artefacts are one reason why the cost function may not be smooth. Using trilinear interpolation, sampling in the centre of 8 voxels effectively involves taking the weighted average of these voxels, which introduces smoothing. Therefore, an image translated by half of a voxel in three directions will be smoother than an image that has been translated by a whole number of voxels. The mean squared difference between smoothed images tends to be slightly lower than that for un-smoothed ones, which has the effect of introducing unwanted "texture" into the cost function landscape. Dithering the way that the images are sampled has the effect of reducing this texture. This has been done for the SPM2 realignment, which means that less spatial smoothing is necessary for the algorithm to work. Re-sampling the images uses B-spline interpolation, which is more efficient than the windowed sinc interpolation of SPM99 and earlier. The optional adjustment step has been removed, mostly because it is more correct to include the estimated motion parameters as confounds in the statistical model than it is to remove them at the stage of image realignment. This also means that each image can be re-sliced one at a time, which allows more efficient image I/O to be used. This extra efficiency should be seen throughout SPM2.

8 Rigid body transformation = Euclidean transfromation
They preserve the shape of the objects that they act on. Rotation Translation By measuring and correcting for translations and rotations, we can adjust for an object`s movement in an image.

9 How many parameters? Yaw Pitch Roll Z X Y Translation Rotation
Each transform can be applied in 3 dimensions. Therefore, if we correct for both rotation and translation, we will compute 6 parameters. Yaw Pitch Roll Z X Y Translation Rotation

10 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 Pitch about x axis Roll about y axis Yaw about z axis Translations

11 Gauss-newton Optimisation
Works best for least-squares Minimum is estimated by fitting a quadratic at each iteration

12 Local Minima Search algorithm is iterative:
move the image a little bit. Test cost function Repeat until cost function does not get better. Search algorithm can get stuck at local minima: cost function suggests that no matter how the transformation parameters are changed a minimum has been reached Value of Cost Function Local Minimum Global Minimum Translation in X

13 Motion Correction Cost Function
2 When aligned, Difference squared = 0 = Target Reslice 2 When unaligned, Difference squared > 0 = Target Reslice

14 Motion correction cost function
Motion correction uses variance to check if images are a good match. Smaller variance = better match (‘least squares’) Iterative: moves image a bit at a time until match is worse. Image 1 Image 2 Difference Variance (Diff²)

15 Realignment Realignment (of same-modality images from same subject) involves two stages: 1. Registration - determining the 6 parameters that describe the rigid body transformation between each image and a reference image (”first or representative scan”) 2. Transformation (reslicing) - re-sampling each image according to the determined transformation parameters

16 Transformation The intensity of each voxel in the transformed image must be determined from the intensities in the original image. In order to realign images with subvoxel accuracy, the spatial transformations will involve fractions of a voxel. It is therefore necessary to resample the image at positions between the centers of voxels. This requires an interpolation scheme to estimate the intensity of a voxel, based on the intensity of its neighbours.

17 Interpolation The method by which the images are sampled when being written in a different space. Nearest Neighbour is fastest, not recommended for image realignment. Takes value of the closest neighboring voxel. Does not correct for intensities at subvoxel displacements. Bilinear Interpolation is probably OK for PET, but not so suitable for fMRI because higher degree interpolation generally gives better results. Although higher degree methods provide better interpolation, but they are slower because they use more neighbouring voxels. Fourier Interpolation is another option, but note that it is only implemented for purely rigid body transformations. Voxel sizes must all be identical and isotropic. The image–space method that gives the closest results to Fourier interpolation is a full sinc interpolation using every voxel in the image to calculate the new value at a single voxel. (very slow) B-Splines, since SPM2: degrees 1-7

18 2. Transformation (reslicing)
Nearest Neighbour Linear Application of registration parameters involves re-sampling the image to create new voxels by interpolation from existing voxels Interpolation can be nearest neighbour (0-order), tri-linear (1st-order), (windowed) fourier/sinc, or in SPM2, nth-order “b-splines” Full sinc (no alias) Windowed sinc

19 B-Spline Interpolation
Improves both computational speed and accuracy A continuous function is represented by a linear combination of basis functions

20 Interpolation Simulation
Errors Results after 10 time 5° rotation and return B-spline: smaller interpolation error No bilinear B-Spline

21 Residual Errors after Realignment
Interpolation errors, especially with tri-linear interpolation and small-window sinc Ghosts (and other artefacts) in the image (which do not move as a rigid body) Rapid movements within a scan (which cause non-rigid image deformation) Spin excitation history effects (residual magnetisation effects of previous scans) Interaction between movement and local field inhomogeniety, giving non-rigid distortion → "Unwarp"

22 Sources & References & So On…
SPM for Dummies 2006 Rik Henson’s SPM minicourse John Ashburner’s lecture on spatial preprocessing (SPM course USA 2005) Human Brain Function, 2nd Edition (Edited by J Ashburner, K Friston, W Penny) – mostly chapter 2. SPM5 manual

23 Unwarping Antoinette Nicolle

24 Pre-processing steps Voxel-based analysis assumes that the data from a particular voxel all derive from the same part of the brain So, for within-subject and between-subject comparisons we need: Slice time correction Realignment to ‘undo’ the effects of subject motion Co-registration Normalisation Smoothing

25 After Realignment In extreme cases, up to 90% of the variance in fMRI time-series can be accounted for by effects of movement after realignment. Results in loss of sensitivity This can be due to non-linear distortion from magnetic field inhomogeneities i.e. does not fit with the rigid-body assumption of realignment.

26 Field inhomogeneities
Different tissues have different magnetic susceptibilities These distortions are most noticeable near air-tissue interfaces (e.g. OFC and anterior MTL) Field inhomogeneities have the effect that locations on the image are ‘deflected’ with respect to the real object. Figure 1 - The magnetic susceptibility of a substance is the measure of the extent to which the substance modifies the strength of the magnetic field passing through it. There are different tissues in the brain and so this distortion effect will be inhomogeneous. Figure 2 - MRI depends on us knowing the strength of the magnetic field at different points in this gradient, so that we can localize the source of the signal. 26

27 Susceptibility-by-motion interactions
Variance caused by the susceptibility-by-motion interaction When inhomogeneities are present in the field, the signal will not change linearly with subject position EPI images will be a warped version of reality (like a fairground mirror) and this deformation will be non-rigid with motion

28 Covarying for movement-related errors after realignment
One solution is to include the estimated movement parameters as covariates in the design matrix But problems when movements are correlated with the task, since this strategy will discard “good” and “bad” variance alike No correction Correction by covariation tmax=13.38 tmax=5.06

29 So how does SPM do it..? A deformation field indicates the directions and magnitudes of location deflections throughout the field (B0) with respect to the real object. We can create this with the “Fieldmap” toolbox. Next – find the derivatives of the deformations with respect to subject movement igl.stanford.edu/~torsten/ct-dsa.html

30 The susceptibility-by-motion interaction
In practice, rather than generating a statistical field map for every image in the EPI data set, we compute how one map is warped over subsequent scans. Computing how the images are warped over subsequent scans requires knowing how the deformation fields change with displacement of the subject, i.e. the derivatives of deformation with respect to subject motion. UNWARP attempts to do this and then re-samples the voxels accordingly

31 How does it do it? The field B0, which changes as a function of displacement ∆θ, ∆φ, can be modelled by the first two terms of a Taylor expansion B0(, ) = B0 (, ) + [(δB0/ δ)  + (δB0/ δ ) ] The ‘static’ deformation field, which is the same throughout the time series. Calculated using ‘Fieldmap’ in SPM Changes in the deformation field with subject movement. Estimated via iteration. Procedure in UNWARP.

32 Applying the deformation field to the image
Once the deformation field has been modelled over time, the time-variant field is applied to the image. This allows us to assume that voxels over time are corresponding to the same parts of the brain, increasing the sensitivity of our analysis. Only in the phase-encoding direction. Longer read-out time so greater distortion.

33 In practice… Subject movements are quite small
With the latest scanners, distortions are typically quite small, and distortion-by-motion interactions even smaller Small distortions result from: Fast gradients Low field (i.e. <3T) Low resolution (smoothing) But fieldmap and unwarp are together on SPM anyway.

34 Assumptions of Unwarp That the susceptibility-by-motion interaction is responsible for a sizeable part of the residual movement-related variance. But: Subject movement between slice acquisition (slice-to-vol effects) Susceptibility-dropout-by-motion interaction Spin-history effects Note also that the deformation field does not give us the “true” version of the time-series, but rather a level of average distortion. Slice-to-vol effects: The rigid-body model that is used by most motion-correction (e.g. SPM) methods assume that any movement will occur between volumes. However there is also movement within scans – leading to further apparent shape changes. Susceptibility-dropout-by-movement interaction: Field inhomogeneities can also cause signal loss. - Spin-history effects: The signal will depend on how much longitudinal magnetisation has recovered (through T1 relaxation) since it was last excited (short TR→low signal). If the subject moves in the direction of increasing slice number between one excitation and the next, then the effective TR will be longer (resulting in increasing signal intensity).

35 References http://www.fil.ion.ucl.ac.uk/spm/toolbox/unwarp/
Slides by Mary Summers (MfD 2006) John Ashburner’s slides Andersson JLR, Hutton C, Ashburner J, Turner R, Friston K (2001) Modelling geometric deformations in EPI time series. Neuroimage 13: (J Hornak’s tutorial)


Download ppt "SPM5- Methods for Dummies 2007 P. Schwingenschuh"

Similar presentations


Ads by Google