The official website for SPM can be found here.

This page describes the processes used to analyse fMRI data using SPM in its GUI mode.

DICOM Conversion (using SPM)

The output files from a scan are not in a format that can be processed by SPM, so they have to be converted to the DICOM format. This can be done using SPM, or a seperate package such as MRI convert.

  1. To the right of the top box in MRI convert, click "Add folder". Navigate to your scan folders, and select all of the runs that you want to analyse.
  2. From the dropdown menu between the two boxes, select NIfTI.
  3. To the right of the bottom box click "Options" and ensure that only the options checked in the check boxes are items you want in your converted files' filenames. Also ensure that "Save each subject in a seperate directory", "Save each series in a seperate directory" and "Save as .nii file" are all checked.
  4. Click "Directory" to select your output directory, and then click "Convert all."

COREGISTERING ANATOMICAL TO TEMPLATE

Coregistration refers to the spatial alignment of a series of images. The subject's T1 anatomical image needs to be coregistered to the T1 template at the start of pre-processing the scan data. Further coregistration is done later on in the process, using images from each run of the scan.

  1. On the SPM menu, click "Coregister," and from the drop-down menu select "Est and Res" (estimate and reslice).
  2. For the "Reference Image", navigate to the following path: Documents --> MATLAB --> spm8 --> templates, and select the T1.nii file.

  3. For the "Source image", navigate to the folder containing the subject's T1 anatomical image (labelled mprage), and select the image file.
  4. Leave all the other settings as they are, save and run the batch.
  5. The newly coregistered image should be saved in the mprage folder.

ORGANISE DUMMIES

Each run of each scan contains a few dummy runs in the beginning of the scan, which should be kept seperate from the rest of the data as it can have an influence on later processing.

REALIGNMENT

The next step is realignment (aka motion correction). This step registers all the images of a specified run from one subject to each other, and gives us information regarding how much the subject moved their head during the scan. This information is later used to ensure that functional images are accurately mapped onto structural ones.

  1. On the SPM menu, click "Realign," and from the drop-down menu, select "Est and Res".
  2. Under the "Data" heading, use the "Session" file selector to select all the converted DICOM files of the specified run for the subject.
  3. For "Estimation options," "Quality" controls the quality of the images generated, on a range of 0 to 1. The "Interpolation" option also increases quality of images, with higher degree B-Spline options producing higher quality images. This should be changed to a minimum of "4th Degree B-Spline." The rest of the "Estimation Options" can be left as they are.
  4. Under "Reslice Options," the "Resliced Images" option should be changed to "Mean Image only". The rest of the options can be left as they are. Save and run the batch.
  5. Repeat for all images in each run of the scan.

COREGISTRATION

This step of coregistration is slightly different from the one completed previously; here, we coregister each image of a run to the coregistered image we generated earlier.

  1. For the "Reference Image," navigate to the anatomical image folder, where the coregistered anatomical image should be saved (the file starting with r), and select it.
  2. For the "Source Image," navigate to the folder of the run you want to coregister and select the mean image that was generated during the realignment phase (the file starting with the word "mean").
  3. For the "Other images," select the whole series of images EXCEPT the mean image.

  4. The rest of the options can be left as they are. Save and run the batch. Repeat for each run.

SMOOTHING

Spatial smoothing is a tool used to cope with functional anatomical variability not compensated by normalisation and improves the signal to noise ratio.

  1. On the SPM menu, click the "Smooth" button.
  2. For the "Images to smooth" section, navigate to a folder containing one run of subject, and select all of the riles with the prefix "r" EXCEPT the mean images. These "r" prefix images were generated during the coregistration step.

  3. "FWHM" refers to the size of voxel that you want to smooth. This can be changed according to your study (but should be the same in each run). We tend to use "6 6 6".
  4. Leave the other options as they are and run the batch.