Sie sind auf Seite 1von 84

Jody Culham

Brain and Mind Institute


Department of Psychology
Western University

http://www.fmri4newbies.com/

fMRI Data Quality Assurance


and Preprocessing

Last Update: September 24, 2014


Last Course: Psychology 9225, F2014, Western
Spatial Limits of fMRI
Terminology
ONE
VOLUME
one set of all slices

VOXEL
(Volumetric Pixel)
In-plane resolution
MID-SAGITTAL SCOUT IMAGE e.g., 192 mm / 64
for slice selection = 3 mm
3 mm
6 mm
Number of Slices
e.g., 12 slices 6 mm thick IN-PLANE SLICE
3 mm

Matrix Size
e.g., 64 x 64

Field of View (FOV)


e.g., 19.2 cm
Anatomical Data (2D view)
(12 slices shown here; realistically more like 256 slices)
Anatomical Data (3D view)
Raw data
•typical example:
+ • 256 slices x 256x256
• 16.7M voxels
z • 1-mm resolution
• 1 time point
-
Processed data
•3 dimensions
L R • 3 spatial dimensions
• x, y, z
+ • no time dimension

- +
x
Functional Data (2D View)
(10 slices shown here; realistically more like 32 slices)
Thinking About Functional Data
Raw data
•typical example of one run
• 32 slices x 64x64
• 131,072 voxels
• 3-mm isovoxel resolution
• 5 minutes = 300 s @ TR=2
 150 time points

Processed data
•4 dimensions
• 3 spatial dimensions
• x, y, z
• 1 time dimension

•One way to think about it


• 150 volumes

•Another way to think about it


from Brain Voyager Documentation • 131,072 time courses

•Aside: May want to exclude voxels outside


brain: 131,072  80,000 voxels
Fucntional Data (3D/4D view)


Data Organization

Image from Poldrack et al., 2011

• Anatomical or functional data files are basically just matrices of


intensity values in 3 or 4 dimensions
Header Information
• Headers
• contain info about scanning parameters in structured format
• may be separate from data (e.g., SPM/Analyze uses separate .hdr and
.img files) or combined with data (e.g., BV .vmr file includes both header
and data)
Working With Data
• Different packages use different formats
• Examples
– Siemens: DICOM format
– SPM: Analyze
– MNI: MINC

• NIfTI (Neuroimaging Informatics Technology Initiative)


– commonly used format useful for transferring data between software packages
– other variants (e.g., GIfTI for surfaces)

• Can often hack files (esp. text-only files) faster than modifying via GUIs
fMRI in the Big Picture
What Limits Spatial Resolution
• noise
– smaller voxels have lower SNR
• head motion
– the smaller your voxels, the more contamination head motion
induces
• temporal resolution
– the smaller your voxels, the longer it takes to acquire the same
volume
• 4 mm x 4 mm at 16 slices/sec
• OR 1 mm x 1 mm at 1 slice/sec
• vasculature
– depends on pulse sequences
• e.g., spin echo sequences reduce contributions from large vessels
– some preprocessing techniques may reduce contribution of large
vessels (Menon, 2002, MRM)
Ocular Dominance Columns
• Columns on the order of ~0.5 mm have been observed with fMRI
Submillimeter Resolution
vein

Stria of Gennari
(Layer IV)

Spin Echo Gradient Echo Spin Echo Gradient Echo


Functional Functional Anatomical Anatomical
(activation (superficial activation
localized to includes vessels)
Layer IV)

Goenze, Zappe & Logothetis, 2007, Magnetic Resonance Imaging


• anaesthetized monkey; 4.7 T; contrast agent (MION)
• ~0.3 x 0.3 x 2 mm
Can you follow some of this Methods section now?
stuff you
should
understand

stuff your MR
physicist or
MR tech can
explain

Gallivan et al., 2011, J. Neurosci.


Data Quality
The Black Box
• The danger of automated processing and fancy images
is that you can get blobs without every really looking at
the real data
• The more steps done at without quality assurance, the
greater the chance of wonky results

Big Black Box


Raw
Data of automated
software

Pretty pictures
Your favorite
fMRI software

Slide adapted from Mark Daley


Culham’s First Commandment:
Know Thy Data
• Look at raw functional images
– Where are the artifacts and distortions?
– How well do the functionals and anatomicals correspond?
• Look at the movies
– Is there any evidence of head motion?
– Is there any evidence of scanner artifacts (e.g., spikes)?
• Look at the time courses
– Is there anything unexpected (e.g., abrupt signal changes at the start of
the run)?
– What do the time courses look like in the unactivatable areas (ventricles,
white matter, outside head)?
• Look at individual subjects
• Double check effects of various transformations
– Make sure left and right didn’t get reversed
– Make sure functionals line up well with anatomicals following all
transformations
• Think as you go. Investigate suspicious patterns
Sample Artifacts
Ghosts Hardware Malfunctions Metallic Objects (e.g., hair tie)

Spikes
Contrast and Contrast:Noise

T1 T2 High Low
Contrast: Contrast:
Noise Noise
Note: This SNR level is not
Why SNR Matters based on the formula given

Huettel, Song & McCarthy, 2004, Functional Magnetic Resonance Imaging


Sources of Noise
Physical noise
• “Blame the magnet, the physicist, or the laws of physics”

Physiological noise
• “Blame the subject”
How Can You Tell the Difference?
• Test a phantom No physiological noise!
Sources of Noise
• Physical noise
– intrinsic thermal noise within subject and scanner electronics
– system noise associate with imperfections in scanner
hardware

• Physiological noise
– artifacts
• head motion
• respiration
• heart rate
– Variability in neuronal activity associated with non-task
factors
– Changes in behavioral performance and cognitive strategies
A Map of Noise

Huettel, Song & McCarthy, 2004, Functional Magnetic Resonance Imaging

• voxels with high variability shown in white


Effect of Field Strength on Signal and Noise

Huettel, Song & McCarthy, 2004, Functional Magnetic Resonance Imaging

• Although raw SNR goes up with field strength, so does thermal


and physiological noise
• Thus there are diminishing returns for increases in field strength
Effect of Field Strength on Signal
Effect of Field Strength on Vascular Signals
Effect of Field Strength on Susceptibility

1.5 T

4.0 T
Sampling Time
• More samples  More confidence effects are real
What’s the most common source of
physiological noise?
Head Motion: Main Artifacts

1) Rim artifacts
• hard to tell activation from artifacts
• artifacts can work against activation

time1  time2 Playing a movie of


slices over time
helps you detect
head motion

Looking at the
negative tail can
help you identify
artifacts

2) Region of interest moves


• lose effects because you’re sampling outside
ROI
BV Correction During Single Run
Head Motion: Good, Bad,…

run 1 run 2 run 3 run 4 run 5 run 6

lide from Duke course


… and really, really ugly!

de from Duke course


Motion Correction Algorithms
pitch roll yaw
z translation

y translation
x translation

• Most algorithms assume a rigid body (i.e., that brain doesn’t deform with
movement)
• Align each volume of the brain to a target volume using six parameters: three
translations and three rotations
• Target volume: the functional volume that is closest in time to the anatomical image
BVQX Motion Correction Options
nalysis/fMRI 2D data preprocessing menu

Align each volume to the volume closest in time to the anatomical


– Why?
Mass Motion Artifacts
• motion of any mass in the magnetic field, including the head,
is a problem

grasparatus
gaze

head brace
coil

arm brace
Mass Motion Artifacts
Grasping and Even in the absence
reaching data from of head motion,
block designs mass motion creates
circa 1998 huge problems

1.0

Where is the signal


phantom
.60
-.60 correlated with the
(fluid-filled
mass position?
sphere)

30-1.0
s 30 s
r value

Time Course: Motion Correction Parameters


7 0.6
Left Right Left Right Left

(mm or degrees)
Motion Detected
% Signal Change

900

0
0

-4
0 0
-0.4
0 30 60 90 120 150 0 30 60 90 120 150
Time (seconds) Time (seconds)

Culham, chapter in Cabeza & Kingstone, Handbook of Functional Neuroimaging of Cognition (2 nd ed.), 2006
Mass Motion Distort Magnetic Field

Barry et al., in press, Magnetic Resonance Imaging


Motion Correction Algorithms
• Existing algorithms correct two of our three problems:
√ 1. Head motion leads to spurious activation
√ 2. Regions of interest move over time
X 3. Motion of head (or any other large mass) leads to changes to
field map

• Sometimes algorithms can introduce artifacts that


weren’t there in the first place (Friere & Mangin, 2001,
NeuroImage)
The Fridge Rule
• When it doubt, throw it out!
Head Restraint

Vacuum Pack

Head Vise
(more comfortable than it
sounds!)

Bite Bar

Thermoplastic mask

Often a bunch of foam padding works as well as anything


Prevention is the Best Remedy
• Tell your subjects how to be good subjects
– “Don’t move” is too vague

• Make sure the subject is comfy going in


– avoid “princess and the pea” phenomenon
• Emphasize importance of not moving at all during beeping
– do not change posture
– if possible, do not swallow
– do not change posture
– do not change mouth position
– do not tense up at start of scan
• Discourage any movements that would displace the head
between scans
• Do not use compressible head support

• For a summary of info to give first-time subjects, see


http://defiant.ssc.uwo.ca/Jody_web/Subject_Info/firsttime_subjects.htm
Mock “0 T” Scanners
Data Preprocessing
Software

And you thought people were


opinionated about Mac vs. PC!

Table from Poldrack, Mumford & Nichols, 2011


Sample Preprocessing Sequence

Figure from Poldrack, Mumford & Nichols, 2011


Disdaqs
• Discarded data acquisitions: trashed volumes at the beginning of a run
before the magnet has reached a steady state
• The scanner may throw out the disdaqs before it saves the data or it may
save them too, in which case you have to discard them in your software
• Sometimes it can take awhile for the subject to reach a steady state too --
Startle response!
T1, T2, T2*

Image from Poldrack et al., 2011

• Different image types have different resolution, contrast polarity, and distortions
• Nevertheless, we must ensure that the functional data (T2*) align well with the
anatomical data (typically T1)
• Use file headers to determine spatial alignment between data types, then tweak if
needed
Field Map Correction

• Remember we collect data in frequency space not image space


• Remember that our data collection assumes a homogeneous main magnetic field
• If the magnetic field is not fully homogeneous, we get distortions in frequency
space and image space
• If we collect a “field map” we can correct these distortions

http://www.mathworks.com/matlabcentral/fileexchange/30853-field-mapping-toolbox
BV Preprocessing Options
Slice Order

Non-
Interleaved;
Descending

The first slice is collected almost a full


TR (e.g., 2 s) before the last slice

Problem with non-


interleaved slices:
excitation of one slice may
carry over to next slice
Slice Order
Interleaved;
Descending

The first yellow slice is collected almost a full


TR (e.g., 2 s) before the last pink slice
Slice Scan Time Correction
Slice Scan Time Correction

• interpolates the data from each slice such that is is as


if each slice had been acquired at the same time

Source: Brain Voyager documentation


BV Preprocessing Options
3D (No interpolation)
2D (No interpolation)
1D (No interpolation)
1D (No interpolation)

0 0 0 53 53 53 128 128 128 155 155 155 164 164 164 128 128 128 155 155 155 164 164 164 128 128 128 127 127 127 139 139 139 123 123 123

3-mm functional voxels shown at 1-mm resolution


Spatial Smoothing
Gaussian kernel
Maximum
• smooth each voxel by a
Gaussian or normal Half-Maximum
function, such that the
nearest neighboring voxels
have the strongest Full Width at Half-Maximum
weighting (FWHM)

-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8

FWHM = 6
Gaussian Smoothing (4-mm) FWHM on One Voxel

0 0 0 53 53 53 128 128 128 155 155 155 164 164 164 128 128 128 155 155 155 164 164 164 128 128 128 127 127 127 139 139 139 123 123 123

Smoothed V14 ~= 0.1xV11 + 0.3xV12 + 0.75xV13 + 1xV14 + 0.75xV15 + 0.3xV16 + 0.1xV17

0.1 + 0.3 + 0.75 + 1 + 0.75 + 0.3 + 0.1


Repeat for every voxel…

0 0 0 53 53 53 128 128 128 155 155 155 164 164 164 128 128 128 155 155 155 164 164 164 128 128 128 127 127 127 139 139 139 123 123 123
Effect of Smoothing

pre-smoothing
post-smooothing (4-mm FWHM)
Gaussian Smoothing (8-mm) FWHM on One Voxel

0 0 0 53 53 53 128 128 128 155 155 155 164 164 164 128 128 128 155 155 155 164 164 164 128 128 128 127 127 127 139 139 139 123 123 123

Now voxels within +/- 8 mm have an effect


Why Smooth?
Signal Smoothed Signal

outside gray white gray outside


brain matter matter matter brain

Noise Smoothed Noise

(Signal + Noise) Smoothed (Signal + Noise)

• Signal sums
• Random noise cancels
1D - 2D – 3D Gaussians
Effects of Spatial Smoothing on Activity

No smoothing 4-mm FWHM 7-mm FWHM 10-mm FWHM


Should you spatially smooth?
• Advantages
– Increases Signal to Noise Ratio (SNR)
• Matched Filter Theorem: Maximum increase in SNR by
filter with same shape/size as signal
– Reduces number of comparisons
• Allows application of Gaussian Field Theory
– May improve comparisons across subjects
• Signal may be spread widely across cortex, due to
intersubject variability
“Why would you spend $4 million to
buy an MRI scanner and then blur
• Disadvantages the data till it looked like PET?”

– Reduces spatial resolution -- Ravi Menon

– Challenging to smooth accurately if size/shape of


signal is not known

e from Duke course


BV Preprocessing Options
Components of Time Course Data

Source: Smith chapter in Functional MRI: An Introduction to Methods


Linear Drift

uettel, Song & McCarthy, 2004, Functional Magnetic Resonance Imaging


BV Preprocessing Options

Before LTR:

After LTR:
BV Preprocessing Options

High pass filter


•pass the high frequencies, block the low frequencies
•a linear trend is really just a very very low frequency so LTR may not
be strictly necessary if HP filtering is performed (though it doesn’t hurt)

Before High-pass After High-pass

near drift

1/2 cycle/time course

2 cycles/time course
BV Preprocessing Options

• Gaussian filtering
– each time point gets averaged with adjacent time points
– has the effect of being a low pass filter
• passes the low frequencies, blocks the high frequencies
– for reasons we will discuss later, I recommend AGAINST
doing this

Before Gaussian (Low Pass) filtering After Gaussian (Low Pass) filtering
“Low-Pass” vs. “High-Pass”

Low-pass
•pass the low frequencies
through the filter
•remove the high frequencies
•you could also call this
temporal smoothing

High-pass
•pass the low frequencies
through the filter
•remove the high frequencies
Fourier Spectrum for Data at Rest
• Even in a “resting state scan” (i.e., when subject isn’t
doing a task), certain frequencies are present

Respiration
• every 4-10 sec (0.3 Hz)
• moving chest distorts susceptibility

Cardiac Cycle
• every ~1 sec (0.9 Hz)
• pulsing motion, blood changes

Solutions
• gating
• avoiding paradigms at those frequencies
Order of Preprocessing Steps is Important
• Thought question: Why should you run motion
correction before temporal preprocessing (e.g., linear
trend removal)?

• If you execute all the steps together, software like


Brain Voyager will execute the steps in the
appropriate order
• Be careful if you decide to manually run the steps
sequentially. Some steps should be done before
others.
SSTC and 3DMC Interact
Can you follow more of this Methods section now?
stuff you
should
understand

stuff we’ll
cover later

Gallivan et al., 2011, J. Neurosci.


Take-Home Messages
• Look at your data
• Work with your physicist to minimize physical noise
• Design your experiments to minimize physiological
noise
• Motion is the worst problem: When in doubt, throw it
out
• Preprocessing is not always a “one size fits all”
exercise

Das könnte Ihnen auch gefallen