1
FMRLAB
Quick-Start Tutorial
Version 2.0 September 10, 2002
? Jeng-Ren Duann & Scott Makeig, 2002 Swartz Center for Computational Neuroscience
Institute for Neural Computation University of California San Diego
Information and downloads: http://sccn.ucsd.edu/fmrlab Questions and feedback: fmrlab@sccn.ucsd.edu.
2
FMRLAB Quick-Start Tutorial
Introduction
1. FMRLAB Installation 1.1 Download FMRLAB
1.2 Unzip and install FMRLAB
1.3 Add the FMRLAB path to the Matlab environment
1.4 Edit the FMRLAB settings file 'icadefs.m' to set ICA defaults 1.5 Download the FMRLAB example data set
2. Functional Image Preprocessing and ICA Decomposition 2.1 Start FMRLAB 2.2 Quitting FMRLAB
2.3 Create an FMRLAB dataset 2.4 Save the FMRLAB dataset 2.5 Remove initial 'dummy' scans 2.6 Perform slice timing adjustment
2.7 Remove off-brain voxels
2.8 Decompose the data with ICA
3. Visualizing Results of ICA Decomposition 3.1 Visualize component regions of activity (ROAs) 3.2 Visualize component maps on structural images 3.3 Find dominant components by maximum Z value 3.4 Find dominant components by PVAF
3.5 Export a selected component 3.6 Spatially normalize the ROA maps
3.7 Produce a maximal intensity projection (MIP) display 3.8 Produce a 2-D slice-overlay display 3.9 Produce a 3-D dead-model rendered display
Appendix – Function List of FMRLAB A.1 Main Files
3
A.2 Functions from ICA Toolbox A.3 Functions from ICA Toolbox
A.4 Function from Supplement of SPM’99 Toolbox
4
Introduction
This document provides step-by-step guidelines for those who want to use FMRLAB, a Matlab toolbox for fMRI data analysis using independent component analysis (ICA) available under the GNU public license from http://sccn.ucsd.edu/frmlab/. This document first describes the procedures for installing the toolbox and then illustrates the procedure for using FMRLAB to analyze fMRI time series using a hands-on example. The example dataset used in this tutorial is also available at http://www.sccn.ucsd.edu/fmrlab/example/.
Theory and Background. For background information about ICA and its application to fMRI data analysis, please refer to the references available at http://www.sccn.ucsd.edu/fmrlab/. FMRLAB has a counterpart, EEGLAB, for analyzing EEG or MEG data using ICA. It also can be freely downloaded from http://www.sccn.ucsd.edu/eeglab/. Some of the visualization functions FMRLAB uses to display ICA results are adapted from functions contained in SPM99, a Matlab-based program for brain imaging visualization and analysis which can be downloaded from http://www.fil.ion.ucl.ac.uk/spm/.
Requirements. FMRLAB runs under core MATLAB (The Math Works, Inc., Natick, MA), version 5.3 or higher. Currently, the (faster) binary version of our infomax ICA routine ‘runica()’ (run from within Matlab using ‘binica()’) has only been compiled under Linux (and FreeBSD). On the visualization side, the SPM99 display functions (e.g., max intensity projection or MIP, 2-D slice overlay, and 3-D rendering) run only under Linux. For other platforms, please refer to SPM99 website and download the proper version of related functions (see list in Appendix). FMRLAB requires at least 256 MB of RAM (more is better) and a Pentium III (or IV) CPU.
Processing Time. The amount of processing required by FMRLAB is relatively modest. For example, applied to a conventional fMRI dataset, FMRLAB requires less than 10 minutes to preprocess and run ICA training using a laptop running Linux with 1.6 GHz Pentium IV CPU and 1GB memory.
Image formats. The image format used in FMRLAB is generic raw (.img) without header and footer. Thus, the experimenter needs to enter the image acquisition parameters (e.g. image height and width, number of slices, FOV, slice thickness, TR, etc) as well as the experimental paradigm (e.g., total number of scans, stimulation onset asynchrony (SOA), etc). FMRLAB provides an editor allowing users to enter this information. To convert fMR images to the FMRLAB format, the FMRLAB distribution includes some MATLAB routines to convert images from different systems (Siemens Symphony, Siemens Magnetom, GE Signa 1.5/2.0 T and Bruker MedSpec S300 3T). Please refer to http://www.sccn.ucsd.edu/fmrlab/ for further details. To display the results of regions of activity
5
(ROAs) using MIP, 2-D slice overlay, or 3-D rendering, the data need to be converted to ANALYZE format (Biomedical Imaging Resource, Mayo Foundation) used by SPM. FMRLAB is equipped with a build-in converter function for this purpose.
FMRLAB Manual. This document gives a quick-start to FMRLAB only. It gives step-by-step instructions as to how to install the toolbox and get some hands-on experience with its use. Some available FMRLAB functions are not covered in this tutorial. For the details of these and other FRMLAB functions, please refer to the FMRLAB manual, which can also be downloaded from http://sccn.ucsd.edu/fmrlab/.
1. FMRLAB Installation
1.1 Download FMRLAB
The FMRLAB toolbox for fMRI data analysis using ICA can be downloaded at: http://www.sccn.ucsd.edu/fmrlab/ as a file named fmrlab.tgz. Under Microsoft Explorer, click the right mouse button and select “Save link as ….” Under Netscape, press SHIFT + left mouse button to download the toolbox .tgz file and save it to disk.
1.2 Unzip and install FMRLAB
Copy the FMRLAB .tgz file into an FMRLAB directory, for example, “/home/ourlab/matlab/fmrlab”. Use “tar xvfz fmrlab.tgz” to unzip and untar the file. This will save all the necessary files for running FMRLAB in the fmrlab directory.
1.3 Add the FMRLAB path to the Matlab environment
Open the file startup.m using a text editor. Add the line “path( path, FMRLAB_DIR);” to the end of file. Replace FMRLAB_DIR here with the actual pathname of the FMRLAB directory (in our example, ‘/home/ourlab/matlab/fmrlab/’)
1.4 Edit the FMRLAB settings file, ‘icadefs.m,’ to set ICA defaults
Open the file icadefs.m using a text editor. On line 8, replace ICADIR by your FMRLAB directory path (for example ‘/home/lab/matlab/fmrlab’). On line 17, set ICABINARY to ‘FMRLAB_DIR/ica_linux’, using the pathname of your FMRLAB_DIR directory (in our example,