Introduction to fmri Pre-processing Tibor Auer Department of Psychology Research Fellow in MRI
Data Types Anatomical data: T 1 -weighted, 3D, 1/subject or session - (ME)MPRAGE/FLASH sequence, undistorted - High spatial resolution (~1 mm isotropic) - Optimised for structural contrast 1 - Acquisition time ~5 minutes Functional data: T 2* -weighted, 4D, 1/measurement - EPI sequence, distorted - Lower spatial resolution (2-3 mm non-isotropic) - Optimised for functional contrast 2 - Acquisition time ~2 seconds (20-30 slices) Fieldmaps: 2 3D, 1/session - Dual-echo GE sequence, undistorted - Lower spatial resolution (same as fmri) - Map of magnetic field inhomogeneities - Acquisition time ~1 minute.
Data Functional Time series - showing BOLD signal changes - in each point in the brain 3D Time Time BOLD signal - at each repetition (e.g. 2 seconds) +1D
Overview Challanges Challanges Different people s brains are different shapes EPI images are distorted The head is likely to move during the fmri scan Slices within the same image come from different time points (assuming standard 2D EPI) Head movements between fmri scans and structural scans Signal is typically spatially smoothed HRF is delayed and temporally smooth Signal intensity drifts over time Solutions Normalisation to template (MNI) Undistort using B 0 fieldmap Spatial realignment (rigid-body) Temporal realignment (slicetiming) Coregister (headers only) Spatial smoothing Just model it (next lecture)! Just model it (next lecture)! Courtesy to Johan Carlin
Overview Challanges Challanges Different people s brains are different shapes EPI images are distorted The head is likely to move during the fmri scan Slices within the same image come from different time points (assuming standard 2D EPI) Head movements between fmri scans and structural scans Signal is typically spatially smoothed HRF is delayed and temporally smooth Signal intensity drifts over time Interactions realignunwarp realign slicetiming ordering Preprocessing is no substitute for collecting high quality data! Courtesy to Johan Carlin
Overview Images in dicom format Convert to format used by SPM (NIFTI) Initial image diagnostics Smooth EPI Normalise EPI Coregister EPI to structural Within series processing: Spatial realignment Undistortion Temporal realignment Normalise structural Single subject stats Group stats Publish
Overview aa modules (aamod_*) autoidentifyseries_timtrio get_dicom_structural get_dicom_epi get_dicom_fieldmap convert_structural convert_epis convert_fieldmaps fieldmap2vdm tsdiffana smooth norm_write_dartel coreg_extended_2epi worm_write_meanepi_dartel firstlevel_model firstlevel_contrasts firstlevel_threshold secondlevel_model paper_maker??? firstlevel_threshold_register2fs realignunwarp slicetiming biascorrect_structural coreg_extended_1 segment8_multichan dartel_createtemplate dartel_norm_write + freesurfer_initialise freesurfer_autorecon_all
Preprocessing Initial diagnostics Mean and variance images: Diagnostic plots: Scaled variance of difference from the 1st vol.: - Volumewise - Slicewise Descriptive stats: - Volumewise mean - Slicewise variance
Preprocessing Normalization Challenge People have different shaped brains Transforming brains to a common template - Group studies - Cross study comparison, meta analysis Template: universal space - Talairach and Tournoux, 1988 (based on a single subject) - Montreal Neurological Institute: MNI152 Averaged from T 1 images of 152 subjects - Information extraction from Images (London): IXI (in SPM12) Also in MNI Fewer (but growing number of) subjects, geographically more representative More tissue classes (segmentation)
Preprocessing Normalization Approaches Direct: 1. EPI MNI modality + resolution/smoothness + shape Indirect (Coreg 1 +Norm): 1. Structural MNI smoothness + shape 2. EPI Structural MNI modality + resolution Indirect+ (Coreg 1 +DARTEL+Norm): 1. Structural Study template smoothness + shape (intermediate) 2. Study template MNI shape (intermediate) 3. (Structural Study template MNI) 4. EPI Structural Study template MNI modality + resolution
Preprocessing Normalization Affine (12 DOF) registration: - 3 translations - 3 rotation Rigid-body (6DOF) Transformation - 3 shears - 3 zooms Shear Zoom
Preprocessing Normalization Transformation Linear transformations: - Assumes linear relationship between position and transformation - Able to match overall size and shape, but not small details Nonlinear transformations: - Deformation fields: nonlinear relationship between position and transformation large DOF Caveat: overfitting (unnecessary warps) make a brains exactly the same - Regularisation: transformation within a certain range based on a priori knowledge 1
Preprocessing Normalization Transformation Nonlinear transformations: Template Affine only some differences in shape Affine + nonlinear with regularization good match to overall shape some differences in details Affine + nonlinear without regularization overfitting
Preprocessing Normalization Implementation Coreg 1 +Norm: 1. Structural MNI smoothness + shape non-linear via segmentation 2 2. EPI Structural MNI modality + resolution rigid-body (6DOF) Coreg 1 +DARTEL+Norm: 1. Structural Study template smoothness + shape (intermediate) non-linear via segmentation 2 2. Study template MNI shape (intermediate) affine (12DOF) 3. (Structural Study template MNI) 4. EPI Structural Study template MNI modality + resolution rigid-body (6DOF)
Preprocessing Normalization Diagnostics Segmentation
Preprocessing Normalization Diagnostics Segmentation
Preprocessing Motion correction Challenge Movement confounds data: - Signal recorded from different position Correspondence PVE (e.g. WM GM) - Signal recorded at a different field strength Local inhomogeneities in the magnetic field affecting the brain area
Preprocessing Motion correction Solution Movement confounds data: - Signal recorded from different position Correspondence PVE (e.g. WM GM) Motion correction: transform each volume to the first - same modality, same resolution, same shape Rigid-body (6DOF)
Preprocessing Motion correction Solution Movement confounds data: - Signal recorded at a different field strength Local inhomogeneities in the magnetic field affecting the brain area Motion correction with Unwarping: - Iteratively estimate the effects and compensate for them Motion correction Until minimal change in remaining variance Compensate derivative fields Estimate derivative fields 1
Preprocessing Motion correction Solution Movement confounds data: - No corection is perfect Residual effect of motion Include the realignment parameters as covariates in the statistical model - Capture any movement related variance in the data. - However! Reduces design s degree of freedom (usually > 100) Problematic if movement is correlated with effects of interest (e.g. button pushes, verbal responses etc.) Can remove the effects of interest.
Preprocessing Motion correction Diagnostics MoCo parameters QA
Preprocessing Motion correction Diagnostics Best solution: reduce movement to the minimum - Comfort 1 - Discourage talk during breaks (between-session movement 2 ) - Dummy scans, Instructions - End of measurement Reject data to reduce heterogeneity (Summary) - Scans - Subjects
Preprocessing Motion correction Diagnostics Summary (outliers) - Trans - x: None - Trans - y: 12 - Trans - z: 1 - Pitch: None - Roll: 19 - Yaw: 19
Preprocessing Motion correction Diagnostics Subject #19 MoCo parameters Subject #2 MoCo parameters
Preprocessing Temporal realignment Challenge Acquisition - 2D EPI sequence collect volume slice-by-slice - Each slice is acquired at a different time - TR = 2s, 32 slices: 62.5 ms between-slice difference ~1.9 s difference between the first and the last slices - Confound precise timing if TR is long (> 1s) Event-related vs. epoch-based
Preprocessing Temporal realignment Solution Slice time correction - Interpolate timecourse 1 Implementation - Preprocessing: Calculate time shift Tags slices - Interpolation during HRF-estimation 8 6 4 2 0 1 2 3 4 5 6 7 8 9 2 0-2 0 1 2 3 4 5 6 7 8 9 2 0-2 0 1 2 3 4 5 6 7 8 9 2 0-2 0 1 2 3 4 5 6 7 8 9 2 0-2 0 1 2 3 4 5 6 7 8 9 Time (in TRs)
Preprocessing Temporal realignment Implementation Sliceorder/Slice timings - Timings are more accurate than orders - Specified manually (automatic in aa!) Reference slice: all other slices will be adjusted to it - Middle slice: the maximum interpolation necessary interpolation artefacts - It will not be altered: Chose according to your area of interest! - Caveat: Scanner sync pulse is at the acquisition of the first slice - Stimuli timing adjusted to the first slice or - Model needs to be adjusted (automatic in aa!)
Preprocessing Motion correction and Temporal Realignment Slices acquired at different time points spin history effects - Movement against slice direction Striping No motion Motion - Interleaved: If you move up 1 voxel, the slices are excited every 1/2 or 3/2 TR instead of 1/1. Interleaved - Movement by slicetime interaction Can t correct Motion parameters won t show (but imply/correlate) Sequential - Need to look at your data! Courtesy to Danny Mitchell
Preprocessing Motion correction and Temporal Realignment Principle: - Slice time first: + slice timing is fixed - non-linear (i.e. non-correctable) spatial effects in your data if there is head motion - Realign first: + head motion is fixed - slice timings are a little bit wrong sometimes due to head movement Guidelines - Realign first if you use a sequential acquisition (slices are ~50ms apart) timing errors will be small - Slice time correct first if you use an interleaved acquisition, where timing errors could be large - Don t bother with slice time correction if: You acquire the slab at once (3D EPI) or TR is extremely short (e.g. multi-band) If you plan to model HRF shape (FSL solution) Cave: overfitting! Courtesy to Johan Carlin
Preprocessing Coregistration Challenge Goal: the functional in the same space as the structural - Overlay functional results onto the structure to enhance localisation - Use structural as a precursor to spatial normalization: EPI Structural MNI Data types - Reference image: Structural: T 1 -weighted, high resolution, fewer artefacts - Source image: Functional: T 2* -weighted, low resolution modality + resolution, but same shape Rigid-body (6DOF)
Preprocessing Coregistration Source image Functional image to estimate transformation - example EPI from ca. the middle FSL - mean EPI (temporally averaged) SPM Smoothed: lower noise level vs. smaller (effective) spatial resolution Requirements - Reasonably good starting point (local optima) Similar acquisition position (AutoAlign) Reorient (?) - Adequate overlapping with structural partial-brain fmri requires two-step coregistration via a whole-brain EPI 1 1. Whole-brain EPI Structural 2. Partial-brain EPI Whole-brain EPI Structural
Preprocessing Smoothing Spatial weighted averaging: usually Gaussian kernel - Value at each voxel: a weighted average of the values in surrounding voxels Original signal Signal plus noise Apply kernel Recovered signal to each point - signal-to-noise ratio: assuming random noise - Signal spread (depends on kernel size): between-subject spatial correspondence (by blurring minor differences) effective spatial resolution (RESEL) the number of multiple comparisons False positives (voxel wise)!
Preprocessing Smoothing Kernel Size Amount to smooth: - Full Width at Half Maximum height (FWHM) - Ideally: hypothesis-dependent 1 FWHM According to the spatial extent of the signal Neuroanatomical assumptions - Visual areas: smaller kernel - Prefrontal: larger kernel - Methodologically: GRFT-dependent (inference) Ensure minimum smoothness (RESEL 3 voxel) Iterative? - Practically: Resolution-dependent: 1.5 voxel-size 8-10 mm is common (SPM default, history!)
Questions? House, M.D. Los Angeles, CA: Fox Broadcasting