Sample fMRI Block Design Analysis using SPM

Background

This tutorial describes how to analyze a simple fMRI dataset. To complete this tutorial you will need:
  1. MATLAB installed on your computer.
  2. SPM installed on your computer.
  3. Download and extract the sample dataset that includes the fMRI data (in NIfTI format), an anatomical scan (also T1) and text files that describe the timing.

Consider a simple experiment where we ask an individual to press their left hand at some timepoints, their right hand at other times, and to simply rest at other moments in time. In this situation one would expect that the left motor cortex and right cerebellum will be activated following right hand movement. This tutorial shows how to analyze this dataset. Below we provide a sample dataset from the GSU/GT Center for Advanced Brain Imaging.

The image below illustrates our study. The vertical axis shows time, in 1.92 second fMRI volumes (the picture shows the first 6 minutes). The red and green bars along the top of the image show when the individual presses their left (red) or right hand (green) - note that they press the same hand continuously for 12 seconds (a 'block' design). The red and green lines show the predicted blood flow signal for regions that are activated following left and right hand movements. Note that we expect the images to become brighter several seconds after an individual starts a task (the blood flow effect is sluggish).

[Image: Model Timecourse]

Analyzing the dataset

  1. First, start Matlab
  2. from the Matlab command prompt, change to the directory where your data is, e.g. 'cd c:\tutorial' or 'cd "\my documents\tutorial"'
  3. from the Matlab command prompt, launch SPM8 by typing "spm fmri". If SPM does not launch, make sure you have downloaded SPM and it is in your Matlab path.
  4. Setting the origin: SPM's normalization does a great job of aligning brains from different people, but it is pretty sensitive to the origin used as an initial alignment betweent he image and the template. By default, scanners set the origin to be the center of the scanner, whereas SPM expects this to be the anterior commissure. It is often helpful to set your origin before processing. If you are not familiar with the anterior commissure, see my web page
  5. Lets set the origin. From SPM's menu window, press the "Display" button and select your highest resolution image (in the tutorial, T1s005 is our high resolution T1-weighted image).
  6. FMRI scans usually have spatial distortions that can be minimized by using a field map to measure field inhomogeneities and then djusting the fMRI data. The tutorial data includes fieldmaps data if you want to do this, but that is beyond the scope of this tutorial. If you want to do this, take a look at my fieldmap web page. For our fMRI data, the readout time was 16.96ms (echo spacing = 0.54ms, 32 lines [interpolated to 64 using GRAPPA r=2]), and the fieldmaps used echo times of 4.92 and 7.38ms.
  7. From the main SPM menu window, press the "Batch" button
  8. A new window appears showing the Batch editor. We will use this for a while...
  9. Choose the menu item SPM/Spatial/Realign/Realign:Estimate & Reslice from the Batch window. A new set of items appear to refine our motion correction:
  10. We could do slice timing correction (especially for event-related designs) SPM/Temporal/SliceTiming. However our TR is pretty fast so the slice timing error is small and should be largely explained by the temporal derivative. For an example of how to conduct slice timing correction see the SPM tutorial for event-related designed.
  11. There are two options for normalization: either to estimate this directly from our EPI-based fMRI data or to use a high resolution T1 scan. In the next step I describe the former option. However, if we were to use the T1 scan to compute normalization we should first coregister the fMRI data to the T1 scan. This will ensure that the parameters estimated for the T1 scan can be applied to the fMRI data (as they will be registered). Therefore, it is common to use the function in SPM's batch window SPM/Spatial/Coreg/CoregEstimate to compute how to align the mean realigned fMRI data to the T1 image, and then to apply these transforms to all the fMRI images. If this was selected, we would choose the T1 image in the subsequent normalization (and the T1 template). Here I will normalize the low resolution fMRI data directly. There are pros and cons for each method: The direct method can correct for non-linear spatial distortions inherent in the EPI-based fMRI data (T1 scans have less distortion, and the coregistration of the fMRI data to the T1 is lienar). The T1 scan has higher resolution and more contrast for anatomical features, so it can in theory provide a more accurate normalization. For an example of how to conduct normalization using the T1 scan, see the SPM tutorial for event-related designed.
  12. Lets normalize our data. From the Batch window, select SPM/Spatial/Normalise/NormaliseEstimate&Write
  13. Now we blur our data with a gaussian. From the Batch window, select SPM/Spatial/Smooth
  14. Now we are ready to set up our statistics. From SPM's main window, press the "Specify 1st-level"