75
Evaluation and implementation of neural brain activity detection methods for fMRI Sabina Breitenmoser 2005-02-21 LiTH-IMT/ERASMUS - R - - 05/030 - - SE

Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Embed Size (px)

Citation preview

Page 1: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Evaluation and implementation of neural brain

activity detection methods for fMRI

Sabina Breitenmoser

2005-02-21LiTH-IMT/ERASMUS - R - - 05/030 - - SE

Page 2: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain
Page 3: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Ecole Polytechnique Federale de LausanneSwiss Federal Institute of Technology

School of Engineering - Signal Processing Institute (ITS)EPF Lausanne , Prof. Jean-Philippe ThiranInstitute of Technology - Biomedical Engineering (IMT)LiTH Linkoping , Prof. Hans Knutsson

Linkoping University, Universitetssjukhuset SE - 581 85 Linkoping

Evaluation and implementation ofneural brain activity detection

methods for fMRI

Diploma ThesisWinter Term 04/05

Professor EPFL:

Prof. Jean-Philippe THIRAN

Professor LiTH:

Prof. Hans KNUTSSON

Assistant:

Joakim RYDELL

Sabina BREITENMOSERSection de genie electrique et electronique

21 February 2005

Page 4: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain
Page 5: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Avdelning, Institution Division, Department Linköpings tekniska högskola Institutionen för medicinsk teknik

Datum Date 21 februari 2005

Språk Language

Rapporttyp Report category

ISBN

Engelska/English

Examensarbete

ISRN LiTH-IMT/ERASMUS - R - - 05/030 - - SE

Serietitel och serienummer Title of series, numbering

ISSN

URL för elektronisk version http://www.ep.liu.se/exjobb/imt/erasmus/2005/030/

Titel Evalutation and implementation of neural brain activity detection methods for fMRI Författare Author Sabina Breitenmoser

Sammanfattning Abstract Functional Magnetic Resonance Imaging (fMRI) is a neuroimaging technique used to study brain functionality to enhance our understanding of the brain. This technique is based on MRI, a painless, non-invasive image acquisition method without harmful radiation. Small local blood oxygenation changes which are reflected as small intensity changes in the MR images are utilized to locate the active brain areas. Radio frequency pulses and a strong static magnetic field are used to measure the correlation between the physical changes in the brain and the mental functioning during the performance of cognitive tasks. This master thesis presents approaches for the analysis of fMRI data. The constrained Canonical Correlation Analysis (CCA) which is able to exploit the spatio-temporal nature of an active area is presented and tested on real human fMRI data. The actual distribution of active brain voxels is not known in the case of real human data. To evaluate the performance of the diagnostic algorithms applied to real human data, a modified Receiver Operating Characteristics (modified ROC) which deals with this lack of knowledge is presented. The tests on real human data reveal the better detection efficiency with the constrained CCA algorithm. A second aim of this thesis was to implement the promising technique of constrained CCA into the software environment SPM. To implement the constrained CCA algorithms into the fMRI part of SPM2, a toolbox containing Matlab functions has been programmed for the further use by neurological scientists. The new SPM functionalities to exploit the spatial extent of the active regions with CCA are presented and tested.

Nyckelord Keyword fMRI, constrained CCA, PCA, modified ROC, SPM

Page 6: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

6

Page 7: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Contents

1 Introduction 11

2 Motivation 13

2.1 Interaction between engineering and medicine . . . . . . . . . . . . . . . 13

2.2 Medical signal processing and neurology . . . . . . . . . . . . . . . . . . 13

3 Background 15

3.1 Magnetic Resonance Imaging (MRI) . . . . . . . . . . . . . . . . . . . . 15

3.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.1.2 Basic principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.1.3 Imaging parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.1.4 Field of application . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.2 Functional Magnetic Resonance Imaging (fMRI) . . . . . . . . . . . . . . 19

3.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.2.2 The Blood Oxygen Level Dependent (BOLD) response . . . . . . 19

3.2.3 Brain activity detection . . . . . . . . . . . . . . . . . . . . . . . 20

3.3 Statistical Parametric Mapping (SPM) . . . . . . . . . . . . . . . . . . . 20

3.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.3.2 SPM approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.3.3 SPM image format . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4 Theory 23

4.1 GLM method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.2 Canonical Correlation Analysis (CCA) . . . . . . . . . . . . . . . . . . . 24

4.2.1 The canonical correlation . . . . . . . . . . . . . . . . . . . . . . . 24

4.2.2 Constrained CCA . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

4.3 Principal Component Analysis (PCA) . . . . . . . . . . . . . . . . . . . . 26

4.4 Impulse response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4.5 Spatial filter functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4.5.1 Gaussian filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4.5.2 Steerable filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4.6 Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.6.1 ROC (synthetic datasets) . . . . . . . . . . . . . . . . . . . . . . 30

4.6.2 Modified ROC (real human datasets) . . . . . . . . . . . . . . . . 31

7

Page 8: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

5 Methods 33

5.1 Evaluation of neural activity detection methods . . . . . . . . . . . . . . 34

5.1.1 Brain data acquisition . . . . . . . . . . . . . . . . . . . . . . . . 34

5.1.2 Brain data handling . . . . . . . . . . . . . . . . . . . . . . . . . 34

5.1.3 Implementation of the CCA method . . . . . . . . . . . . . . . . 35

5.1.4 Generation of a hemodynamic response model . . . . . . . . . . . 35

5.1.5 Spatial modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.1.6 Generation of a correlation map . . . . . . . . . . . . . . . . . . . 41

5.1.7 Noise filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

5.1.8 Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

5.1.9 Matlab GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

5.2 SPM implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

5.2.1 Structure of SPM software . . . . . . . . . . . . . . . . . . . . . . 44

5.2.2 Testing SPM2 code . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.2.3 Integration of CCA methods . . . . . . . . . . . . . . . . . . . . . 45

6 Results 47

6.1 Some important values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

6.2 Evaluation on synthetic data . . . . . . . . . . . . . . . . . . . . . . . . . 47

6.2.1 Related work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

6.3 Evaluation on real human data . . . . . . . . . . . . . . . . . . . . . . . 48

6.3.1 Steerable spatial filters . . . . . . . . . . . . . . . . . . . . . . . . 49

6.3.2 Constrained CCA . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

6.4 Implementation in SPM . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

6.4.1 New SPM code for CCA . . . . . . . . . . . . . . . . . . . . . . . 50

6.4.2 New SPM architecture . . . . . . . . . . . . . . . . . . . . . . . . 52

6.4.3 New functionalities . . . . . . . . . . . . . . . . . . . . . . . . . . 52

6.4.4 Evaluation in SPM: GLM versus constrained CCA . . . . . . . . 52

7 Discussion 57

8 Conclusion 59

A Guideline to use SPM for fMRI 65

A.1 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

A.2 The SPM menu window . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

A.3 A canonical correlation analysis with SPM . . . . . . . . . . . . . . . . . 67

B Data handling 75

8

Page 9: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Abbreviations

BOLD Blood Oxygen Level Dependentbpm beats per minuteCCA Canonical Correlation AnalysisEPI Echo Planar ImagingfMRI functional Magnetic Resonance ImagingFWHM Full Width at Half MaximumGLM General Linear ModelGUI Graphical User Interfacehrf hemodynamic response functionICA Independent Component AnalysisMIP Maximum Intensity ProjectionMRI Magnetic Resonance ImagingNMR Nuclear Magnetic ResonancePCA Principal Component AnalysisROC Receiver Operating CharacteristicSNR Signal to Noise RatioSPM Statistical Parameter MapTR Time to Repeat

9

Page 10: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

10

Page 11: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Chapter 1

Introduction

The brain is the most fascinating and least understood organ in the human body. Forcenturies, scientists and philosophers have tried to find the relationship between behav-iour, emotion, memory, thought, consciousness and the physical body. In recent years,techniques for non-invasive monitoring of the working brain have experienced a strongdevelopment. Neuroimaging tools and methods have been designed to study brain func-tionality to enhance our understanding of the brain.

Functional Magnetic Resonance Imaging (fMRI) is one neuroimaging technique with thecapacity to map neural activity with high spatial resolution. The technique is based onMRI, a painless, non-invasive image acquisition method without harmful radiation. InfMRI radio waves and a strong magnetic field are used to measure the correlation be-tween physical changes in the brain and the mental functioning during the performanceof cognitive tasks. The physical changes are small intensity changes in MR images dueto local blood oxygenation changes.

This project presents some approaches for the analysis of fMRI data. The CanonicalCorrelation Analysis (CCA) is evaluated and studied. CCA is able to fully exploit thespatio-temporal nature of fMRI data for detecting active brain areas. In a second step,an implementation of this promising technique into the software environment called SPM(Statistical Parameter Mapping) is performed. SPM is designed to analyse fMRI data aswell as PET/SPECT images. The spatio-temporal CCA-based fMRI techniques are notpreviously supported by this software.

Keywords : fMRI, constrained CCA, PCA, modified ROC, SPM

11

Page 12: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

12

Page 13: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Chapter 2

Motivation

2.1 Interaction between engineering and medicine

Cross-disciplinary activities in the field of medicine are of a growing interest. Biomedicalengineering is a discipline that joins the knowledge in engineering sciences with clinicalpractice. New devices, algorithms, processes and systems are developed to improve themedical practice and health care. A researcher in the field of biomedical engineering notonly needs to be familiar with the relevant applications of engineering in medicine butalso with the basic life sciences.

This interaction between the traditional engineering field and modern medicine is for methe motivation to tackle this project. It is interesting to see how new techniques in thefield of engineering can improve medical diagnosis and health care.

2.2 Medical signal processing and neurology

Medical care incorporates diagnostic, monitoring and therapeutic issues. Typically rele-vant patients characteristics are measured, interpreted and an appropriate decision aboutthe therapeutic action is taken. The medical signal processing focuses on the extractionof the useful information from medical images and signals.

In this project we will work with medical MRI images of the brain to extract neural brainactivity. The interpretation of this information and the decisions to make about the ther-apeutic actions is left to the neurologists. Nevertheless, the signal-processing engineershould have some basics of neurology to be able to take a primary judgment about thegoodness of his results.

The challenge in the field of neurology is the ignorance of the expected results. We cannotlook inside the brain and compare our results to what we see. But we can assume thatthe results are as reliable as possible and help to make them even more reliable withtoday’s advanced signal processing algorithms and methods.

13

Page 14: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

14

Page 15: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Chapter 3

Background

3.1 Magnetic Resonance Imaging (MRI)

3.1.1 Introduction

Magnetic resonance imaging (MRI) is an imaging technique based on the physical phe-nomenon of Nuclear Magnetic Resonance (NMR). It is used in medical settings to produceimages of the inside of the human body. MRI can produce an image of the NMR signalin a thin slice through the human body. By scanning a set of such slices a volume of apart of the human body can be represented with MRI.

The principle of NMR is used in spectroscopy since the 1950s. The first human scan wastaken in 1977 and the technology was adopted for clinical use around 1988.

3.1.2 Basic principles

NMR is the phenomenon that occurs when the sub-atomic particles in an atom nucleus,i.e. protons and neutrons, are immersed in a static magnetic field and exposed to a secondoscillating magnetic field. If the net spin of all protons and neurons in an atomic nucleusis non-zero, the nucleus has a magnetic moment. This magnetic moment interacts withthe magnetic fields in which it is immersed.

Hydrogen is the most abundant element in the human body (especially in water and fat).We consider a proton of a hydrogen atom to understand how particles with spin behavein a magnetic field. The magnetic moment of this proton causes the proton to behavelike a tiny magnet with north and south poles. Placed in an external magnetic field B0

of a magnetic resonance scanner, the spin vector aligns itself with the external field likea magnet would. There are two possible energy configurations, a low and a high energystate where the spin vector is aligned parallel or anti-parallel with respect to the externalmagnetic field B0 as demonstrated by figure 3.2 (this figure as well as some others aretaken from Ola Friman’s dissertation [1]). Slightly more protons are in the low energy con-figuration, giving a net magnetic field in the same direction as the external magnetic field.

15

Page 16: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Figure 3.1: MR scanner (Philips)

Figure 3.2: The two different energy states a hydrogen spin vector can attain when placedin a static magnetic field B0

We have now spinning protons creating their own longitudinal magnetic field inside ahigh external magnetic field. In magnetic resonance, the interaction of the two magneticfields results in precession of the protons.

16

Page 17: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

The hydrogen protons are precessing with a frequency depending on the external magneticfield strength. This precessional frequency is

f = B0 · γ (3.1)

B0 is the magnetic field strength measured in Tesla. γ = 42.58 MHz·T−1 is the gyro-magnetic ratio of hydrogen. The precessional frequency f is also known as the Larmorfrequency, after the man who discovered it.

If a radio frequency (RF) pulse of energy at the same frequency (the Larmor frequencyof a hydrogen proton) is applied to these hydrogen protons for a fraction of a second,the energy will be transferred to the protons. The resultant magnetic vector points ina transverse direction. This process is called resonance and the protons are caused toprecess in phase.

In the 1980’s the static magnetic field of most closed systems was ’only’ 0.5 T. The earthhas a magnetic field strength of 30 to 60 µT. So the magnetic field of an 0.5 T MR scan-ner is approximately 10’000 times stronger than the earth’s magnetic field. In the 1990’sthis was replaced by 1.5 T MR scanners and today 3 T systems are installed for medicaluse. Typical available MRI-Scanners have the following magnetic field strength insidethe tube and the corresponding Larmor frequency of the second oscillating magnetic field(RF pulse magnetic field) to measure hydrogen atoms:

field [Tesla] 12

1 112

3

frequency [MHz] 21 43 64 128

In absence of this RF pulse the hydrogen protons gradually relax back, losing the trans-verse magnetism and their phase coherence. Individual protons relax at different rates,depending on what type of tissue the atoms are within. The precession of the protonscauses an induction of a current in the receiver coils of the MR scanner. The RF pulsesare repeated at a special interval (TR = time to repeat).

3.1.3 Imaging parameters

The electrical signals are analysed in terms of strength and location to create the MRimage. The basic variations observed in the pulse sequences are T1 and T2 weighted im-ages.

The time T1 is the time of the longitudinal magnetization to recover, i.e. the rate at whichthe longitudinal component of the magnetization vector regrows. Individual tissues havea unique T1-relaxation, some recover faster than others.

The time T2 is the time of the transverse magnetization to decay due to dephasing, i.e.rate of the relaxation process in transverse direction due to the loss of phase coherence

17

Page 18: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

between the nuclei. T2-relaxation is also unique to individual tissues.

The nuclei in the studied ensemble are spatially distributed and may for this reasonexperience slightly different magnetic field strengths. The T ∗

2 time constant measuresthe combined effect of random nuclei interactions and magnetic field inhomogeneities. Itnaturally holds that T2 > T ∗

2 . The current induced in the receiver coil due to the RFpulse therefore mainly decays with a time constant T ∗

2 . By applying different RF pulsesin different sequences, all three time constants can be measured.

The resolution of the achieved images is normally 512 × 512 pixels or below. Howeveras presented in the subsequent section, for fMRI the image size is normally 128× 128 oreven 64× 64 pixels.

For more details the reader is directed to the large amount of literature on MRI (forexample [9]).

3.1.4 Field of application

Radiologists (medical doctors specialized in the field of radiology) are trained in MRIto read the magnetic resonance images. MRI technologists operate the MRI scanner toobtain the images that the radiologist prescribes. Post processing algorithms are appliedto magnetic resonance images to extract more information or enable better visualizationof information in magnetic resonance images.

MRI has some advantages compared to other medical image registering techniques likeComputer Tomography (CT) or other x-ray based imaging methods. First of all, the bodyis not exposed to x-rays that can harm the body. We just have to accept that personswith metallic implants that cannot be removed temporary like pace makers, tattoos withmetal in the ink, permanent make up, metal plates, pins or other metallic implants areexcluded of MRI examinations. For all other subjects, MRI does not cause any negativeeffects on the body. As far as we know it is a safe imaging method.

The disadvantages of MRI are for example the problem with claustrophobic people thatshould be scanned. Being in an MRI machine can be a very worrying situation for thosepeople. The machine makes a tremendous amount of noise during the scan. Thereforepatients are given earplugs or headphones during the examination. During the scans thepatients are required to hold very still for a long period of time. MRI exams can rangein length from 10 to 90 minutes. Involuntary motion artefacts like respiratory, cardiacand peristaltic movements can be a problem. Orthopedic hardware like screws can alsocause artefacts on the images. MRI is a quite expensive technique.

MRI is generally used to visualize the soft tissues of the body. It has larger differencesbetween soft tissues compared with CT. A typical field of application is MR angiographyto observe blood vessels. Among many other applications is MRI ideal to diagnose mul-tiple sclerosis (MS), tumours, infections of the brain, spine or joints. It can also visualizetorn ligaments in the wrist, knee and ankle or shoulder injuries.

18

Page 19: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

3.2 Functional Magnetic Resonance Imaging (fMRI)

3.2.1 Introduction

Functional Magnetic Resonance Imaging (fMRI) is a technique to locate regions of thebrain activated by a physical sensation or stimulus. This technique is harmless and pain-less and fMRI examinations can be carried out using advanced clinical MRI scannersavailable at all modern hospitals. For this reason this method of detection of brain ac-tivity attracts a growing interest in all fields of neurological research.

During an fMRI experiment, the brain of the subject is scanned repeatedly, using the fastimaging technique of echo planar imaging (EPI). Thus to perform an fMRI experimentan MR scanner with the ability to acquire EPI images is required. The T ∗

2 time constantis generally not utilized for the generation of conventional anatomical MRI images sinceit is susceptible to local magnetic field inhomogeneities. However, the T ∗

2 value is inter-esting in fMRI since it is related to neural activity.

The MR scanner repeats the RF pulse in an interval TR (time to repeat), during a periodof 5 to 10 minutes. The in-plane size of the EPI images is 64×64 or 128×128 voxels anda stack of 10-40 slices are generally acquired. Around 100-200 such image volumes arerepeatedly collected during the examination. The subject is required to carry out sometask consisting of periods of activity and periods of rest while the images are acquired.

The indicators of increased brain activity is the blood flow and blood oxygen concentrationin the active area. Signal processing is used to reveal these regions of functional MRIscans. For better understanding, the physiology of the local blood flow changes in activebrain areas are described below.

3.2.2 The Blood Oxygen Level Dependent (BOLD) response

We cannot observe directly changes in brain activation due to a stimulus. But alreadyin the end of the 19th century were local blood flow changes in active brain areas pre-dicted. All neurons in the brain consume oxygen. The haemoglobin molecules in theblood provide the neurons continuously with new oxygen. An increase of neuronal ac-tivity increases also the demand of oxygen. This leads to an increased concentration ofoxygenated blood in the capillaries surrounding the active brain area.

These local increases in blood flow can be mapped in fMRI as a change in raw imageintensity. Oxygenated blood has different magnetic properties than deoxygenated blood.The T ∗

2 time constant becomes shorter in areas with low oxygen concentration and longerin areas with high oxygen concentration. In the active brain area the intensity of avoxel in the fMRI image is brighter (longer T ∗

2 ). This effect is called blood oxygen leveldependent (BOLD) signal. This change of intensity can however not be detected by thebare eye since it is very small. Special signal processing techniques are needed.

19

Page 20: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Figure 3.3: Neural activity increases the blood flow in the active region to provide theneurons with more oxygen.

3.2.3 Brain activity detection

In a typical experiment of brain activity detection the subject in the MR scanner is ex-posed to a particular form of simulation. This simulation can be pictures shown by specialglasses he wears, sound played by headphones or the movement of the subject’s finger.A series of low resolution MR scans is taken over time. The period between successivescans depends on the scanner’s performance. For some of the scans, the stimulus will bepresented, for some other scans the stimulus will be absent. This activity/rest block isrepeated throughout the whole experiment. There will be a BOLD response in the acti-vated brain areas due to the BOLD signal effect. To see which brain areas were activatedby the stimulus, the low resolution brain images are compared. The voxels whose timeseries contain a BOLD response have to be found to create a map of active brain areas.

3.3 Statistical Parametric Mapping (SPM)

3.3.1 Introduction

The map of similarity measures between a reference time series (the stimulus) and thevoxel time series (fMRI data) is commonly referred to as a statistical parameter map.This construction of a spatially extended statistical map has been instantiated in a soft-ware called SPM (Statistical Parametric Mapping). SPM is an academic software toolkitfor the analysis of functional imaging data [6].

The user should be familiar with the statistical, mathematical and image processingconcepts of SPM. The SPM suite and associated theory was originally developed byKarl Friston to analyse PET data and made available in 1991 for the functional imagingcommunity. By the time of this project, the current release is SPM2 (released the 12of May 2003). It is designed to analyse data from fMRI, PET, SPECT and similarmodalities.

3.3.2 SPM approach

SPM is a software consisting of Matlab functions, scripts and data files and some ex-ternally compiled C subroutines. One part of SPM is written to organize and interpretfMRI images. The image sequences can be realigned, spatially normalized into a stan-

20

Page 21: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

dard space and smoothed by the software. In release SPM2, the statistical parametricmapping approach is voxel based, i.e. the parametric statistical model is assumed at eachvoxel.

After a spatial low-pass filtering, temporal correlation between a voxel time series anda hemodynamic model function is applied to each voxel to build a statistic image withmaximum intensity projection (MIP). General Linear Model (GLM) parameters are usedto test hypotheses (more about GLM see section 4.1).

3.3.3 SPM image format

SPM can deal with two or three dimensional data of any size (either image dimensionsor voxel size). The data should be organized with a separate file for each scan.

SPM uses the header and flat binary image file format of ANALYZE [7]. A descriptionof the main properties of the header and the image file is given below.

The image file

*.img: An uninterrupted array of (unsigned integer, signed short, signed integer, float ordouble) voxel values. Each *.img file has an associated header file that contains informa-tion about the image process.

To spatially normalize the images with SPM, we need to know the initial orientation ofthe images. The global variable sptl Ornt contains this orientation. After normalizationwith SPM the images have the following orientation:

X increases from Left to Right.Y increases from Posterior to Anterior.Z increases from Inferior to Superior.

The header file

*.hdr: The format of the 348 byte header file is that adopted by ANALYZE [8]. Thenecessary fields in the context of SPM include:

Field [SPM default global variable]image size {in voxels for x, y and z} [DIM]voxel size {in mm for x, y and z} [VOX]data type {see spm type.m [6]} [TYPE]a scaling coefficient {applied during memory mapping} [SCALE]offset of voxel values in *.img {in bytes} [OFFSET]the origin {(x,y,z) in voxels} [ORIGIN]description {a short string} [DESCRIP]

It is important that these header files are correct. A common problem with using SPMusually reduce to incomplete or incorrect header files.

21

Page 22: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

22

Page 23: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Chapter 4

Theory

To find neural brain activity we not only need background information about fMRI butalso some signal processing theory. The fMRI process provides us four-dimensional datathat we have to transform and adjust to see and interpret what we are searching for.Methods like the general linear model (GLM) detection are well known and applied inthe problem of finding neural brain activity out of fMRI image series.

More detailed information is given if canonical correlation analysis (CCA) is used insteadof GLM. If we want to evaluate the detection methods and their performance, statisticalmethods are needed. If we work with synthetic data to evaluate the methods, receiveroperating characteristic (ROC) statistics may be applied for comparison. For real datasets those statistics cannot be applied. The location of the activity is not known inadvance in real human data. The ROC has to be adapted. Therefore an introduction tomodified ROC methods is given in this chapter.

4.1 GLM method

As mentioned above, the most commonly used neural activity detection method for fMRIis the General Linear Modelling (GLM). The idea is to set up a model for the stimulusapplied to the subject in the MRI scanner and fit this model to the data. A good fitbetween this model (what we expect to see in the data) and the data itself means thatthe data was probably caused by the stimulation.

GLM is univariate, this means that the model is fit to each voxel time series separately.We only consider one voxel at the time. A univariate linear modelling is

y(t) = aT · x(t) + b + e(t). (4.1)

y(t) is a scalar of the intensity value at each time point. x(t) is the model vector, alsoa function of time like y(t). a are the parameter estimates for x(t). b is a constantcorresponding to the offset of the data. b can be easily included in a. e(t) is the error inthe model fitting.

23

Page 24: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

An estimation of the ”goodness of fit” for each voxel time series is then calculated. Sta-tistical tests on this estimation decide whether the voxel was affected by the stimulationor not. Or in other words; whether we find activation in the voxel or not.

4.2 Canonical Correlation Analysis (CCA)

In this section, an overview of Canonical Correlation Analysis (CCA) and constrainedCCA are provided. The goal of this analysis is to find a relationship between two setsof variables. As the name implies, CCA uses correlation coefficients to quantify therelationship between the two sets of variables. The term ”canonical” pertains to thecoordinate system in which the correlation is measured.

4.2.1 The canonical correlation

If we have two random variables x and y, the correlation coefficient ρ is a scalar between-1 and 1 measuring the degree of linear dependence between x and y.

ρ =def Cov[x, y]√V [x]V [y]

. (4.2)

A strong dependence results in a correlation coefficient close to 1, ρ = 0 represents linearindependence of x and y. For zero mean variables the relation

Cov[x, y] = E{[x− µx][y − µy]} (4.3)

reduces to

Cov[x, y] = E[xy] (4.4)

and

V [x] =1

n

∑(xi − µx)

2 (4.5)

to

V [x] =1

n

∑x2 = E[x2]. (4.6)

Hence equation (4.2) is reduced to

ρ =E[xy]√

E[x2]E[y2]. (4.7)

In a CCA problem we have two multivariate variables, denoted x = [x1, . . . , xm]T andy = [y1, . . . , yn]T . The problem consists of making linear combinations of the variables inx and y. If either x or y is one-dimensional we essentially have the GLM approach.

In a preprocessing step we have to remove the mean to have the condition of zero meanmultivariate variables. Than we form two new scalar random variables x and y as linearcombinations of the components in x and y,

24

Page 25: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

x = wx1x1 + . . . + wxmxm = wTx x,

y = wy1y1 + . . . + wynyn = wTy y. (4.8)

The goal of canonical correlation is now to find the linear combination weights wx =[wx1 , . . . , wxm ]T and wy = [wy1 , . . . , wyn ]T that give maximum correlation between x andy. These weights are denoted regression weights. The equations (4.8) can be inserted inthe definition of the correlation coefficient in equation (4.7),

ρ =E[(wT

x x)(wTy y)]√

E[(wTx x)(wT

x x)]E[(wTy y)(wT

y y)]

=wT

y E[xyT ]wy√(wT

x E[xxT ]wx)(wTy E[yyT ]wy)

=wT

x Cxywy√(wT

x Cxxwx)(wTy Cyywy)

, (4.9)

Cxy is an (m × n) covariance matrix with the components of covariances between thevariables in x and y. Cxx and Cyy are the corresponding matrices for the componentsof covariance between the variables within x and y respectively. CCA maximizes theexpression (4.9) with respect to wx and wy. Hence the derivatives of equation (4.9) withrespect to wx and wy are set to zero, resulting in the following equation system,

Cxywy = ρλxCxxwx

Cyxwx = ρλyCyywy. (4.10)

λx and λy are scaling factors,

λx = λ−1y =

√wT

y Cyywy

wTx Cxxwx

. (4.11)

They have no importance in the current context. We substitute wx for wy and vice versain equation (4.10) and obtain the following two eigenvalue problems,

C−1xx CxyC

−1yy Cyxwx = ρ2wx,

C−1yy CyxC

−1xx Cxywy = ρ2wy. (4.12)

The matrices C−1xx CxyC

−1yy Cyx and C−1

yy CyxC−1xx Cxy share the same eigenvalues. The pri-

mary solution, i.e. the first pair of canonical variates, is given by the eigenvectors wx

and wy belonging to the largest eigenvalue. It is recommended to solve the first equationof the problem (4.12) to obtain wx and the canonical correlations. Then wy is foundthrough the second equation of problem (4.10). This approach ensures that wx and wy

have correct signs to produce a positive canonical correlation coefficient.

25

Page 26: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

4.2.2 Constrained CCA

In a general CCA problem, the regression weights wx and wy would be allowed to adoptboth negative and positive values. In the fMRI analysis context however the regressionweights can be constrained or restricted to plausible values due to prior knowledge. Bet-ter detection performance can be obtained. It exists a procedure for constrained CCAwhere weights are restricted to be non-negative (Das and Sen [3]).

If we take Cxy to be the convolution matrix, we note that

ρ2unconstrained ≥ ρ2

constrained ≥ maxi,j

([Cxy]i,j

)2

. (4.13)

If the unconstrained solution has only positive components in wx and wy, this is thesolution also to the constrained problem. At the other end, the smallest squared cor-relation we are guaranteed to obtain is given by the largest correlation between any ofthe input variables in x and y, i.e. the largest element in Cxy. It is shown that theconstrained solution equals an unconstrained solution to a modified CCA problem whereone or several variables in x and y have been excluded. We will test all possible deletionsto find the global optimum. This constrained version of CCA will significantly improvedetection performance in fMRI (see chapters 6 and 7).

4.3 Principal Component Analysis (PCA)

An fMRI examination results in a large four dimensional spatio-temporal data set. Theinteresting information is hidden in the data. We search for a BOLD response presentin some voxels to indicate them as active. In addition we will also search for a spatialshape of the active region. For both the exact BOLD response function as well as and thespatial extent of the active region we have little prior information. To build reasonableprototypes of the temporal and the spatial model we can use PCA.

Principal Component Analysis (PCA) is able to identify a subspace with interesting sig-nals within a multidimensional signal space. If we look at a BOLD response model, itcan be the case that two parameters influence the shape of this hemodynamic responsemodel in similar ways. We can vary the parameter values within reasonable limits andrealize a corresponding model shape to each parameter set. Like this, we obtain samplesof realistic BOLD responses.

PCA finds the eigen-timecourses ek(t) that minimize the mean square error

E[∑

t

(h(t)− h(t))2]

(4.14)

for a partial expansion to P components:

26

Page 27: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

h(t) = m(t) +P∑

k=1

wkek(t), (4.15)

where m(t) is the average simulated response,ek(t) models the most significant deviations from the mean response,P is the number of eigen-timecourses.

A candidate basis functions for the linear subspace model of the hemodynamic responseare the P eigen-timecourses ek(t), k = 1 . . . P together with the average timecourse m(t).

4.4 Impulse response

To model the BOLD response we can use an impulse model based on the impulse re-sponse. The basic theory about the impulse response is presented in this section.

The impulse response is the response of a linear system to a unit sample impulse assystem’s input. One of the suggested impulse responses is the gamma probability densityfunction with the time parameter and two additional shape parameters τ and δ:

g(t, τ, δ) =( t

τ

· e−δ(t−τ)

τ (4.16)

Another used impulse function with five parameters excluding the time parameter is theDifference of Gamma probability density functions:

g(t, c, τ1, τ2, δ1, δ2) =( t

τ1

)δ1· e−

δ1(t−τ1)τ1 − c ·

( t

τ2

)δ2· e−

δ2(t−τ2)τ2 (4.17)

The BOLD response model can be generated by convolving a square wave function (box-car model) with one of these impulse responses (see chapter Methods 5.1.4).

4.5 Spatial filter functions

Spatial filters are used to take the spatial extent of the active region into account. Thisfilters create weighted averages over the voxel values in the neighbourhood of the analysedvoxel time series.

4.5.1 Gaussian filters

For the canonical correlation analysis we will need some spatial filter theory. We will useGaussian filters. They are presented in this section.

The standard deviation σ of a Gaussian distribution of a variable X is defined as:

σ =Σ(X − µ)2

N, (4.18)

27

Page 28: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

where µ is the mean of all realizations of X and N is the number of such realizations.This variance can also be expressed in terms of the full width of half maximum (FWMH)of the Gaussian distribution function:

σ =

√√√√(FWHM

2

)2

2 · ln 2. (4.19)

A two dimensional circular Gaussian function in x and y with σ = σx = σy has thefollowing equation:

f(x, y, σ) = e−12

x2+y2

σ2 . (4.20)

In three dimensions the spherical Gaussian function in x, y and z with σ = σx = σy = σz

has the following equation:

f(x, y, z, σ) = e−12( r

σ)2 , (4.21)

with r =√

x2 + y2 + z2.

4.5.2 Steerable filters

To model spatial extents of active brain regions with different orientation we will usesteerable filters. The procedure to design a set of two or three dimensional steerable filterfunctions is described in this section.

1. A Gaussian smoothing filter f(z) with a certain size is defined. This Gaussian filtercan also be replaced by any wished low pass filter for smoothing the fMRI data.This is the original filter.

2. The filter kernel is partitioned into four parts, one isotropic central part giso(z) andthree oriented parts gi(z), i = 1, 2, 3. These functions are used for weighting theoriginal filter. The four functions sum to one in every point. A linear combinationof these weight functions can form any orientated filter shape.

The directions ni of the oriented weight functions for 2D filters are:

n1 =

(10

), n2 =

(1/2√3/2

)and n3 =

(−1/2√

3/2

)The oriented weight functions are then obtained as

gi(z) =4

3

(1− giso(z)

)((zT − ni

‖z‖

)2

− 1

4

), i = 1 . . . 3. (4.22)

A natural choice of the center isotropic weight giso(z) is a Gaussian shaped kernel witha width equal to half the original f(z) filter size. The weighting of the original Gaussianlow pass filter with the four weighting functions gives the spatial filter basis functions,

28

Page 29: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Figure 4.1: Construction of a set of 2D spatial filters

fiso(z) = giso(z)f(z)

fi(z) = gi(z)f(z), i = 1 . . . 3

We can also construct three dimensional steerable filters with a minimum number of sixoriented weight function with the following directions:

n1 =

a0b

, n2 =

−a0b

, n3 =

ba0

,

n4 =

b−a0

, n5 =

0ba

, n6 =

0b−a

,

a =2√

10 + 2√

5, b =

1 +√

5√10 + 2

√5

The procedure for generating the filter basis functions is identical to the 2D case. Theoriented weight functions for the three dimensional case are:

gi(z) =(1− giso(z)

)((zT − ni

‖z‖

)2

− 1

6

), i = 1 . . . 6. (4.23)

29

Page 30: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

4.6 Statistics

As in many other post-processing algorithms to fMRI data, our goal is to bring out signalfrom noisy background. Statistical methods will declare a brain voxel to be active (signal)or inactive (resting state). No matter which method we use to measure the performanceof such an algorithm it is important to assess it in terms of accuracy (few voxels falselydeclared to be active, also called specificity) and efficiency (few voxels falsely declaredinactive, also called sensitivity). There exists one useful and popular tool for testingthe efficiency of different diagnostic algorithms in fMRI. This tool is the receiver oper-ating characteristic (ROC) method. The diagnostic algorithms are applied to syntheticpseudo-human fMRI data and the ROC curve is produced to measure the efficiency ofthese algorithms.

In real human data the actual distribution of active voxels is not known. The ROCmethod has therefore to be modified to deal with real human data to be able to comparethe efficiency of the fMRI detection methods like CCA.

In this section, ROC and the modified ROC method are presented.

4.6.1 ROC (synthetic datasets)

The task of fMRI is to designate a brain voxel as active or inactive based on the signalresponse at the voxel induced by a stimulus. Each voxel can take one of the followingfour conditions through a statistical test:

1. voxel truly declared to be active (Y ∩ T )

2. voxel falsely declared to be active (Y ∩ F )

3. voxel truly declared to be inactive (N ∩ F )

4. voxel falsely declared to be inactive (N ∩ T )

Here T and F, respectively, stand for the known conditions of the voxel being signal (T)or resting data/noise (F), whereas Y and N, respectively, stand for the conditions of thevoxel being declared active (Y) or inactive (N) through the statistical test.

The decision about a voxel’s condition is based upon the value of the test statistics variableX. This variable X is based on the post-processing algorithm and a function of the signalresponse X = f(ρ). The ROC curve used to measure the efficiency of the algorithm isa plot of P (Y |T ) against P (Y |F ) for different values of the variable X. P (Y |T ) is theconditional probability of declaring a voxel as active given that the response contains truesignal for the observed value of X. P (Y |F ) is the conditional probability of declaringa voxel as active given that the response contains resting data or noise for the observedvalue of X. The ROC curve runs from (0, 0) to (1, 1). To characterize the power ofa detection method to discriminate between active and inactive voxels we use the areaunder the ROC curve. The bigger this area, the better is the post-processing detectionalgorithm performance.

30

Page 31: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

4.6.2 Modified ROC (real human datasets)

If the condition of a voxel being signal or resting data is not known, the test statisticsvariable X cannot be tested like described in the upper section. The conventional ROCcurve cannot be obtained. Especially in the context of real human fMRI data we rarelyknow which voxels are truly signal (T).

P (Y |T ) and P (Y |F ) are denoted as true-positive fraction (TPF) and false-positive frac-tion (FPF) respectively. In the simulated case these two fractions are known or can beestimated. In the case of real human data sets it is possible to estimate FPF from realresting-state fMRI data. We have to register pure resting data of the subject in whomthe fMRI data is acquired. We can assume that this data is not related to activity, i.e. allvoxels are inactive. Thus FPF can be estimated for different values of the test statisticX. The fraction of the resting data declared active is called fraction of resting positives(FRP).

TPF cannot be estimated from real fMRI data since we do not know which voxels aretruly signal. Therefore we estimate the fraction of all voxels detected to be active fordifferent values of the test statistic. This will include both true signal and noise. Wecan thus obtain the modified ROC curve for real data by using the fraction of detectedactive voxels instead of the TPF. This fraction is called fraction of active positives (FAP).

The modified ROC curve is the plot of of FAP against FRP (have a look at the figures6.1, 6.2 or 6.6 in the Results chapter 6). The conventional and the modified ROC curvesare related to each other. Since we apply ROC to synthetic human data and modifiedROC to real human data this relationship will not be explained in detail here. For moredetails about this relationship see article [2].

31

Page 32: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

32

Page 33: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Chapter 5

Methods

The aim of this project is to evaluate and implement neural brain activity detectionmethods.

To evaluate the detection methods we can apply them on either synthetic test data or onreal human data. The advantage of test data is that we can decide the region, geometry,size and strength of the activity signal. There exist well developed and easy statisticalmethods to compare the different detection methods if we work with synthetic data. Inpractice however neural scientists have to work with real human data. Real noise leveland interference can never be exactly reproduced with a synthetic signal.

The detection methods and algorithms are programmed in Matlab for the evaluationtask. The data has to be transformed into an appropriate format.

A great job of evaluation of test data with Matlab functions has already be done [1].An overview of that work and results on synthetic data will be given in this and thefollowing chapter. In addition the methods used to evaluate the detection methods onreal data, in particular the CCA method, are presented within this chapter and the nextchapter.

SPM is a widely used Matlab-based software available for free. It uses GLM to detectneural brain activity. The idea is to implement the Matlab functions developed underthe evaluation task for CCA into SPM. SPM-users should be able to choose betweenthese two different detection methods.The data used under the Matlab evaluation hasto be adapted to SPM-format and the existing SPM code will be modified.

33

Page 34: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

5.1 Evaluation of neural activity detection methods

In the following sections the reader will find information about the human data sets usedto evaluate the performance of the detection methods on real fMRI data.

5.1.1 Brain data acquisition

The fMRI experiments were performed on an MR scanner at the University Hospital inLinkoping, Sweden. The used MR scanner is an GE Signa LX Echospeed Plus 1.5 Tesla.

Experimental setup

In the fMRI experiment performed for this thesis 120 image volumes are acquired witha sampling period TR of 4 seconds. The in-plane size of the EPI image slices is 64× 64pixels and a stack of 32 slices is acquired to create a volume. The slice thickness is 3 mm,the acquired matrix has the dimensions 64× 64× 32 voxels, the dimension of each voxelis 3× 3× 3 mm. During the experiment the test subject is instructed to perform a fingermotion task. He is told to move his right digit during 40 seconds (or 10 scans) and restduring the following 40 seconds (10 scans).

In addition a series of pure resting scans is registered to have null data. It is supposedthat there is no activity during those scans and all the signals within this data correspondto noise signals.

One file per brain slice scan is registered in a separate file. This is the raw fMRI dataavailable for the analysis.

5.1.2 Brain data handling

Regardless of which kind of data, synthetic or real data, pre-processed or not, we haveto transform it into the adequate format to handle it. In this thesis, three main formatsturn up:

• The raw data of the MR scanner. We have one data file per scanned brain slice andper time point. The data is in our case floating point data with big-endian byteordering.

• The *.mat data file used by the Matlab code. This data is an 4-dimensionalmatrix with the dimensions x× y × z × t.

• The *.img/*.hdr file data used by SPM. SPM uses the header and flat binary imagefile format of ANALYZE [7]. There is one data file per time point, i.e. one volumescan in each file. In our case the data is written in 32 bit floating point format.

In the code available on demand, the reader finds all the necessary Matlab functionsto transform the raw data of the MR scanner into the *.mat format of Matlab andthe *.img/*.hdr of SPM. To facilitate the task of creation *.img/*.hdr files, a slightlymodified version of the toolbox mri toolbox [] is used to agree with the specifications ofSPM.

34

Page 35: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

5.1.3 Implementation of the CCA method

This work is strongly related to the dissertation of Ola Friman [1]. Matlab code basedupon his dissertation was available. I adapted the code to the desired requirements.

An implementation of the CCA method into the existing software package of statisticalparametric mapping, called SPM, is one of the aims of this thesis. The SPM software isa suite of Matlab functions and subroutines with some externally compiled C routines[6]. Therefore the implementation of all functions in Matlab was retained to facilitatethe subsequent implementation of these functions in SPM.

Canonical correlation coefficient analysis (CCA) was not yet implemented in SPM. It isimportant to understand how CCA is implemented in Matlab to be able to implementit later in SPM. I will cover the important points of the work of Ola Friman [1] in thissection. There will be some repetitions, but they are important to be mentioned to keepthe integrity of this thesis.

Reasonable BOLD response models are needed as well as spatial filters for the CCAdetection method. The following sections shows how the temporal and spatial modellingare used to produce the correlation map.

5.1.4 Generation of a hemodynamic response model

The response of neurons in the brain due to a stimulus is not exactly known. We have tomake some simplifications to be able to simulate a feasible hemodynamic response. It isdesirable to use a linear model of the hemodynamic response. We construct this responsewith a set of temporal basis functions. We want to have a linear model that captures theimportant variations in the hemodynamic response with as few temporal basis functionsas possible to limit the cost of calculations and the risk of false positives.

Boxcar model

Figure 5.1: Boxcar response model

35

Page 36: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

The most trivial BOLD response model is a boxcar model. The boxcar model has onlyone temporal basis function. The parameters we need to know are the sampling frequency(in Hz) the number of points per interval of resting state and activity period, respectivelyas well as the number of such intervals of resting and work.

Impulse model

Figure 5.2: Convolutional response model

A more sophisticated model is the impulse model. Again, we have just one temporal basisfunction. We can model the process of neural activation as a convolutional hemodynamicresponse model. We model a impulse response whose parameters are adapted to thehemodynamic response (see chapter Theory 4.4). A convolution of the impulse responsewith the boxcar model gives us the impulse model.

PCA generated model

Figure 5.3: PCA generated response function using a difference of Gamma functions.The mean response and the first eigen-timecourse are displayed.

36

Page 37: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

To create a more realistic BOLD response model, we generate several samples of impulseresponses changing the parameters in a sophisticated way. For each parameter of thisconvoluting model there is a range of values resulting in physiologically realistic shapesof responses. If we take the Difference of Gamma probability density functions

g(t, c, τ1, τ2, δ1, δ2) =( t

τ1

)δ1· e−

δ1(t−τ1)τ1 − c ·

( t

τ2

)δ2· e−

δ2(t−τ2)τ2 (5.1)

we vary the parameters c, τ1, τ2, δ1 and δ2 randomly within these ranges and produce alarge number of plausible response shapes gi(t). The mean values of the parameters arechosen as c = 0.125, τ1 = 5.5, τ2 = 2τ1 + 5, δ1 = 6, δ2 = 14.5 [4].

A principal component analysis (PCA) applied to this set of BOLD responses gives us aset of orthogonal temporal basis functions. With those basis functions the hemodynamicresponse function can be reconstructed accurately with as few basis functions as possible.It was shown that it is normally sufficient to include the first eigen-timecourse in thesubspace model. This will result in two hemodynamic basis functions, a mean responsey1(t) = m(t) and the first eigen-timecourse y2(t) = e1(t) [1].

y(t) = wy1y1(t) + wy2y2(t) (5.2)

is the linear model for the hemodynamic response.

Constraints to the temporal modelling

For a temporal model with more than one basis function, an arbitrary choice of weightswould be able to produce an unrealistic BOLD response (see the examples in the grey zonein figure 5.4). It is possible to constrain the weights to give realistic shapes. We considerthe PCA generated response model with two basis functions y(t) = wy1y1(t)+wy2y2(t). Ify1(t) and y2(t) are normalized to unit energy, the mean response y1(t) is obviously moreimportant than the first eigen-timecourse y2(t). So wy1 must be significantly larger thanwy2 .

We will take the set of linear models generated to perform a PCA and make a leastsquares fit to plot them in a subspace spanned by y1(t) and y2(t).

As expected, the points lie around the mean response y1(t). y2(t) takes care of the smalldeviations. We can now make a change of variable trick so that the weights of a realisticresponse are all non-negative. The change of variables

y1(t) = y1(t) + αy2(t)

y2(t) = y1(t)− αy2(t)

defines the cone in figure 5.4. If we realize a response y(t) = wy1 y1(t) + wy2 y2(t) onlyrealistic shapes lying in the first quadrant are obtained by constraining to non-negativeweights. The parameter α ≥ 0 determines the angle of the cone, or equivalently howmuch weight we accord the eigen-timecourse y2(t) in relation to the main model shapey1(t).

37

Page 38: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Figure 5.4: a) shows different BOLD model shapes. Realistic shapes lie around the mainbasis function y1(t). The change of variable trick is applied. Now the weights can beconstrained to non-negative values giving realistic shapes lying in the first quadrant in b)

5.1.5 Spatial modelling

To improve the detection of active voxels, we can exploit the spatial dependence amongvoxels. In general we have no prior knowledge about the shape of the active region. Butit is more probable that a voxel is active if its neighbour shows activation too. The activebrain areas where a BOLD response can be observed have in general an extent of severalmillimeters, thus a few voxels. If we just consider the temporal behaviour of a voxel itis possible that isolated voxels are declared to be active because of noise interference orartefacts without presence of real activity at this voxel.

38

Page 39: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Traditionally a fixed Gaussian filter was used for smoothing the images in a pre-processingstep. This corresponds in the temporal model to use one single basis function as BOLDresponse model. If we have no information about the shape of the active region, it isrecommendable to use more than one basis function to be able to shape every plausibleregion.

We will show in this section some shapes and models of spatial basis functions. They arethe spatial counterpart to the temporal basis functions and used in the adaptive spatialfiltering of the fMRI images.

Single voxel model

The simplest model for a spatial area is a voxel analysed in isolation of its neighbourhood.This is the case if we assume that the active region is smaller than the size of a voxel.This model is the one used if no spatial pre-filtering is applied to the fMRI image.

Symmetric 3× 3 model

Figure 5.5: Symmetric 3× 3 model

We build the five symmetric basis functions of figure 5.5 for a symmetric 3× 3 model. Alinear combination of this basis functions can produce local activity patterns which aresymmetric around the centre voxel. The shapes produced by this combinations becomequite rough.

Scale adaptive model

Observations show that the spatial extent is the most obvious shape difference betweenactive brain areas. As for the temporal model, we can produce several Gaussian filtersby varying the shape parameter σ and apply a PCA to find a subset of basis functionsable to reproduce a active region. Figure 5.6 shows the mean basis filter function andthe first eigen-value basis filter found by PCA. This is an isotropic model.

It is also possible to apply a three dimensional Gaussian filter. As in the two dimensionalcase, we will apply a PCA to find a subset of spatial basis functions which account forthe variations around the average shape.

39

Page 40: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Figure 5.6: Scale adaptive model with a subset of two basis functions

Figure 5.7: 2D orientation adaptive model

Orientation adaptive model

In a general case the active regions have arbitrary orientations and can thus be capturedbetter if we can adapt our model shape to different orientations and not just to the spatialextent as in the scale adaptive model. For this reason we use steerable filters (see figure5.7).

The basis functions b2, b3 and b4 can be linearly combined so that the result is a rotatedbasis function. Added to the isotropic part b1 smooth anisotropic shapes can be created.

b(ξ1, xi2) = wx1b1(ξ1, xi2) + wx2b2(ξ1, xi2) + wx3b3(ξ1, xi2) + wx4b4(ξ1, xi2). (5.3)

We have the ability to form anisotropic shapes in different orientations by changing theweights of the basis functions. To construct corresponding three dimensional shapes inany orientation, seven basis functions are required.

The price to pay compared to the scale adaptive model is the larger number of basisfunctions.

Constraints to the spatial modelling

Just as in the temporal modelling case an arbitrary choice of weights wxiin the case of

linear subspace models can result in unrealistic activity patterns. We will therefore im-pose constraints on the weights wxi

to improve the detection performance. For example,the weight of the centre voxel basis function in the 3 × 3 model, the original Gaussianshape in the scale adaptive model or the central isotropic basis function in the orientation

40

Page 41: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

adaptive model has to be larger than for the remaining basis functions.

Again, we will use the change of variable trick presented in section 5.1.4 to be able to usenon-negativity constraints for emphasizing the importance of the main basis functions.

5.1.6 Generation of a correlation map

We have one or more temporal basis function y and one or more spatial filter basis func-tion. Now we need to put the pieces together. We want to examine a voxel time seriesfor neural activity.

In a first iteration the voxel time series neighbourhood is filtered with the spatial filterbasis function(s). We obtain time series x, one for each basic function. If we filter theneighbourhood in 2 dimensions and with an orientation adaptive model we obtain 4 newtime series. A 3 dimensional filtering with orientation adaptive filters results in 7 timeseries.

In a second iteration we try to find the best linear combination of these time series. Wecan simply apply a constrained CCA to the time series x and the temporal basis func-tions y to find the best linear combination weights wx and wy corresponding to the bestmatching spatial filter and hemodynamic response.

To gain computational speed and for a better utilization of the constraints we can applya 2-step method proposed in paper IV by Ola Friman [1]. First CCA is applied onthe oriented filters and the temporal basis function y using the change of variable trickon y. Then CCA is applied a second time to the resulting time series and the centralisotropic filter and the temporal basis function y. To give more importance to the centreneighbourhood currently under analysis a change of variable trick is not only applied tothe y variables but also to the x variables as follows:

x1(t) = xcenter(t),

x2(t) = xcenter(t) + xoriented(t).

x1(t) and x2(t) are combined in the second step with positive regression coefficients togive reasonable adaptive filter shapes. The possibilities offered by the constrained CCAare exploited in a better way compared to the direct one step procedure and computa-tional speed is gained.

At the end the correlation coefficient ρ between x and y is calculated for every voxel timeseries as described in chapter Theory 4.2.1. The coefficients ρ for every voxel gives thecorrelation map of the constrained CCA technique.

41

Page 42: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

5.1.7 Noise filtering

The BOLD response is not the only signal present in the voxel time series. It is hardto determine which kind of noise is overlaid to the signal. Drifts can simply be removedby detrending the signal. We remove a continuous, piecewise linear trend of every voxeltime series after having applied the spatial basis filters.

Effects of heart beat or respiration movements are not taken into account. It would bedifficult to filter and remove them. They can cover the same frequency band as the BOLDresponse. We consider them just as noise. The signals of the experiments carried outfor this project have a frequency of 1.3 bpm (bpm = beats per minute). We have thefollowing values:

Cardiac signals : 60-80 bpmRespiratory signals : 15-20 bpm

BOLD response : 1-2 bpm (data set of this project)

I.e. For the experiments carried out for this project there is no risk that the BOLD re-sponse signal takes the same frequency as respiration movements or even as heart beating.But in the future or for other projects, if TR can be reduced and thus the frequency of theBOLD response signal can rise, the risk of wrong signal detection should be kept in mind.

It can never be excluded that the test person is involuntary moving other parts of thebody or thinking. This causes activation of other regions than the executed experimentis supposed to activate. We have to admit that such involuntary activation may causeuncorrelated hemodynamic responses to the desired and tested response function.

5.1.8 Statistics

The test statistics variable X are the correlation coefficients ρ acquired by one of thepost-processing algorithms, either the GLM method or the canonical CCA method.

ROC for synthetic datasets

The conventional ROC method requires knowledge about the distribution of true signaland resting state or noise. In the case of synthetic pseudo-human fMRI data, the dataset consists of active regions as well as regions with resting state data. The locations ofthe regions presenting active signal are known.

The conventional ROC method can be applied to measure the efficiency of applied mul-tivariate post-processing algorithms to synthetic data sets. We can estimate TPF andFPF by calculating the number of voxels detected to be active correctly and incorrectly,respectively. We can than plot TPF against FPF to obtain the ROC curve.

Modified ROC for real human data sets

If we have real human data, the conventional ROC method cannot be applied. The loca-tion of the active voxels is not known in advance. Thus we will apply the modified ROC

42

Page 43: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

method if we deal with real human data sets.

To estimate the fraction of resting positives (FRP) a pure resting state data set of thesubject is needed. The subject has to refrain from any activity during the registration ofthe resting-state fMRI data. The detection algorithm is then applied with the same para-meters to the resting-state data as well as to the real data set in which activity is expected.

We will apply constrained CCA to the resting-state data and to the real human datacoming from an experiment to produce the correlation map, i.e. calculate the correlationcoefficients ρ. The modified ROC curve is built with this data. The efficiency of adetection method is measured by the area under the modified ROC curve. The biggerthis area, the better the detection method.

5.1.9 Matlab GUI

To compare and evaluate the different options to calculate correlation maps with CCA, Ideveloped a small Matlab GUI. In addition the creation of a Matlab GUI was a goodexercise for the later implementation in SPM and understanding of Matlab GUI’s (seefigure 5.8).

Figure 5.8: Main Window of the Matlab GUI

The GUI is written to for the comparison of the detection methods. The user selectsthe fMRI images to work with (in *.mat format, see Appendix B). Then he choosesthe spatial filter to apply as well as the hemodynamic response function to fulfil theconstrained CCA. The correlation map is calculated with CCA and saved. In a last stepthe results (correlation map) can be displayed and compared to other correlation mapswith modified ROC. The analysis can also be made with GLM and the correspondingmap is saved as well.

43

Page 44: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

5.2 SPM implementation

One goal of this project was to implement the CCA methods into the statistical pa-rameter mapping (SPM) described in chapter 3. Since we try to implement new codeand functionalities into existing and well working code the following working steps arenecessary.

1. Read and understand how the code is built.

2. Learn how the existing functionalities work by testing some examples.

3. Adapt the image format to SPM image format.

4. Decide how to include the CCA methods.

5. Write the new code and new functions.

6. Test the new functionalities. (Chapter results 6)

5.2.1 Structure of SPM software

SPM code is mainly written as Matlab code. GUI interfaces are constructed in orderto give a more user friendly application. There exist two main functionalities. A first oneto analyse PET and SPECT images, a second one for fMRI time-series images. We limitour studies to the second part for analyzing fMRI time-series.

fMRI time-series

The user interface to analyse fMRI time-series consists of tree main windows.

• A SPM menu window with buttons to choose the operations to handle the data.

• A SPM interactive window with input/output handling between the user and thefunctions.

• A SPM graphics window to show the results of the applied functions to the fMRIdata.

Architecture

All the generated and needed analysis variables and parameters are saved within a specialstructure. SPM2 sets up a single structure (SPM.mat) at the beginning of each analysis.As the analysis proceeds, sub-fields are filled in. The key fields important to our appli-cation are (for more details see [6]):

SPM.xY : Data structureSPM.nscan : Vector of scans per sessionSPM.xBF : Basis function structureSPM.xX : Design matrix structure

44

Page 45: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

To implement constrained CCA we need to build a new SPM structure

SPM.xCCA : CCA design structure.

5.2.2 Testing SPM2 code

A ordinary treatment of data with SPM consists of the following three steps:

1. Spatial pre-processingThe data is registered, warped and smoothed.

2. Estimation of model parametersThe GLM model parameters are estimated. The user has different options howthese parameters should be estimated.

3. SPMStatistical parameter mapping. The maximum intensity projection (MIP) can bedisplayed and the models used can be visualized.

SPM is a quite advanced software, therefore a lot of options are available within all of thisthree steps. It is left to the user which of the options he needs for his analysis purposeand which are redundant.

5.2.3 Integration of CCA methods

To include the CCA methods into the existing SPM software area we have to determinesome requirements.

• The CCA method is used in the context of fMRI analysis. It will be a part of thefMRI structure of SPM.

• The existing functionalities have to work as supplied before. No changes will bemade to the existing functionalities.

• If one wishes to work with the CCA methods it should be easy to access to the newcode. We will write a toolbox to overload some SPM functions and add new SPMfunctions performing the constrained CCA task.

• The architecture has to be conserved as well as possible. A lot of variables of SPMare not needed by the CCA method. The structure (SPM.mat) should still containas many as possible of the variables in order to fulfil the ordinary SPM functions.

SPM code compatible with those requirements was implemented. The functionalities ofthe new code are presented in chapter 6 and a guideline is given in the appendix.

45

Page 46: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

46

Page 47: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Chapter 6

Results

In this chapter we will show how the methods described in chapter Methods 5 work.

6.1 Some important values

The fMRI data from the right hand finger tapping experiment with isotropic voxel sizeis used for all of the comparisons and tests in this chapter. Some important values andcharacteristics of the used fMRI are mentioned below:

TR = 4 [s]data matrix = 64× 64× 32 [voxels]

voxel size = 3× 3× 3 [mm]t = 120 [scans]

duration of onsets = 10 [scans]vector of onsets = [6 26 46 66 86 106]

For the constrained CCA analysis in SPM a correlation threshold of 0.55 was used todisplay the correlation maps.

6.2 Evaluation on synthetic data

As mentioned in the Methods chapter 5, Ola Friman already evaluated the CCA methodon synthetic data in his work and papers. In this work his basic results are used andcompleted with the results on real human data.

6.2.1 Related work

The GLM approach to detect neural brain activity is equivalent to an unconstrained CCAwith just one spatial basis filter. By applying CCA, this approach is generalized and aug-mented with the use several spatial basis functions to improve the detection performance.The spatial filter basis functions are the spatial counterpart of the use of temporal basisfunctions for modeling the hemodynamic response.

47

Page 48: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

It has been shown that the following models can improve the neural brain activity detec-tion results [1].

PCA generated BOLD response model

The better the model for a hemodynamic response function matches the the BOLDresponse function, so much the better is the efficiency to find activity in a voxel time-series.The commonly used model is a convolution between a binary reference function (boxcarmodel) and an impulse response consisting of a difference of two Gamma functions. IfPCA is applied to a sample set of randomly generated responses with parameter valueschosen within reasonable ranges it is possible to obtain well fitting linear model shapes.It has been shown that the first principal component accounts for about 80% of thevariations, therefore a model consisting of two basis function, y1(t) the average responseand y2(t) the first principal eigen-response is adequate. If we make the change of variabletrick, the weights giving realistic response shapes are non-negative and can be found byconstrained CCA.

Steerable spatial filters

Steerable filters can adapt to both orientation and size of an active brain area. Compar-isons on synthetic test data show that the detection of all kind of active region geometriesare superior if we use steerable spatial filters instead of scale adaptive or other simplespatial filters.

Constrained analysis

The results of CCA using constrained and unconstrained regression weights show thatthe constrained analysis with adaptive filters gives more distinct correlation maps withbetter contrasts. Without constraints the number of active voxels detected is bigger dueto the large freedom in constructing suitable filters. It was shown that the non-negativityconstraints can suppress the correlation levels in non-active areas and improve specificity.

3D spatial filtering

3D filtering improves the possibilities to detect active areas. However the price to pay isan increase of computation time.

6.3 Evaluation on real human data

In the following sections the results of the same techniques applied to real human dataare shown. The performance of the detection methods and techniques are measured usingthe modified ROC method. The correlation maps have been generated using SPM withthe new CCA code added.

48

Page 49: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Figure 6.1: Modified ROC curve of scale versus orientation adaptive filters

6.3.1 Steerable spatial filters

We will show the advantage of using orientation adaptive filters compared to scale adap-tive or even fixed spatial filters. Steerable basis filters are used to adapt the size andorientation of the active brain area. By generating the modified ROC curve of figure6.1 we see how the orientation adaptive filters are more specific in detecting active brainareas compared to an scale adaptive model.

6.3.2 Constrained CCA

Non-negativity constraints are added to the hemodynamic model as well as to the spatialfilter model to avoid unrealistic model shapes. The α-value for the change of variable hasbeen set to ±0.4. The constraints on the spatial filter model are automatically calculatedby SPM.

As for the synthetic data the modified ROC curve of figure 6.2 clearly shows the improvedspecificity of detecting active voxels in fMRI data.

49

Page 50: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Figure 6.2: Modified ROC curve of constrained versus unconstrained CCA

6.4 Implementation in SPM

For a detailed guideline to use SPM for functional MRI images the reader is referred tothe Appendix A of this report.

6.4.1 New SPM code for CCA

A number of new SPM functions had to be written and implemented in the existing SPMcode. They are available as a toolbox. The spm function has to be overwritten and theother functions are added to the existing code. An overview of the new SPM functionsis now given:

spm Startup function of SPM. Slightly different function to over-load.

spm cca The equivalent to spm spm of SPM code. Sets up the structurefor the CCA method.

spm get sf Gets the spatial filtering structure for CCA analysis.spm gen corrmap Generates the correlation map of the CCA method to find

activated regions.spm results cca ui Sets up the results display graphical interface for CCA.

spm getSPM cca Gets the SPM structure specified to CCA.spm graph cca Graphical display of adjusted CCA data.

Some of the functions are now explained in more details.

50

Page 51: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

spm

Due to the implementation of the CCA functionalities two additional buttons appear inthe SPM menu window: Estimate CCA and Results CCA. To execute a neural brainactivity detection with CCA, the following basic steps have to be carried out:

• As supplied before the user chooses the BOLD response model and the fMRI datawith the button fMRI.

• The button Estimate CCA launches the calculation of a correlation map using thecanonical correlation algorithm. The user can chose the spatial filter he wants toapply on the brain volume images.

• The button Results CCA launches the display of the correlation map. The user canchoose voxels out of the correlation map to indicate the regional response and theused BOLD model response at this voxel.

spm cca

The function spm cca sets up the models for the constraint CCA method, i.e. the usercan choose the model for the spatial filtering (spm get sf) and the constraining valueα for the BOLD response model. Then the correlation map is calculated slice by slicespm gen corrmap as explained in the chapters Theory 4.2 and Methods 5.1.3.

In SPM, the user has to determine the constraining value α for the change of variabletrick. The structure of the BOLD response model in SPM is really complex. It exceeds thepossibilities of this thesis to implement a PCA generated BOLD model and an automaticchange of variable.

spm results cca ui

This function is launched by the button Results CCA in the SPM menu window. TheSPM structure is loaded with spm getSPM cca. The user can choose a title for the cor-relation map, i.e. the maximum intensity projection (MIP). In addition a threshold canbe assigned to plot just the MIP values greater than the threshold value.

As supplied in the original SPM code the user can choose a voxel of the MIP graph toplot the the adjusted CCA data spm graph cca or the BOLD response model used forthe CCA calculations.

51

Page 52: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

6.4.2 New SPM architecture

Some new fields (in boldface) have been added to the SPM structure in order to be ableto implement constrained CCA. Here the most important structure fields are mentioned.

SPM.xX.X paradigm (BOLD model).amin lower α-value for non-negativity constraint.amax lower α-value for non-negativity constraint

SPM.xY.RT time to repeat (interscan interval).VY structure of fMRI data.P datapaths (fMRI data)

SPM.xCCA.SF filter structure.Vcm correlation map structure.cm correlation map data.VM mask structure.mask mask data

6.4.3 New functionalities

All of the presented new functions enable the user to apply the constrained CCA techniqueto the fMRI data using SPM. In this section the new functionalities of SPM are presented.

• The user can chose between scale or orientation adaptive filter models to improvethe neural brain activity detection efficiency.

• The BOLD response model is generated as supplied before by SPM2. This signifiesthat the user cannot generate the hemodynamic response function with PCA. Thechange of variable trick is also not applied automatically. Nevertheless the user hasthe possibility to constrain the temporal model by entering the change of variablesvalue α himself.

• The correlation map with the ρ values can be displayed as shown in figure 6.3.For real human data a threshold of ρ = 0.55 is generally chosen. The resultsshow however that even a higher threshold can be chosen since high correlationcoefficients are achieved by the constrained CCA technique.

• At any voxel of the MIP plot the corresponding time-series and the fitted responsemodel function can be displayed (see figure 6.4).

• The active region can be overlaid to a selected volume scan to visualize the activeregion (see figures 6.5 and A.5).

6.4.4 Evaluation in SPM: GLM versus constrained CCA

Up to now we just analysed the different options we have to apply CCA techniques tothe fMRI data. Nevertheless, we should also have a look on the results of a constrainedCCA analysis in SPM compared to a GLM analysis in SPM as supplied before. We canshow that the simple implementation of CCA into SPM gives promising results.

52

Page 53: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Figure 6.3: Graphical window of SPM displaying a correlation map

We analysed the real human data once applying the standard GLM methods of SPM,another time constrained CCA. For both techniques the same hemodynamic responsefunction model with time derivatives was chosen. For CCA it was constrained withα = ±0.4. The spatial filter model used for CCA is a two dimensional anisotropic filterwith a size of 5 voxels. The modified ROC curve of figure 6.6 shows that the constrainedCCA is more efficient to detect active brain voxels.

53

Page 54: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Figure 6.4: Fitted responses at voxel with maximum correlation value

Figure 6.5: Overlay of the correlation map to slices

54

Page 55: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Figure 6.6: SPM analysis using GLM versus constrained CCA

55

Page 56: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

56

Page 57: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Chapter 7

Discussion

It is always preferable to work with simple models and methods with good performancesand computational efficiency. In the field of analysis of functional MRI data, the widelyused GLM method has such properties. This project shows that the constrained CCAmethod is an analysing technique with even better properties. Spatial geometry of theactive brain area is respected, unrealistic model shapes are rejected and the computa-tional time stays within acceptable limits.

Even if there exist a large number of neural activity detection methods, GLM is the mostcommonly used one in practice. The software tool SPM is also GLM based. CCA is infact a natural extension of the GLM technique. GLM can be considered as an uncon-strained CCA with just one spatial basis filter, usually a Gaussian smoothing filter. Theimplementation of constrained CCA was the second part of this thesis.

The new functionalities of SPM added during this diploma thesis are presented in theResults chapter. A constrained CCA analysis with SPM takes more computational timebut the increased efficiency of this neural brain activity method over GLM is significant.

Research and development is not a one man’s work. There are certainly a lot of desirableamelioration in the implementation of CCA to SPM. I can just mention the points Iconsider to be nice being implemented in the future. People working and using SPMevery day have to decide if the functionalities provided at the moment are sufficient orhow they can be improved. Computer scientists are needed to improve the quality ofmy code (I admit at this point that my programmatical skills are presumably not goodenough to be up to SPM standard). The PCA generated temporal response model is notimplemented yet. The constraints on the hemodynamic model can be automatised in thesame step.

57

Page 58: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

58

Page 59: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Chapter 8

Conclusion

The neural activity detection method based on constrained Canonical Correlation Analy-sis (CCA) has been presented and was tested on real human fMRI data. It has been shownthat this method is an extension of the General Linear Model (GLM) analysis techniquewidely used to find neural activity in fMRI time series. It has been shown how realistictemporal basis functions as well as spatial filter basis functions can be constructed toimprove the efficiency of the CCA technique. For testing the efficiency of fMRI detec-tion methods applied on real human data, a modified Receiver Operating Characteristic(ROC) method has been presented. In the results chapter it has been shown how allthese concepts improve the neural brain activity detection performance.

The implementation of these novel parts into the Statistical Parameter Mapping (SPM)software has been presented. The new features introduced for the constrained CCA havebeen illustrated and tested.

59

Page 60: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

60

Page 61: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Acknowledgements

I would like to thank my supervisors Prof. Hans Knutsson from the Institute of Tech-nology in Linkoping and Prof. Jean-Philippe Thiran from the Swiss Federal Institute ofTechnology in Lausanne to give me the chance to write my diploma thesis as an exchangestudent in Sweden. It was a great experience. I thank my assistant Joakim Rydell forhis support. A special thank goes to my parents, Ursula and Peter, and my two sisters,Anita and Laura, for their encouragement from afar.

Sabina BreitenmoserLinkoping, 21 February 2005

61

Page 62: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

62

Page 63: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Bibliography

[1] Ola Friman, Adaptive Analysis of Functional MRI Data, Dissertation No. 836 atDepartment of Biomedical Engineering, Linkoping University, Sweden 2003

[2] Rajesh R. Nandy, Dietmar Cordes, Novel ROC-Type Method for Testing the Effi-ciency of Multivariate Statistical Methods in fMRI, Paper, Magnetic Resonance inMedicine 49:1152-1162, 2003

[3] Shubhabrata Das, Pranab Kumar Sen, Restricted Canonical Correlations, LinearAlgebra and its Applications, 210:29-47, 1994

[4] R. Buxton, E. Wong and L. Frank, Dynamics of blood flow and oxygenationchanges during brain acivation: the Baloon model., Magnetic Resonance in Medi-cine, 39(6):855-864, 1998

[5] Logiciel Matlab: www.mathworks.com

[6] Code for SPM2 environment: www.fil.ion.ucl.ac.uk/spm/

[7] ANALYZE-7, Mayo Clinic, Rochester, USA: www.mayo.edu/bir

[8] ANALYZE file format: www.mayo.edu/bir/analyze/AnalyzeFileInfo.html

[9] Dilcher, Venator, Dilcher, Handbuch der Kernspintomographie, Edwin Ferger Verlag

63

Page 64: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

64

Page 65: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Appendix A

Guideline to use SPM for fMRI

A.1 Getting started

To start up from Matlab, type spm. Select fMRI time-series or type spm fmri in theMatlab command window.

Important: The directory from which SPM is started becomes the SPM working di-rectory with a structure output file SPM.mat. If a new analysis is made in the samedirectory there is a risk to overwrite the previous analysis saved in SPM.mat!

A.2 The SPM menu window

The following spatial pre-processing functions are available in the SPM menu (moredetails see [6]):

• RealignRealignment of chosen functional time series scans to a reference scan. Removesmovement artifacts.

• Coregister : not used for CCACoregistration of same modality and multi modality image volumes.

• Slice timingAdjustment for timing differences in multi slice image acquisition (fMRI). The dif-ferences in acquisition time between slices during sequential imaging (as in echoplanar imaging) is corrected. It is especially relevant for event related designs!This step has to be performed before normalisation.

• Normalize3D spatial normalisation of image volumes to a template image (standard space).

• Smooth : do NOT use for CCA3D convolution of image volume with an isotropic Gaussian kernel as a pre-processingstep to GLM.

65

Page 66: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

• Segment : not used for CCASegmentation of MRI volume(s) into CSF, grey and white matter.

The model specification and parameter estimation modalities are:

• Basic modelsBasic statistical models set up for independent data.

• fMRISet up of modality specific models. The user specifies the hemodynamic responseand selects the scans to work with.

• Review designReview a previously specified model.

• EstimateEstimation of a previously specified model and configuration with GLM.

• Estimate CCA: NEWSet up of CCA specific model. The user specifies the spatial filtering model. Calcu-lation of the correlation map with the previously specified model and configurationwith CCA.

The statistical inference utilities are:

• ResultsAnalysis and display of results of the statistical analysis (MIP, correlation map).

• Results CCA: NEWThe same as Results but for the CCA model.

The lower panel includes miscellaneous and general utility functions.

66

Page 67: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

A.3 A canonical correlation analysis with SPM

An example of analyzing data and finding neural brain activity using CCA for fMRI datais shown. The user has to adapt the specifications to his case. This example is adaptedto the data sets used during this project and the values and parameter options are onepossible analysis.

• Data handlingTransform the data to the appropriate SPM image data format (*.img/*.hdr) ofANALYZE.

• Spatial pre-processingPerform all the necessary spatial pre-processing modalities.

Our data was already compensated for slice timing. Therefore we limited the spacialpre-processing step to a normalisation of the image volume to the EPI templateimage.

With Realign we create a image of mean voxel values for the normalisation step.

The EPI template image is a part of the SPM2 software.

The *.img/*.hdr files of the normalised images are saved with the prefix w*.img/w*.hdr.For the subsequent analysis, these normalised images are used.

• Model specificationSpecify the temporal basis function model as well as the spatial basis filter functionsto perform a constrained CCA calculation. Generate the correlation map. The stepby step procedure is shown below.

The hemodynamic response function model is displayed in the SPM graphics win-dow (see figure A.1).

All the functionalities of fMRI are supplied as in SPM2.

• Results CCADisplay the correlation map and the active regions found. Again, the step by stepprocedure is showed below.

In the interactive window of figure A.3 the user can press the plot button to displaythe fitted response model at the selected voxel (in our case the global maxima atx = −44, y = −50 and z = 50. As you can see, the global maxima is at a valueρ = 0.90. This is a quite high correlation coefficient.

In the interactive window of figure A.3 we have the possibility to overlay the corre-lation map to a brain volume (see figure A.5).

67

Page 68: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

fMRI: designFirst, the hemodynamic re-sponse function model is speci-fied. In a second step we assignthe data set to analyze.

Choose the design mode. Youwill be asked to enter the fol-lowing basic parameters. Wehave an interscan interval TRof 4[s] and 120 scanned timepoints. Our design is specifiedin scans.

The next step is to select thehemodynamic basis function.

For a hemodynamic responsefunction you will be asked tochoose if you wish Volterramodel interactions (our choice:no).

Now the trial specification hasto be made. We have one ses-sion and one trial. The vec-tor of onsets are the scannedtime points on which an activ-ity period starts. You will alsospecify the duration of such anactivity period in scans. Wedo not choose any paramet-ric modulation neither other re-gressors.

68

Page 69: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Figure A.1: Temporal basis filter model

fMRI: dataNow we will perform the secondstep to specify the data.

The user is asked to choose theSPM.mat file generated by thefirst step and select the *.imgdata files.

Than he has some options. Wewill not remove Global effects,use no high-pass filter and donot correct for serial correla-tions.

69

Page 70: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Estimate CCA : NEW func-tionalityAdd constraints to the hemo-dynamic model if needed andspecify the spatial basis filterfunction and calculate the cor-relation map.First, the user has to select theSPM.mat file. In this structurethe information about the tem-poral basis function model andthe data to analyze is saved.Than he can select a spatial fil-ter design.

For some of the spatial filters itis necessary to specify the filtersize in voxels.

In the case of two tempo-ral basis functions the user isasked to constrain his temporalmodel.

The value α for the changeof variable trick for the non-negativity constraints have tobe entered manually.Now the system calculates thecorrelation map with the cho-sen model. This takes sometime. The progression is dis-played both in the SPM inter-active window as well as in theMatlab command window.

70

Page 71: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Results CCA:The user is asked to enter a ti-tle for the analysis he made. Inaddition he can chose a thresh-old. All correlation values big-ger than the threshold are dis-played in an MIP graph (seefigure A.2). The red cursor canbe placed with a right click ofthe mouse on the global max-ima for example.

Figure A.2: MIP display of a correlation map

71

Page 72: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Figure A.3: Interactive window

We will plot the fitted responseagainst scans which gives theresult of figure A.4.

72

Page 73: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Figure A.4: Graphical display of the fitted response and the chosen voxel time-series

Figure A.5: Overlay of the correlation map to a section

73

Page 74: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

74

Page 75: Evaluation and implementation of neural brain activity ...20344/FULLTEXT01.pdf · Evaluation and implementation of neural brain ... Evalutation and implementation of neural brain

Appendix B

Data handling

Functions available in Matlab code:

• write data fmri2mat

Transforms and writes raw data of the MR scanner into an *.mat data file.

• write data fmri2img

Transforms the raw data of the MR scanner into *.img data files according to SPM.

• write data mat2img

Transforms the *.mat data file into *.img data files according to SPM.

• write data img2mat

Loads any *.img file as a *.mat matrix into Matlab.

• write hdr

Creates and writes *.hdr data files corresponding to the *.img files. The functionsaspm hdr make and aspm hdr write are used.

The SPM *.hdr file has one important difference to the *.hdr file generated by mri toolbox.The field hdr.hist.originator (denomination in SPM: hdr.hist.origin) is a vector of 5 int16numbers. In the functions mentioned below, this field has been changed and adapted toSPM. Therefore their name has been changed compared to the mri toolbox name.

• aspm hdr make

Creates Analyze format data header according to SPM.

• aspm hdr write

Writes Analyze header file according to SPM.

• aspm hdr read

Reads Analyze format data header according to SPM.

75