preprocessing john vanmeter, ph.d. center for functional and molecular imaging georgetown university...
TRANSCRIPT
Preprocessing
John VanMeter, Ph.D.
Center for Functional and Molecular ImagingGeorgetown University Medical Center
Fixation Thumb movement
time
Recall Analysis of fMRI Data is Based on Examining Changes in Voxel
Across Time
Basic Preprocessing Chain
Slice Timing Correction
• fMRI data typically acquired using 2D acquisitions (i.e. one slice at a time)
• Order of slices can be acquired in different ways– Ascending or descending (slice order is sequential)– Interleave: even numbered slices acquired then odd
numbered slices or vice versa
• Order of slice acquisition determines when in the hemodynamic response the signal for a slice is acquired
Slice Timing Correction
• Uses temporal interpolation to make it appear as though all of the slices were acquired at the same time
• Thus, HRF across slices are aligned• Interpolation will be most effective if the
sampling rate (time between slices) is higher than the changes in the data
• Generally more effective for short TR (1-2 secs) than larger TR (>3 secs)
Order of Slice Timing Correction and Motion Correction
• Slice timing first if data acquired interleaved– Small changes in head position between slices
will cause timing differences to be off by 1/2 a TR
• Motion correct first if ascending or descending or short TR
• Slice timing correction generally unnecessary for block designs regardless of slice acquisition order and TR
Effect of Head Motion
Example of Ringing
Minimizing Head Motion
• Use of various types of restraints (padding, bite bar, vacuum cushion, face mask)
• Mock scanner training– Accustomization to
environment– Reinforcement systems
• Impress importance of not moving on subjects
Motion Correction (aka Realignment)
• Coregister each volume in the run to a reference volume
• Possible reference volumes– First volume in the run– Middle volume in the run– Average of all the volumes in the run before
motion correction
• No consensus on which choice of reference volume is best but typically first volume is used
Target
Reslice
Surface Registration
Coregistration Algorithm Components
• Four components are needed for any coregistration algorithm– Model that defines the set of transformations (eg.
translations, rotations, scaling, etc) used– Search algorithm to test different combinations of
the model parameters to find the “best” set– Cost Function that provides estimate of how well
registered the two volumes are– Interpolation algorithm to reslice/reformat and create
a new volume based on the best model parameters
Transformation
• Described by number of ways that one volume can be changed to match another (degrees of freedom)
• Rigid-body transform allows for translation in all 3 directions and rotation about all 3 axes (6 degrees of freedom)
• Higher transforms could be used but for motion correction rigid-body transform is most common and appropriate
Search Algorithm
• Systematic method for searching for the best combination of transformation parameters that aligns the reslice volume to the target volume
• Cost function – provides measure of how closely aligned two images are
Standard Deviation of the Ratio
= ?
Standard Deviationof ratio of all brain voxels
= 0
ResliceTarget Ratio Image
Standard Deviation of the Ratio
=
ResliceTarget Ratio Image
Standard Deviationof ratio of all brain voxels
>> 0 or
ResliceTarget
y
x
z10o
Image Interpolation
Reslice
Interpolation Methods
• Nearest Neighbor– voxel intensity in new volume equal to the closest
voxel in the original volume
• Trilinear– voxel intensity in new volume is based on weighted
average of surrounding voxels from the original volume
– weights based on distance from the new voxel
Reslice (Rz = -10o)Target
Nearest Neighbor Trilinear
Original
90o 180o 360o
10o 20o
Sinc Windowed Sinc
Original 10o 20o
90o 180o 360o
Quality Assurance: Motion Correction Plots
• Examine the amount of motion in each run by looking at plots of motion
• Big spikes in motion plots problematic
• Run motion correction twice to see how much residual motion there was from first application of motion correction
Pre-motion correction
Post-motion correction
How Much Motion is Acceptable?
• Examine residual motion correction plot for the maximal amount of motion in each dimension
• Ideal– Less than 0.5-0.75 mm– Less than 0.5o
• Patient population dependent– Children, rare diseases,
hard to recruit subject, etc
– Go with what you got
Distortion Correction
• Geometric distortion occurs in EPI sequences arising from inhomogeneity in static magnetic field
• Shimming adjusts for distortions due to head and body being in the field
• Automatic shimming generally available though not always sufficient to prevent distortion
• On our scanner geometric distortion is very minimal
Susceptibility Artifacts
Ojemann, NeuroImage 1997
Examples of Geometric Distortion
sin
use
s
ea
rca
na
ls
Poor Shimming Our Scanner WithAutomatic Shimming
Geometric Distortion in Our Scanner
Distortions
Field Mapping
• Collect two short scans at two different TE’s to determine differences in the phase component of the signal (difference is the field map)
• Used to correct distortion
Coregistration: Registering Functional Data to Structural Scan
• Registering functional and structural data useful for both looking at single subject results (e.g. overlaying statistical results onto that subjects structural scan)
• Also used as precursor to warping subject into standard or atlas space for multi-subject analyses
Spatial Normalization
• Variations between individual brains is large:– Overall size varies from 1100 cc to 1500 cc (30%
variation)– Major landmarks such as central sulcus will vary
considerable in position, branching, and length
• Spatial normalization warps individual brains into a common reference space
• Allows for examination of fMRI signal changes across individuals within a group or between groups of subjects
• Most commonly used reference space is based on the Talairach atlas
Talairach Atlas
• Atlas of brain anatomy• Developed by two French neurosurgeons Jean
Talairach and Pierre Tournoux• Defines a coordinate system used for
stereotaxic reference• Stereotaxic space is a “precise” mapping of a
brain into 3D coordinate system• The Talairach atlas has become the de facto
standard in Neuroimaging
Talairach Atlas
• Originally used to for surgical planning for deep subcortical structures in the brain (e.g. basal ganglion, thalamus, etc.)
• Based on the brain of 69 YO French female
• Numerous stories about the preparation of this woman’s brain for sectioning
Coronal Atlas Sections
Sagittal Atlas Sections
Disadvantages of Talairach
• Based on a single cadaver brain and not representative of younger living brains
• Left-Right hemispheric differences are ignored (assumed symmetric for spatial normalization)
• Cerebellum completely ignored• Notorious problems (e.g. occipital lobe is much
smaller in atlas than most brains) • Non-European brains (e.g. Asian) do not fit well
within the Talairach space
Talairach Coordinate System
• Origin located at the Anterior Commissure (AC)
• Three axes define coordinate system:– Axial plane parallel to the line passing
through the AC – PC– Sagittal plane parallel to the AC – PC line– Coronal plane perpendicular to other two
Talairach Coordinate System
• X-axis goes from the Left Hemisphere to the Right Hemisphere. Positive X coordinate is Right Hemisphere. Range: -75 to +75mm
• Y-axis goes from the Anterior extent to the Posterior extent. Positive Y coordinate is anterior of the AC. Range: -105 to +70mm
• Z-axis goes from the Superior extent to the Inferior extent. Positive Z coordinate is above the plane passing through the AC-PC. Range: -40 to +65mm
Automated Talairach Registration
• Transform individual brains into a standard space – typically Talairach Space
• Colloquially referred to as Talairach’ing
• Formally referred to as Spatial Normalization
• Same components as motion correction – mathematical model, search algorithm, cost function, image interpolation
Spatial Normalization
• Register image of an individual brains to match a template image in a standard space, typically the Talairach atlas
• Linear models incorporate parameters for scale and skew (12 degrees of freedom)
• Nonlinear models use either polynomials or cosine functions to model warping
• Higher orders provide greater accuracy of fit
Templates
• As with the French woman’s brain, there are numerous stories about the various templates in use
• Several of the templates have been developed in an ad hoc and poorly documented fashion
T1-MRI Template (MNI 305)
EPI Template
(FIL)
Methods of Template Creation
• Manually transform each individual brain into Talairach space using linear stretching then average - MNI 305 done this way with 305 young volunteer’s T1 MRI scans after
• Spatially normalize each subject to match an existing template then average
• Round-Robin registration of each subject to every other subject over multiple iterations, averaged then transformed into atlas space
Comparison of Template Creation Methods
Round Robin Register to Existing
6-8 yrs 14-16 yrs 32 yrs
Pediatric Templates
Nonconformity of Templates with Talairach Atlas:
MNI vs Talairach
• MNI 305 does not exactly match the atlas– MNI 305 is bigger in all three dimensions– Near center of the brain MNI 305 matches
the atlas best– Towards the extents larger differences– Variations are not uniform, overall MNI 305
is ~5mm taller in the superior-inferior dimension however parts of the temporal lobes extend ~10mm lower
Accuracy of Talairach Registration Methods
• Classical Talairach method – Good alignment of subcortical structures– Cerebral structures substantially less well aligned– Subjective since landmarks especially PC and to
lesser extent AC are difficult to identify
• Automated Spatial Normalization– Cerebral structures are aligned better– Overall alignment is better– But MNI and ICBM templates don’t conform to
Talairach -> MNI vs Talairach space
Classical Talairach Method vs Nonlinear Spatial Normalization
Classical Talairach Automated Nonlinear
Classical Talairach Method vs Nonlinear Spatial Normalization
Classical Talairach
T1 Template
NonlinearTransformatio
n
Converting MNI to Talairach: Piecewise Linear
• Above the AC (Z >= 0):– X'= 0.9900X– Y'= 0.9688Y +0.0460Z– Z'= -0.0485Y +0.9189Z
• Below the AC (Z < 0):– X'= 0.9900X– Y'= 0.9688Y +0.0420Z– Z'= -0.0485Y +0.8390Z
Converting MNI to Talairach: Nonlinear
• http://www.bioimagesuite.org/Mni2Tal/index.html
QuickTime™ and aTIFF (LZW) decompressor
are needed to see this picture.
Atlas
Piecewise-Linear correction
Non-linear Correction
Comparison of Different Linear Models
SPM5 Spatial Normalization Method
• Co-register mean EPI image to subject’s MPRAGE (or other high resolution structural)
• Segment MPRAGE by tissue type (i.e. CSF, gray, and white matter)
• Spatially normalize subject’s gray matter map to template gray matter map
• Apply both transforms to each EPI volume in the run
SPM5 Spatial Normalization - Good Idea But…
• Structures of interest in fMRI are in gray matter
• Matching gray matter to gray matter bound to be an improvement
• But it relies on accuracy of co-register step
Coregistering EPI to MPRAGE Can be problematic
Ratio Image
• EPI acquired with a FatSat pulse - thus scalp eliminated (good for fMRI; reduces ghosting)
• MPRAGE has bright fat signal from scalp
• Coregistration can get thrown off and try to fit edges of EPI to bright scalp instead of bran
Smoothing
• Form of a more general image processing technique called convolution
• Neighborhood operation
• New pixel value based on weighted sum of a pixel and its neighbors
• A convolution operator is referred to as a kernel
Average Kernel
1 1 1
1 11
11 1
1 1 1
1 11
11 1
32
32 32
3232 32
32
32
32* = ?32
32
32 32
3232 32
32
32
1* = ?
1 1 1
1 11
11 1
28
A kernel is defined by its weights and size
1 1 1
1 11
11 1
1 1 1
1 11
11 11 1 1
1 11
11 1
1 1 1
1 11
11 11 1 1
1 11
11 1
3x3
5x5
Gaussian Kernel
• Weights in Gaussian kernel defined by normal distribution
• Gaussian kernel specified by Full-Width at Half Maximum (FWHM)
2D Gaussian Kernel
2D Gaussian Kernel
1.07 1.14 1.07
1.16 1.141.14
1.141.07 1.07
FWHM ~ 12mm2
Example Reduced Noise Using Smoothing
OriginalPET Image
12mm3
6mm3
24mm3
Gaussian Smoothing
• Advantage
– Removes isolated points of noise in an image
– Compensates for imperfect spatial normalization
– Helps to prepare data to meet statistical analysis requirements
– Reduces false positives in statistical analysis
• Disadvantage
– Reduces the spatial resolution of the image; looks blurrier
– Peaks are squashed
• Ideal filter size is one that matches the size of the areas of activation
(Matched Filter Theorem) - generally unknown and varies across brain
• General rule of thumb for fMRI data is to use a filter width that is twice the
voxel size
Smoothing & Statistical False Positives
Random dataset left is unsmoothed and right is
smoothed
Smoothing and SNR
• Smoothing actually increases the ability to detect task-related signal changes (i.e. functional SNR increases)
• Cost is of course reduced spatial resolution
• Relies on spatial correlation of fMRI data (i.e. neighboring voxels have similar intensity and activation characteristics)
Temporal Filtering
• Similar to spatial filtering expect the data are processed across time
• Some sources of temporal noise– Transient jumps and drops in the global
signal from timepoint to timepoint (ie. overall brightness fluxuates)
– Drift in MRI signal over time– Head movement
Global Normalization
• Global signal is defined as the average intensity of all the voxels in the brain
• Variations in the global signal can swamp the regional changes in the MRI signal that we are trying to measure
• Ratio correction divides the intensity at each voxel by the global signal in that scan and multiples by a constant
• ANCOVA is an alternative that allows for differences in variations based on trial type or condition
Ratio Normalization
-6
-4
-2
0
2
4
6
8
10
1 6 11 16 21 26 31 36 41 46
pre globalnormalizationpost globalnormalization
Signal Drift Across Time
• Gradually, over time the MRI signal in a voxel drifts
• This drift can vary from one voxel to the next
• A simple model of this drift is as a linear rise or fall in the signal
Linear Detrending
High-Pass Filtering
• Similar to linear detrending but higher order variations are also removed
• Types of signal variations that can be corrected are more complex
• All of the signal below a certain frequency is removed.
Non-linear Drift
-20
-15
-10
-5
0
5
10
1 22 43 64 85 106
Effect of Slow Non-linear Drifts
410
420
430
440
450
460
470
480
490
1 22 43 64 85 106
High-Pass Filtering
• Nyquist Sampling Theorem – removing signal fluxuations that are greater than half the frequency of the task potentially removes signal of interest
– Thus, cut-off frequency should be half the task frequency
• For block designs the cut frequency can be determined from the periodicity of your paradigm
• The cut-off is specified in time in SPM
– Thus, combined time of the on- and off-blocks times 2 is the cut-off for a block design
• For event related designs there is no simple formula; using a cut-off that is a ~2 minutes long is a safe bet
High-Pass Filtering
Band-Pass Filter
• Remove signal changes that are both higher and lower than task frequency in a block design
• Cut-offs would be set to 2x and 1/2x the task frequency
• Advantage is removal of both signal drift (high-pass) and cardiac, respiration signal changes (low-pass)
Low-Pass Filtering
Typical Task Frequency
Quality Control in fMRI
• Very important to examine your data after each stage of preprocessing and statistics– Look at raw data for artifacts – Examine realignment plots– Examine mean & variance images before and after realignment
(ana4dto3d toolbox for SPM)– Look at movies of time series before and after realignment
(MEDx or AQuA toolbox for SPM)– Examine plots of image-to-image signal variance (tsdiffana
toolbox for SPM)– Examine how well spatial normalization worked (use Check Reg
in SPM)– Look at single subject statistics for ringing (best with task vs.
lowest control condition)– Do statistics make sense (eg. if motor response used is the
appropriate motor cortex activated?)
fMRI Raw Data Artifacts
• Spikes - caused by transient electrical discharges during scanning; something is leaking RF noise into the scanner room
• Ghosting - Nyquist reconstruction artifacts can sometimes be limited by choice of certain acquisition parameters (eg. echo spacing)
Ghosting on Our Scanner
• On our scanner adjusting echo spacing to be outside of 0.7-0.8ms minimizes ghosting
Ghosting Artifact
BIG Technique Experimental Design
• Behavior Interleaved Gradient (BIG) technique (aka Sparse Sampling) puts a fixed delay between each EPI acquisition
• During this break auditory stimuli can be presented without noise from gradients
• Subjects can verbally respond with minimal effect on motion in the EPI image
• Relies on delay in hemodynamic response• Also called Sparse Sampling
BIG Acquisition
• Requires accurate timing of the task relative to the the scan acquisition to capture peak BOLD response in the volume
• Greatly increases scan time