Translational Neuroodeling Unit SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Signal, Noise and Preprocessing* Methods and Models for fmri Analysis Septeber 25 th, 2015 Lars Kasper, PhD TNU & MR-Technology Group Institute for Bioedical Engineering, UZH & ETHZ Generous slide support: Guillaue Flandin Ged Ridgway Klaas Enno Stephan John Ashburner *Huettel et al.
Overview of SPM for fmri SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Preprocessing Iage tie-series Kernel Design atrix Statistical paraetric ap (SPM) Realignent Soothing General linear odel Noralisation Statistical inference Rando field theory Teplate Paraeter estiates p <0.05 2
fmri = Acquiring Movies SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth z y of threediensional Blood Oxygen-Level Dependent (BOLD) contrast iages x typically echoplanar iages (EPI) Run/Session: Tie Series of Iages Task No Task Task scan 1 tie scan N 3
fmri = Acquiring Movies SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth The Localized Tie-series is the Fundaental Inforation Unit of fmri Signal: Fluctuation through Blood oxygen level dependent (BOLD) contrast Noise: All other fluctuations Run/Session: Tie Series of Iages scan 1 tie scan N 4
fmri Movie: An exaple SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth 5
fmri Movie: Subtract the Mean SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth interest in fluctuations only 6
The Goal of Preprocessing SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Before After Preprocessing 8
Sources of Noise in fmri SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Acquisition Tiing Subject Motion Anatoical Identity Inter-subject variability Theral Noise Physiological Noise Teporal Preproc Spatial Preproc Spatial Preproc Spatial Preproc Spatial Preproc Noise Modeling Slice-Tiing Realignent Co-registration Segentation Soothing PhysIO Toolbox 9
The SPM Graphical User Interface SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Preprocessing 1. 2. Realignent Slice-Tiing Correction Co-registration Unified Segentation & Noralisation Soothing Noise Modeling Physiological Confound Regressors 10
Sources of Noise in fmri SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Acquisition Tiing Subject Motion Anatoical Identity Inter-subject variability Theral Noise Physiological Noise Teporal Preproc Slice-Tiing Realignent Co-registration Segentation Soothing PhysIO Toolbox 11
Slice-tiing correction (STC) SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Slices of 1 scan volue are not acquired siultaneously (60 s per slice) Creates shifts of up to 1 volue repetition tie (TR), i.e. several seconds Reduces sensitivity for tie-locked effects (saller correlation) True 2D Acquisition Sae-Tiepoint Assuption z tie 12
Slice-tiing correction (STC) SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Slice-tiing correction: All voxel tie series are aligned to acquisition tie of 1 slice Missing data is sinc-interpolated (band-liited signal) Before or after realignent? before: doinant through-slice otion after: doinant within-slice otion At all? block design: for long TR (3s+) & short blocks (10s) iproves estiates > 5 % event-related: for noral TRs (2s+) iproves estiates > 5 % Sladky et al, NeuroIage 2011 13
Interpolation - Intuition SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Support Point Suing Moving Average Wolfra Mathworld, Convolution 14
STC Results: Siulation SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Slice-tiing Correction Teporal-Derivative Modelling Block Stiulation 10s blocks 15s blocks 1s TR 4s 1s TR 4s 1s TR 4s 1s TR 4s Event-Related Stiulation event/ 4±2 s event/ 6±3s Sladky et al, NeuroIage 2011 15
STC Results: Experient SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Sladky et al, NeuroIage 2011 16
Sources of Noise in fmri SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Acquisition Tiing Subject Motion Anatoical Identity Inter-subject variability Theral Noise Physiological Noise Spatial Preproc Spatial Preproc Spatial Preproc Spatial Preproc Slice-Tiing Realignent Co-registration Segentation Soothing PhysIO Toolbox 17
Finite Resolution and Voxel Identity SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth voxel = volue eleent (3D pixel) 18
Preproc = Correct Voxel Misatch SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Voxel Misatch Between Functional Scans/Runs Functional/Structural Iages Subjects Realignent Inter-Modal Coregistration Noralisation/ Segentation Soothing 19
Spatial Preprocessing SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth REALIGN COREG SEGMENT NORM WRITE SMOOTH GLM 20
Spatial Preprocessing Input SNR & Preproc Teporal Spatial General Realign Coreg Output Noralise Sooth fmri tie-series Structural MRI TPMs Segentation Deforation Fields (y_struct.nii) Kernel REALIGN COREG SEGMENT NORM WRITE SMOOTH 0 11 21 31 0 12 22 32 0 13 23 33 1 14 24 34 Motion corrected Mean functional (Headers changed) MNI Space GLM 21
General Rearks: Iage Registration SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Realignent, Co-Registration and Noralisation (via Unified Segentation) are all iage registration ethods Goal: Manipulate one set of iages to arrive in sae coordinate syste as a reference iage Key ingredients for iage registration A. Voxel-to-world apping B. Transforation C. Siilarity Measure D. Optiisation E. Interpolation 22
A. Voxel-to-World Mapping SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth 3D iages are ade up of voxels. Voxel intensities are stored on disk as lists of nubers. Meta-inforation about the data: iage diensions conversion fro list to 3D array voxel-to-world apping Spatial transforation that aps fro: data coordinates (voxel colun i, row j, slice k) to: a real-world position (x,y,z ) in a coordinate syste e.g.: Scanner coordinates T&T/MNI coordinates 23
A. Voxel-to-World: Standard Spaces SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Talairach Atlas MNI/ICBM AVG152 Teplate Definition of coordinate syste: Actual brain diensions Origin (0,0,0): anterior coissure Right = +X; Anterior = +Y; Superior = +Z European brains, a bit dilated (bug) 24
B. Transforations SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Transforations describe the apping of all iage voxels fro one coordinate syste into another Types of transforations rigid body = translation + rotation Translation Rotation affine = rigid body + scaling + shear non-linear = any apping (x,y,z) to new values (x,y, z ) described by deforation fields Scaling non-linear deforation Shear 25
C. Siilarity & D. Optiisation SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Siilarity easure suarizes reseblance of (transfored) iage and reference into 1 nuber ean-squared difference correlation-coefficient utual inforation intra-odality (sae contrast) inter-odality (different contrasts possible) Autoatic iage registration uses an optiisation algorith to axiise/iniise an objective function Siilarity easure is part of objective function Algorith searches for transforation that axiises siilarity of transfored iage to reference Also includes constraints on allowed transforations (priors) 26
Preprocessing Step Categorisation SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth B. Allowed Transforations Rigid-Body Affine Non-linear REALIGN COREG SEGMENT NORM WRITE C. Siilarity Measure Mean-squared Difference Exact Linearized Solution Mutual Inforation Conjugate Direction Line Search D. Optiisation Tissue Class Probability Iterated Conditional Modes (EM/Levenberg-Marquardt) 27
E. Reslicing/Interpolation SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Finally, iages have to be saved as voxel intensity list on disk again After applying transforation paraeters, data is re-sapled onto sae grid of voxels as reference iage Reoriented Resliced 1x1x3 voxel size 2x2x2 voxel size 28
E. B-spline Interpolation SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth 29
Spatial Preprocessing Input SNR & Preproc Teporal Spatial General Realign Coreg Output Noralise Sooth fmri tie-series Structural MRI TPMs Segentation Deforation Fields (y_struct.nii) Kernel REALIGN COREG SEGMENT NORM WRITE SMOOTH 0 11 21 31 0 12 22 32 0 13 23 33 1 14 24 34 Motion corrected Mean functional (Headers changed) MNI Space GLM 30
Realignent SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth fmri tie-series Aligns all volues of all runs spatially Rigid-body transforation: three translations, three rotations REALIGN Objective function: ean squared error of corresponding voxel intensities Voxel correspondence via Interpolation Motion corrected Mean functional 31
Realignent Output: Paraeters SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth 32
fmri Run after Realignent SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth 33
Co-Registration SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Structural MRI Aligns structural iage to ean functional iage Affine transforation: translations, rotations, scaling, shearing COREG Objective function: utual inforation, since contrast different Motion corrected Mean functional 0 11 21 31 0 12 22 32 0 13 23 33 1 14 24 34 (Headers changed) Optiisation via Powell s ethod: conjugate directions, line seach along paraeters Typically only trafo atrix ( header ) changed 34
Co-Registration: Output SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Joint Histogra Marginal Histogra Mean functional Anatoical MRI Joint and arginal Histogra Quantify how well one iage predicts the other how uch shared inforation Joint probability distribution estiated fro joint histogra intensity bins structural intensity bins functional Joint Histogra: h(i f,i s ) Count of voxels who have intensity i f in functional and i s in structural iage 35
Co-Registration: Output SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Voxels of sae tissue identity should have sae intensity in an MR-contrast In a second MR contrast, this intensity ight be different, but still the sae aong all voxels of the sae tissue type Therefore, aligned voxels in 2 iages induce crisp peaks in joint histogra 36
Sources of Noise in fmri SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Acquisition Tiing Subject Motion Anatoical Identity Inter-subject variability Theral Noise Physiological Noise Spatial Preproc Slice-Tiing Realignent Co-registration Segentation Soothing PhysIO Toolbox 37
Spatial Noralisation: Reasons SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Inter-Subject Variability Inter-Subject Averaging Increase sensitivity with ore subjects (fixed-effects) Generalise findings to population as a whole (ixed-effects) Ensure Coparability between studies (alignent to standard space) Talairach and Tournoux (T&T) convention using the Montreal Neurological Institute (MNI) space Teplates fro 152/305 subjects 38
Unified Segentation SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Structural MRI TPMs Deforation Fields Segented Iages Warps structural iage to standard space (MNI) SEGMENT NORM WRITE Non-linear transforation: discrete cosine transfors (~1000) 0 11 21 31 0 12 22 32 0 13 23 33 1 14 24 34 Objective function: Bayes probability of voxel intensity Motion corrected (Headers changed) MNI Space 39
Theory: Segentation/Noralisation SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Why is noralisation difficult? No siple siilarity easure, a lot of possible transforations Different Iaging Sequences (Contrasts, geoetry distortion) Noise, artefacts, partial volue effects Intensity inhoogeneity (bias field) Noralisation of segented tissues is ore robust and precise than of original iage Tissue segentation benefits fro spatially aligned tissue probability aps (of prior segentation data) Motivates a unified odel of segentation/noralisation 40
Theory: Unified Model Segentation SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Bayesian generative odel 1 of voxel intensities y i fro tissue class probabilities, deforation fields and bias fields Objective function: log joint probability of all voxel intensities y Gaussian Mixture Model probability of intensity in given voxel for tissue class coil inhoogeneities CSF μ k Bias Field Raw K k=1 ρ(β) E = log P(y μ, σ, γ, b 1 K, α, β) WM γ k P y i c i = k σ k Bias Field Corrected pixel count iage Intensity y [1] Ashburner & Friston (2005), Neuroiage Prior: Tissue probability aps b 1 b 2 b 3 Deforation Fields b k (α) TPMs in MNI space ~1000 discrete cosine transfors 41
Suary of the unified odel SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth SPM12 ipleents a generative odel of voxel intensity fro tissue class probabilities Principled Bayesian probabilistic forulation Gaussian ixture odel: segentation by tissue-class dependent Gaussian intensity distributions voxel-wise prior ixture proportions given by tissue probabilities aps Deforations of prior tissue probability aps also odeled Non-linear deforations are constrained by regularisation factors inverse of estiated transforation for TPMs noralises the original iage Bias field correction is included within the odel 42
Segentation results SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth segentation works irrespective of iage contrast Spatially noralised BrainWeb phantos T1 T2 PD Estiated Tissue probability aps (TPMs) Cocosco, Kollokian, Kwan & Evans. BrainWeb: Online Interface to a 3D MRI Siulated Brain Database. NeuroIage 5(4):S425 (1997) 43
Benefits of Unified Segentation SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Affine registration Non-linear registration 44
Spatial noralisation Liitations SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Seek to atch functionally hoologous regions, but... Challenging high-diensional optiisation any local optia Different cortices can have different folding patterns No exact atch between structure and function Interesting recent paper Aiez et al. (2013), PMID:23365257 Coproise Correct relatively large-scale variability Sooth over finer-scale residual differences 45
Soothing Why blurring the data? SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Intra-subject signal quality Suppresses theral noise (averaging) Increases sensitivity to effects of siilar scale to kernel (atched filter theore) Kernel Single-subject statistical analysis Makes data ore Gaussian (central liit theore) SMOOTH Reduces the nuber of ultiple coparisons Second-level statistical analysis Iproves spatial overlap by blurring anatoical differences MNI Space GLM 46
Soothing How is it ipleented? SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Convolution with a 3D Gaussian kernel, of specified full-width at half-axiu (FWHM) in atheatically equivalent to slice-tiing operation or reslicing, but different kernels there (Sinc, b-spline) Gaussian kernel is separable, and we can sooth 2D data 2D with data two 1D with 2 separate 1D convolutions Exaple of Gaussian soothing in one-diension The Gaussian kernel is separable we can sooth convolutions. Generalisation to 3D is siple and efficient A 2D Gaussian Kernel 47
fmri Run after Soothing SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth 48
Spatial Preprocessing Input SNR & Preproc Teporal Spatial General Realign Coreg Output Noralise Sooth fmri tie-series Structural MRI TPMs Segentation Deforation Field (y_struct.nii) Kernel REALIGN COREG SEGMENT NORM WRITE SMOOTH 0 11 21 31 0 12 22 32 0 13 23 33 1 14 24 34 Motion corrected Mean functional (Headers changed) MNI Space GLM 49
Sources of Noise in fmri SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Acquisition Tiing Subject Motion Anatoical Identity Inter-subject variability Theral Noise Physiological Noise Teporal Preproc Spatial Preproc Spatial Preproc Spatial Preproc Spatial Preproc Noise Modeling Slice-Tiing Realignent Co-registration Segentation Soothing PhysIO Toolbox 50
Thank you SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth and: TNU Zurich, in particular: Klaas MR-technology Group IBT, in particular: Klaas Everyone I borrowed slides fro 51
Mixture of Gaussians SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Classification is based on a Mixture of Gaussians odel, which represents the intensity probability density by a nuber of Gaussian distributions. Multiple Gaussians per tissue class allow non-gaussian intensity distributions to be odelled e.g. partial volue effects Frequency (nuber of pixels) Iage Intensity 52
Tissue Probability Maps SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Tissue probability aps (TPMs) are used as the prior, instead of the proportion of voxels in each class ICBM Tissue Probabilistic Atlases. These tissue probability aps were kindly provided by the International Consortiu for Brain Mapping 53
Deforing the Tissue Probability Maps SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Tissue probability aps iages are warped to atch the subject The inverse transfor warps to the TPMs 54
Why regularisation? Overfitting SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Regularisation constrains deforations to realistic range (ipleented as priors) Non-linear registration using regularisation (error = 302.7) Teplate iage Affine registration (error = 472.1) Non-linear registration without regularisation (error = 287.3) 55
Modelling inhoogeneity SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth A ultiplicative bias field is odelled as a linear cobination of basis functions. Corrupted iage Bias Field Corrected iage 56
Unified segentation: The aths SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Mixture of Gaussians: probability of voxel i having intensity y i, given it is fro a specific cluster k (e.g. tissue class gray atter) Prior probability of voxel s tissue class (e.g. voxel proportion) γ k Joint Probability: Marginal probability of voxel intensity: Joint probability all voxels intensity: 57
US Maths: Bias Field SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Ipleented by adjusting the Means and Variances of the Gaussians on a pixel-by pixel basis by a function soothly varying in space, ρ i β : μ k μ k ρ i β, σ k 2 σ k ρ i β 2 ρ i is the exponential of a linear cobination of low frequency basis functions Paraeters to be estiated: vector β intensity probability conditioned on cluster identitiy: 58
US Maths: Spatial Priors by TPMs SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Replacing stationary ixing proportions γ k by voxel-dependent proportions which are infored by the prior tissue probabilities b ik for this voxel i and different tissue types k γ k γ k i = γ k b ik j=1 K γ j b ij Note: K can be larger than the nuber of tissue classes, since each class can be reflected by a ixture of Gaussians, e.g. 3 Gaussians for gray atter (to allow for non-gaussian distributions per tissue class) E.g. partial volue effects 59
US Maths: Deforation Fields SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Deforation (and thereby noralisation) is ipleented by allowing the prior TPMs (which are in MNI-space) to be spatially transfored by a paraeterised apping b ik b ik α P c i = k γ, α = γ kb ik (α) j=0 K γ j b ij (α) Paraeter vector to be estiated: α about 1000 discrete cosine transfors 60
US Maths: Regularisation SNR & Preproc Teporal Spatial General Realign Coreg Noralise Sooth Linear Regularisation of Bias Field and Deforation Field Estiates By including prior distributions for α and β as zero-ean ultivariate Gaussians Covariance: α T C α α = bending energy; ρ β = exp(k 70 N(0, β)) Thus, the final objective function to be axiised is the log-joint probability of intensity, bias and deforation field paraeters: Equivalenty, the negative free energy is iniised: 61