2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 1 Development of Complex Curricula for Molecular Bionics and Infobionics Programs within a consortial* framework** Consortium leader PETER PAZMANY CATHOLIC UNIVERSITY Consortium members SEMMELWEIS UNIVERSITY, DIALOG CAMPUS PUBLISHER The Project has been realised with the support of the European Union and has been co-financed by the European Social Fund *** **Molekuláris bionika és Infobionika Szakok tananyagának komplex fejlesztése konzorciumi keretben ***A projekt az Európai Unió támogatásával, az Európai Szociális Alap társfinanszírozásával valósul meg. PETER PAZMANY CATHOLIC UNIVERSITY SEMMELWEIS UNIVERSITY sote_logo.jpg dk_fejlec.gif INFOBLOKK 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 2 Peter Pazmany Catholic University Faculty of Information Technology BIOMEDICAL IMAGING fMRI –Data Processing and Basic Analysis www.itk.ppke.hu (Orvosbiológiai képalkotás ) (fMRI –Adatfeldolgozás és elemzés) ÉVA BANKÓ, VIKTOR GÁL Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 3 www.itk.ppke.hu Acquired Data • 3D T1 anatomy– 1×1×1 mm resolution • 4D T2* EPI images– 3D timeseries collected at each TR (1-2 s) – ~4×3.5×3.5 mm resolution Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 4 www.itk.ppke.hu Preprocessing and Processing Steps • Anatomical images– Intensity normalization – Skull-stripping – 3D reconstruction – Normalization (MNI or Talairach) • Functional images– Coregistration – 3D motion correction – Slice-time correction – Smoothing – Defining ROIs – Regression analysis + Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 5 www.itk.ppke.hu Anatomical PreprocessingI. • Intensity normalization– make white matter (WM) homogenous to aid segmentation • Skull-stripping– remove all non-brain tissues – caveat: shouldn’t accidentally removegrey matter (GM) • Segmentation– separate hemispheres, then separateGM from WM, so analysis can berestricted to GM Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 6 www.itk.ppke.hu Anatomical Preprocessing II. • Surface creation– make surfaces out of the segmentedGM and WM • Inflation– inflate WM surface to better visualize activations in sulci • Flattening– cut a patch and flatten or cut at predefined sulci to flatten the whole brain WM surfaceGM surface Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 7 www.itk.ppke.hu Anatomical Preprocessing III. • Normalization– transform each individual brain into a standard space by predefined algorithms so 2nd-level (group-level) analysis can be performed – standard spaces: • Talairach space based on one post-mortem brain • Montreal Neurological Institute (MNI) space based on a large series of MRI scans on normal controls individual spaceMNI space Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 8 www.itk.ppke.hu Functional Preprocessing I. • Coregistration– 3Danatomyandthefunctionalimagesareacquiredinadifferentspace;moreovertheEPIsequencedistortsthebrainintheneighborhoodofcavities – alinear(ornon-linear)warpingalgorithmisrequiredtoregisterbothinthesamespacesostatisticalactivationscanbeprojectedtotheanatomicalsurface + = EPI distortion Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 9 www.itk.ppke.hu Functional PreprocessingII. • 3D Motion correction– alignallfunctionalimagestoareferenceimage(usuallythefirstimageortheimageinthemiddleofthescan)sincetheirlocationcouldhaveslightlychangedduetosubjectmotionandallstatisticalanalysesassumethatthelocationofagivenvoxelwithinthebraindoesnotchangeovertime • Slice-timing correction– withacontinuousdescendingEPIsequence,thebottomsliceisacquiredaTRlaterthanthesliceonthetop,sothereisashiftintheonsetofthehaemodynamicfunction.Onesolutiontothisproblemistointerpolatethedataduringpreprocessingasifthesliceswereacquiredsimultaneously • Smoothing– spatiallysmoothingeachoftheimagesimprovesthesignal-to-noiseratio(SNR),butwillreducetheresolutionineachimage Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 10 www.itk.ppke.hu Statistical Analysis of Functional ImagesI. • Aims:– find and describe the effect of stimulation if there is any • Based on the spatial complexity of the signal, there are:– one-dimensional methods• doing the statistics separately on a voxel-by-voxel basis (classic GLM regression method) • averaging the timecourse of predefined voxels in a certain area (region-of-interest: ROI) and doing the statistics on that (increases signal-to-noise ratio (SNR) – multi-dimensional (multi-variate) methods• finding patterns in time andspace Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 11 www.itk.ppke.hu Statistical Analysis of Functional ImagesII. • Fitting models to the data:– find models that describe the signal and the noise and evaluate the fit • Parametric models:– linear correlation – t-tests – event-related averaging – general linear models (GLM) • Non-parametric models– bootstrap – Monte-Carlo simulations – multi-variate models Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 12 www.itk.ppke.hu Statistical Analysis of Functional ImagesIII. • Noise integration into models– models should take noise into account either as a separate term – there are models devoted to noise estimation (nuisance variability models) such as time autocorrelation or drift • Univariate models treating each voxel separately need to be statistically corrected for– correction for the multiple comparison problem • Group-level statistics model the population not particular individuals– Random effects models Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 13 www.itk.ppke.hu Linear Transform Hypothesis • ItisassumedthattheprocessesfromneuronalfiringtoBOLDresponseconstituteatime-invariantlinearsystem,sothefMRIsignalisapproximatelyproportiontoameasureoflocalneuralactivity,averagedoveraspatialextentofseveralmillimetersandoveratimeofseveralseconds. • Haemodynamicimpulseresponsefunction:(HIRForHRF)themeasurablefMRIsignalforabriefstimuluspresentation Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 14 www.itk.ppke.hu Haemodynamic Response Function Nervous system Haemodynamics MR scanner VASO man2 Series of stimulation Regressor convolved with the HRF modeled by the HRF Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 15 www.itk.ppke.hu Model of Cortical Activity and Haemodynamic Impulse Stimuli Neural activity HRF Predicted fMRI response fMRI responses from cortical activity Estimating cortical activity from fMRI responses Neural activity HRF Measured fMRI response time time estimated regressor weights Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 16 www.itk.ppke.hu General Linear Model Approach • in the case of continuous signal: y(t): measured fMRI response x(t): input signal (i.e. the sum of time-shifted Dirac delta functions) h(t): HRF n(t): noise N: number of event types in the experiment • in the case of discrete signal: y: measured fMRI response X: convolution (design) matrix h: HRF vector if X = [X1 X2 .. Xn] h = [h1 : hN] TP_tmp TP_tmp TP_tmp Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 17 www.itk.ppke.hu y = Xhp ory = Xp whereXis the convolution of the known design matrix with the assumed HRF p: the amplitude of the neural response / weight of the regressor / beta parameter Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 18 www.itk.ppke.hu In other words: fMRIsignal fMRI signal + + + . . . p1 × p2 × = + cond1 cond2 condn pn × resid residuals (noise) . . . Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 19 www.itk.ppke.hu Design Matrix • in a simple case (block design, one type of event only) 1 1 -1 1 1 1 1 0 1 0 1 0 1 1 other nuisance variables p1 … … … … Block alteration(stimulus on/off) Mean Drift p1is the amplitude of modulation of underlying neural activity (regression coefficient) p1Convolve only the relevant event types (here: 1stcolumn) with HRF, not the nuisance variables. Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 20 www.itk.ppke.hu What is p (regression coefficient)? • p or beta (ß) is the slope of the regression line that relates the values of the experimental variable to the measured fMRI response to the variable in a given voxel • Continuous regressor –also called a covariate –contain quantifying exp. variable (e.g. stimulus contrast), while a binary regressor contain distinguishable exp. conditions (e.g. on/off) fMRI response Continuous variable 0 1 2 3 fMRI response Binary variable 0 1 slope: p or ß Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 21 www.itk.ppke.hu To solve, find p to satisfy pis the product of the measured signal ywith the pseudoinverse of X(X#) • Advantages:– estimation can be done even with superposing fMRI responses – noise is accommodated in the model • Limitations:– each event type is estimated with a single pparameter – GLM approach assumes that the shape of the HRF is identical (canonical HRF) to each event type and at every area in the cortex Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 22 www.itk.ppke.hu Steps in a GLM Analysis • Defining the regressors (i.e. the design matrix) to model:– presentation time, or properties of the stimuli – noise parameters (drift, head motion) – behavior (performance) of the subjects • Model fitting– determine the regressor coefficients (e.g. by least-squares estimation) – estimate the goodness of fit by determining the residuals (the difference between the actual measured signal and the predicted signal) • Visualization– residual variance maps to visualize goodness of fit – t-maps to visualize the contrast between two regressors – bar diagrams of regressor coefficients (beta values) extracted from a cortical area (ROI analysis) Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 23 www.itk.ppke.hu GLM Summary y =X * p + . Observed data: yisthefMRI(BOLD)signalatvarioustimepointsatasinglevoxel (GLM treats each voxel as a separate column vector of data). Design matrix: Severalcomponentswhichexplaintheobserveddata,i.e.theBOLDtimeseriesforthevoxelconvolvedwiththeshapeoftheexpectedBOLDresponseovertime(HRF). Includestiminginfo:onsetanddurationvectors,otherregressors,e.g.realignmentparameters. Parameters: Definethecontributionofeachcomponentofthedesignmatrixtothevalueofy. Estimatedsoastominimizetheerror.,i.e.leastsumsofsquares. Error: Differencebetweentheobserveddata,yandthatpredictedbythemodel,Xp. NotassumedtobesphericalinfMRI. ROI-GLM Model Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 24 www.itk.ppke.hu Goodness of fit • it can be quantified how much the model accounts for the variance in the measured data: • crucial to determine how well the given parameter estimate describes the fMRI response in that specific condition (or it is just a result of a noisy data) • a statistical test is needed that does not depend on the perfect fit of the model ›randomization test(similar to bootstrapping the data) TP_tmp Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 25 www.itk.ppke.hu Finite Impulse Response (FIR) Filter … an alternate way to estimate the underlying HRF • fits data with many finite impluse responses • however, it is sensitive to overfitting: to fit to the noise in that particular dataset/condition fit Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 26 www.itk.ppke.hu Deconvolution Analysisbased on FIR model y = Xh • instead of estimating one parameter per condition, the aim is to estimate the whole HRF seperately for each condition • therefore, it can only done reliably when the number of conditions is low Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 27 www.itk.ppke.hu HRF optimization To solve, find vector hto satisfy • h can be obtained via „deconvolution” analysis using a non-linear regression method: – start out with a canonical HRF, convolve it with the design matrix to get an estimated signal (model) – compare measured signal to model and calculate the least-squares error – change the parameters of the HRF to minimize the error TP_tmp TP_tmp Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 28 www.itk.ppke.hu HRF can slightly differ between subjects and areas JG_V1_amp RS_V4_amp JG_V4_amp Subj 1 –V1 Subj 1 –V4 Subj 2 –V4 measured signal fitted HRF Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 29 www.itk.ppke.hu Why bother to estimate HRF anyway? • better sensitivity › improved detection GLM built using HRF estimate › GLM built upon canonical HRF › (Ciuciu et al., 2002, 1stInt. Symp. on Biological Imaging) more sensible: bilateral activation in Heschel gyrus for (sound-silence) Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 30 www.itk.ppke.hu BUT in order to do so… • reasonable SNR is needed • the design needs to be efficient and random (i.e.jittered intervals andrandomized event order)so that the event are linearlyindependent • the design matrix needs to beinvertible to solve for theparameters (applies to all experiments) Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 31 www.itk.ppke.hu An example… Event (stimulus) sequence Model: separate and summed up BOLD responses Measured BOLD signal Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 32 www.itk.ppke.hu The ultimate goal is to model the data the best possible way hrffitted hrffitted hrfimage Basis Functions Single HRF HRF + derivatives Finite Impulse Response (FIR) Time (s) hrfderivfit hrfderivfit derivbfmatx firmtx firmodel firfit Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 33 www.itk.ppke.hu Modeling Noise -“Nuisance Variability” • if not modeled: – specificity decreases (due to underestimatingvariance and increasing the number of falsepositives) • types:– drift (slow change):• can be linear or quadratic • denoising: discrete cosine transform (DCT) – autocorrelation:• fast, periodic autoregressive signals • elimination: AR(1): old + new noise ARMA(1,1): AR + a series of independent white noise DCT base functions Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 34 www.itk.ppke.hu Parametric maps F-test • compare the residuals with and without including one of the explanatory variables to see if it accounts for a statistically significant portion of the variance of the data. The ratio of the variance estimates follows the F distribution. T-test • define contrast (c) as a linear combination of parameter estimates and divide by their variance(e.g. c=1*b1+ 0*b2+ 0*b3+… ) c’= 1 0 0 0 0 0 0 0 b1b2b3b4b5.... Biomedical Imaging: fMRI–Data Processing and Basic Analysis 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 35 www.itk.ppke.hu T-test example c=1*b1+ -1*b2 2011.10.04.. TÁMOP –4.1.2-08/2/A/KMR-2009-0006 36 www.itk.ppke.hu Experimental Design • Block design– a sequence of longer periods of a fixed type of stimulation and rest intervals – simple, robust, high SNR – unnatural, rigid frame for doing experiments • Event-related design (fast or slow)– similar to EEG experiments – requires more complex statistics – yields smaller SNR therefore requires more repetition – more flexible, natural experimental frame – event spacing needs to be jittered and event sequence randomized Biomedical Imaging: fMRI –Advanced StatisticalAnalysis