Neuroinformatics Tools for Functional MRI: Experimental Design and Data Analysis

Krishna P. Miyapuram1, V. S. Chandrasekhar Pammi2, Ahmed3, Raju S. Bapi3,4 

1.       Department of Physiology, Development and Neuroscience, University of Cambridge, Cambridge, UK

2.       Department of Psychiatry and Behavioral Sciences, Emory University School of Medicine, Atlanta, USA

3.       Department of Computer and Information Sciences, University of Hyderabad, Gachibowli, Hyderabad 500 046, India

4.       Centre for Cognitive Science, University of Hyderabad, Gachibowli, Hyderabad 500 046, India





2.1 General Taxonomy of Experimental Design.. 4

2.2 Block and Event-related Designs. 5


3.1 Preprocessing.. 6

3.2 Statistical Analysis. 7


4.1 Experiment Stimulus Delivery. 7

4.2 Data Format 8

4.3 Data Analysis. 9

4.4 Visualization.. 9

4.5 Databases and Meta Analysis. 10


References. 11



Neuroimaging in vivo is becoming popular from the last two decades. The primary quest of neuroimaging is to better-understanding the functions of various brain areas pertaining to various cognitive processes of interest. Though there are several neuroimaging techniques available currently, the functional Magnetic Resonance Imaging (fMRI) is playing an important role in the field of Imaging Neuroscience. In this paper an introduction to fMRI, the issues related to experimental design and analysis will be presented. This paper also discusses some of the neuroinformatics tools available for fMRI research.

Key Words: fMRI, Experimental design, Statistical Parametric Mapping


The functional Magnetic Resonance Imaging (fMRI) is a powerful imaging tool that can be used to perform brain activation studies non-invasively in vivo while subjects are engaged in meaningful behavioural tasks. The resulting activation of the brain indirectly depends on blood-oxygen-level-dependent (BOLD) signal (Ogawa et al., 1990).

Before the emergence of fMRI, radioiostope based techniques, such as positron emission tomography (PET) which measures regional cerebral blood flow (rCBF), were widely used for mapping the brain function. However, these techniques are invasive and have a low spatial and temporal resolution. Electroencephalography (EEG) which records the electrical activity of nerve cells in the human brain by measuring electrical potential on the scalp is also another widely used experimental technique in neuroscience. Magnetoencephalography (MEG) is another non-invasive technique which is becoming popular now-a-days. MEG measures the weak magnetic fields generated above the scalp by current flow in the brain. This technique directly measures the neuronal activity. EEG and MEG techniques though they probe brain activity at very finer temporal resolutions, their spatial resolutions are very poor.

The fMRI provides a non-invasive method to access indirectly neuronal activity in the brain, by measuring the haemodynamic metabolic signal i.e., blood-oxygen-level-dependant (BOLD) signal. Effects of blood oxygen on the apparent transverse relaxation time (T2*) were reported by Ogawa and colleagues (Ogawa et al., 1992). Increased neuronal activity in a brain area leads to an increase in localized cerebral blood flow, blood volume, and blood oxygenation. The BOLD fMRI techniques are designed to measure primarily, changes in the inhomogeneity of the magnetic field that result from changes in blood oxygenation. Deoxyhaemoglobin is paramagnetic and introduces an inhomogeneity into the nearby magnetic field, while oxyhaemoglobin is weakly diamagnetic and has little effect. Hence, a decrease in deoxyhaemoglobin would cause an increase in image intensity [refer to Hornak (2002) for more details of fMRI Physics]. fMRI is well suited to measuring the dynamic changes in brain activity induced by tasks that involve learning as it provides a reasonable spatial and temporal resolution compared to other neuroimaging techniques such as positron emission tomography [refer to Cohen and Bookheimer (1994); Volkow et al. (1997)].

After more than a decade of fMRI research, there is still much to learn about how neuronal activity, haemodynamics and fMRI signals are interrelated (Heeger and Ress, 2002). A recent review of Ugurbil et al. (2003) suggested the possibility of obtaining spatially accurate and quantitative data on brain function from magnetic resonance technologies. Recently Chein and Schneider (2003); Culham (2005) pointed out that there is a growing scientific and clinical community using fMRI and the neuroimaging publications continue to increase exponentially.


Developing successful fMRI experiments requires careful attention to experimental design, data acquisition techniques, and data analysis. The experimental design is at the heart of any cognitive neuroscience investigation. In this paper we present a brief review of various issues related to the experimental design.

An fMRI experiment to test a given psychological hypothesis must be designed within the constraints of the temporal characteristics of the fMRI BOLD signal and of the various confounding effects to which fMRI signal is susceptible. The most important consideration is the actual design of the experiment. In conducting a hypothesis-based experiment, we wish to be able to attribute any observed effects to experimentally manipulated conditions. This can be guaranteed only if conditions are randomly allocated to a presentation order for each subject in a sensible manner. Further, this randomization should be appropriately balanced, both across and within subjects. With such random allocation of conditions, any unexpected effects are randomly scattered between the conditions, and therefore do not affect the designed effects.

2.1 General Taxonomy of Experimental Design

Overall, designs can be classified into three types i.e., categorical, factorial or parametric (Friston, 1997). The categorical designs assume that the cognitive processes can be dissected into sub-cognitive processes. That is one can remove and add different cognitive processes by the assumption of pure insertion. The categorical designs are further divided into subtraction type or conjunction type. Cognitive subtraction designs are used to test the hypothesis pertaining to activation in one task as compared to that in another task considering the fact that the neural structures supporting cognitive and behavioural processes combine in a simple additive manner. Whereas in the cognitive conjunctions type designs, several hypotheses are tested, asking whether all the activations in a series of task pairs, are jointly significant. Factorial designs involve combining two or more factors within a task and looking at the effect of one factor on the response to other factor. In parametric designs, rather than assuming that the cognitive processes are composed of different cognitive components, they are considered as belonging to different psychological dimensions. The systematic changes in the brain responses according to some performance attributes of task can be investigated in parametric designs. In parametric designs one can also look at the linear and non-linear types of relations to be determined emperically.

2.2 Block and Event-related Designs

The experimental designs are broadly classified into two classes i.e., blocked (epoch) designs and event-related designs. The properties of haemodynamic response function (i.e., the transfer function mapping neuronal activity onto BOLD signal) play an important role in the design of experiments (Friston, 1998). Typically the task condition in the blocked designs is performed for an extended period that is more than the haemodynamic response (HR) time. Some of the advantages of blocked designs are that they normally give reasonably significant areas of activation and they are comparatively easy to analyze. On the other hand, the event-related designs (sometimes called trial-based or single-trial designs) aim to characterize transient changes in fMRI signal that emanate as the consequence of individual trials either separated in time or spaced closely together in time (Culham, 2005). Some of the advantages of using event-related designs are: (1) allow random intermixing of the trials, (2) they are useful in characterizing the temporal dynamics of brain activation, (3) allow separation of sub-processes within multi-componential trials, (4) may facilitate separation of HR signals from artifactual events etc. Thus the blocked designs are special case of event-related designs and each has its own advantages and disadvantages. In a recent investigation by Friston's group (Mechelli et al., 2003), comparison between these two design methodologies was presented taking a case study. Selection of experimental design should be based on the particular research question of interest.


3.1 Preprocessing

Prior to statistical analysis, functional MRI data needs to be preprocessed so that images are registered to each other (within and between subjects). These steps typically involve correction for head movements, and normalizing to a stereotaxic space using a standard brain template. In functional imaging, the signal changes corresponding to any haemodynamic response can be small compared to the signal changes that can result from subject motion. So, prior to performing the statistical tests, it is important that the images are as closely aligned as possible. This step is referred to as realignment or motion correction process. In addition to image registration within subjects during the realignment process, images also need to be registerred across subjects. This is done in order to account for variation in brain sizes of different subjects and is achieved by normalization or warping into a standard template space. The Talairach and Tournoux (1998) template or a more representative template of the population provided by Montreal Neurological Institute is often used for this purpose. Normalization would also help standardization of reporting the co-ordinates of the brain space across different studies. The fMRI images collected during the course of an experiment are of low resolution compared to a structural image that clearly identifies the structural properties of the brain. Prior to normalization, the structural image and functional images are coregistered with each other. This step finds the transformation that maps the structural image into the space of the functional images. Now, the structural image can be used to find the normalization parameters to achieve a precise spatial normalization. The normalized functional images can then be spatially smoothed. The purpose of spatial smoothing is to cope with functional anatomical variability that is not compensated by spatial normalization and to improve the signal to noise ratio. A Gaussian kernel (typically with an isotropic 6 to 8 mm full width at half maximum) is used during the process of smoothing for validating any Gaussianity assumptions in the statistical analysis fMRI data.

3.2 Statistical Analysis

There are broadly two ways of analyzing fMRI data: 1) model driven and 2) data driven. Model driven methods depend on some hypothesis of the data that are usually tested within the framework of a general linear model (GLM). To measure the magnitude of the BOLD signal that is task-specific, neuroimaging data at each voxel are modeled as a linear combination of explanatory variables plus a residual error term. The explanatory variables model the design of the experiment, and it is possible to incorporate noise due to measurement such as head movements in the form of a design matrix. Other noise components include physiological factors such as respiration and heart beating etc. As the BOLD signal does not measure the neuronal activity, the experimental effects of interest are convolved with a canonical haemodynamic response function. In order to account for variations in the HRF, its temporal and dispersion derivatives could be included in the design matrix. Thus each voxel is analyzed separately to generate a test statistic (parameterized value) in a massively univariate fashion. The end result is a parametric map that condenses information from a number of individual scans into a single image volume that can be more easily viewed and interpreted.

An alternative approach is to use model-free methods such as the Independent Component Analysis (ICA). ICA is capable of extracting multiple sources such as task-related components,

cardiac and respiratory effects, subject movements, and noise. Model-free approaches such as ICA are multivariate approaches accounting for interactions among different regions or voxels. ICA is used in fMRI modeling to understand the spatio-temporal structure of the signal by factoring the data into product of a set of time courses and a set of spatial patterns. ICA can be used to separate either spatially (McKeown et al., 1998) or temporally (Biswal and Ulmer, 1999; Makeig et al., 1997) independent sources. ICA may be better at identifying task-related signals in the brain, wherein the contribution of cognitive effects to the overall variance in functional imaging data is relatively small. It is particularly useful in paradigms in which a priori predictions of the brain responses is not available.


4.1 Experiment Stimulus Delivery

Stimulus delivery is an integral part of conducting an fMRI experiment. While subjects lie supine in an fMRI scanner, specific stimuli can be delivered through a computer controlled software. Presentation ( is a high-precision commercial program for stimulus delivery and experimental control for behavioral and physiological experiments.  E-Prime ( is another commercial product for experiment generation and millisecond precision data collection. Matlab ( is a high-level interpreted language available commercially with extensive support for numerical calculations. The Psychophysics Toolbox  ( provides a Matlab interface to the computer’s hardware. Very  useful for vision research, the PsychoPhysics toolbox, also provides synchronization with vertical retrace of the display, support millisecond timing, sound, keyboard, and the serial port.  Cogent 2000 ( is a Matlab toolbox available for researchers as a freeware. Cogent 2000 is useful for presenting stimuli and recording responses with precise timing. It incorporates Synchronization with fMRI scanner and Cogent Graphics provides additional utilities for the manipulation of sound, keyboard, mouse, joystick, serial port, parallel port, subject responses and physiological monitoring hardware.

4.2 Data Format

DICOM (Digital Imaging and Communications in Medicine) is the most common standard for medical images (, such as Computed Tomography (CT), MRI, and Ultrasound. A single DICOM file contains both a header (which stores information about the patient's name, the type of scan, image dimensions, etc), as well as all of the image data (which can contain information in three dimensions). This is different from the popular Analyze format (, which stores the image data in one file and the header data in another file. Recently, the Neuroimaging Informatics Technology Initiative (NIfTI) has become handy for the purpose of having a coordinated image format that would be compatible with a number of Neuroinformatics tools ( A number of software tools allow conversion from one data format to another. For a detailed description, refer to MRIcro software (for medical image visualization) guide by Chris Rorden (

4.3 Data Analysis

A number of popular software tools such as AFNI (Cox, 1996), FSL (FMRIB Software Library – Smith et al., 2004) and SPM (Statistical Parametric Mapping – refer to edited book by Friston et al., 2006) are available freely for the neuroimaging community. Dedicated softwares for preprocessing such as AIR (Automated Image Registration are available, although many software tools for fMRI data analysis include preprocessing routines. AFNI ( is a set of C programs for processing, analyzing, and displaying fMRI data and runs under Unix, Linux and MacOS environments. The SPM software is a suite of MATLAB functions and subroutines. The current release of SPM ( is designed for the analysis of fMRI, PET, SPECT, EEG and MEG data. FSL ( contains statistical tools for FMRI, MRI and DTI (Diffusion Tensor Imaging) data. The set of tools available in FSL include both model-based (FEAT - FMRI Expert Analysis Tool) and model-free (MELODIC - Multivariate Exploratory Linear Optimized Decomposition into Independent Components) analysis methods. Group ICA of fMRI Toolbox ( is a MATLAB toolbox which implements multiple algorithms for ICA and blind source separation of group (and single subject) fMRI data. Dedicated biomedical imaging package such as Analyze (, MEDx ( are available commercially. BrainVoyager is yet another commercial tool for neuroimaging data analysis (

4.4 Visualization

Interpretation of the outcome of an fMRI experiment can be done by projecting the activation maps on to the structure of the brain either as an array of 2D slices or onto the surface of the brain. Softwares like MRIcro ( and mri3dX ( allow slice based as well as 3D viewing. The location of activation can also  be reported on the basis of its coordinates in the stereotaxic space such as the Talairach and Tournoux. The Talairach daemon ( has a digitized database of the atlas by Talairach and Tournoux (1998) and a Java based interface that can read text files with x, y, z coordinates and return the location of activation in terms of 5 level heirarchy of label names including the hemisphere, lobe, gyrus, gray/white matter and the brodmann area. The Automated Anatomic Labelling (AAL - is a extension for SPM and consists of the parcellation done on a high Resolution MNI single subject brain. An AAL template is also available with MRIcro. SUMA ( is a program that adds cortical surface based functional imaging analysis to the AFNI suite of programs. It allows viewing 3D cortical surface models, and mapping volumetric data onto them.

4.5 Databases and Meta Analysis

The fMRI data centre ( provides complete data sets (raw, functional and structural MRI) from many peer reviewed fMRI studies. The journal of cognitive neuroscience requires all papers accepted for publication to deposit the data to the fMRIDC. To encourage scientific exchange, a new perspectives in fMRI Research award has been initiated for novel utilization of any of the datasets in the fMRIDC. BrainMap ( is an online database of published functional neuroimaging experiments with coordinate-based (Talairach) activation locations. It is a tool to rapidly retrieve and understand studies in specific research domains, such as language, memory, attention, reasoning, emotion, and perception, and to perform meta-analyses of like studies. The number of fMRI papers grows far too fast for anyone to read them all. AMAT (A Meta Analysis Toolbox – is a matlab program which allows searching through the coordinates reported in lots of fMRI papers.. The Brede database ( also allows coordinate based searching.


Neuroimaging with functional MRI has attracted researchers to assess the function of human brain in vivo. This article has presented the main issues in experimental design and generic approaches for data analysis. We have given pointers to some of the useful neuroinformatics tools that have gained popularity. Newer methods of data analysis and interpretations have been developed more recently.  For example, multivariate techniques, bayesian analysis (Friston et al., 2002) for statistical analysis of fmri data and connectivity among various brain regions (Friston et al., 2003). There has been a growing interest among usefulness of functional MRI to be able to predict the cognitive state a person is at a given instantaneous time point (Mitchell et al., 2004). This would enable applications like “brain reading” (Haynes and Rees, 2006) and “lie detection” (Davatzikos et al., 2005). The functional MRI has now gained an increased interest for use in clinical research (Partain, 2006). It appears that fMRI as a tool has many more exciting applications impending in near future.


Biswal, B.B., Ulmer, J.L., 1999. Blind source separation of multiple signal sources of fMRI data sets using independent component analysis. J. Comput. Assist. Tomogr. 23, 265– 271.

Chein, J. M. and Schneider, W. (2003). Designing effective fMRI experiments. In Grafman, J. and Robertson, I., editors, Handbook of Neuropsychology. Elsevier Science B.V., Amsterdam.

Cohen, M. S. and Bookheimer, S. Y. (1994). Functional magnetic resonance imaging. Trends in Neurosciences, 17:268–277.

Cox, R. W. (1996) AFNI – Software for Analysis and Visualization of Functional Magnetic Resonance Neuroimages. Computers and Biomedical Research 29:162-173.

Culham, J. C. (2005). Functional neuroimaging: Experimental design and analysis. In Cabeza, R. and Kingstone, A., editors, Handbook of Functional Neuroimaging of Cognition, 2nd edition. MIT Press, Cambridge MA.

Davatzikos C., Ruparel K., Fan Y., Shen D. G., Acharyya M., Loughead J. W., Gur R. C., and Langleben D. D. (2005). Classifying spatial patterns of brain activity with machine learning methods: application to lie detection. NeuroImage, 28:663–668.

Friston, K. J. (1997). Imaging cognitive anatomy. Trends in Cognitive Sciences, 1:21–27.

Friston, K. (1998). Imaging neuroscience: principles or maps? Proc. Natl. Acad. Sci. USA, 95:796–802.

Friston K.J., Glaser D.E., Henson R.N.A., Kiebel S., Phillips C., and Ashburner J. (2002). Classical and Bayesian Inference in Neuroimaging: Applications. NeuroImage, 16:484-512.

Friston, K. J., Harrison, L., and Penny, W. (2003). Dynamic causal modelling. NeuroImage, 19:1273–1302.

Friston, K. , Ashburner, J., Kiebel, S., Nichols, T., and Penny, W., Eds, (2006) Statistical Parametric Mapping: The analysis of functional brain images. Elsevier, London.

Haynes, J-D., and Rees G. (2006). Decoding mental states from brain activity in humans. Nature Reviews Neuroscience 7: 523–534.

Heeger, D. J. and Ress, D. (2002). What does fMRI tell us about neural activity? Nature Reviews, 3:142–150.

Hornak, J. P. (2002). The basics of MRI. Online book at:, Rochester, NY.

Makeig, S., Jung, T.P., Bell, A.J., Ghahremani, D., Sejnowski, T.J., 1997. Blind separation of auditory event-related brain responses into independent components. Proc. Natl. Acad. Sci. U. S. A. 94, 10979–10984.

McKeown, M.J., Jung, T.P., Makeig, S., Brown, G., Kindermann, S.S., Lee, T.W., Sejnowski, T.J., 1998. Spatially independent activity patterns in functional MRI data during the stroop color-naming task. Proc. Natl. Acad. Sci. U. S. A. 95, 803–810.

Mechelli, A., Henson, R. N. A., Price, C. J., and Friston, K. J. (2003). Comparing event-related and epoch analysis in blocked design fMRI. NeuroImage, 18:806–810.

Mitchell, T., Hutchinson, R., Niculescu, R., Pereira, F., Wang, X., Just M., and Newman, S. (2004). Learning to decode cognitive states from brain images. Machine Learning, 57:145–175.

Ogawa, S., Lee, T. M., Kay, A. R., and Tank, D. W. (1990). Brain magnetic resonance imaging with contrast dependent on blood oxygenation. Proceedings of the National Academy of Sciences, USA, 87:9868–9872.

Ogawa, S., Tank, D. W., Menon, R., Ellermann, J. M., Kim, S., Merkle, H., and Ugurbil, K. (1992). Intrinsic signal changes accompanying sensory stimulation: Functional brain mapping with magnetic resonance imaging. Proceedings of the National Academy of Sciences, USA, 89:5951–5955.

Partain, C. L. (2006). JMRI special issue: Clinical potential of brain mapping using MRI, Journal of Magnetic Resonance Imaging, 23:785–786

Smith, S.M., Jenkinson, M., Woolrich, M.W., Beckmann, C.F., Behrens, T.E.J., Johansen-Berg, H., Bannister, P.R., De Luca, M., Drobnjak, I., Flitney, D.E., Niazy, R., Saunders, J., Vickers, J., Zhang, Y., De Stefano, N., Brady, J.M., and Matthews, P.M. (2004). Advances in functional and structural MR image analysis and implementation as FSL. NeuroImage, 23(S1):208-219

Talairach P, Tournoux J. (1988). A Stereotactic Coplanar Atlas of the Human Brain. Stuttgart: Thieme

Ugurbil, K., Toth, L., and Kim, D. S. (2003). How accurate is magnetic resonance imaging of brain function? Trends in Neuroscience, 26:108–114.

Volkow, N. D., Rosen, B., and Farde, L. (1997). Imaging the living human brain: Magnetic resonance imaging and positron emission tomography. Proceedings of National Academy of Sciences, USA, 94:2787–2788.