SPM8 scripts

[Image: cancel]


Statistical Parametric Mapping (SPM) comes with a nice user interface, but sometimes small Matlab scripts can help answer your research question. A quick search of the web is usually able to find someone else who has encountered the same problem and written a Matlab script. Here are some useful links for SPM scripting.


I have a separate web pages describing my various SPM toolboxes and more complicated scripting pipelines:

  • MATcro is a simple Matlab program for viewing surface renderings. This can be useful for viewing fMRI activations.
  • clinical toolbox web page for normalizing CT, T1, T2, FLAIR, DW images from clinical populations.
  • My preprocessing and statistical scripts provide a analysis pipeline.
  • My ASL scripts extend SPM8/ASLtbx features for analyzing arterial spin labeling data.
  • My Matlab scripts for processing DTI data using FSL.

    My own scripts

    On this web page I include many of the scripts I use. Several of these scripts were inspired or derived from other people’s scripts, and in these cases the comments in the script gives credit to the original author. For most of these you can run them by passing a parameter (“nii_8bit (‘C:\dir\image.nii’)”) or without (“nii_8bit”) – in the latter case a graphical dialog box(es) guide you through the possible options. The ‘nii_*.m’ scripts are for manipulating NIfTI format images and typically require SPM, the ‘bmp_*.m’ scripts are for manipulating bitmap images, the ‘stat_*.m’ are general statistics, and the ‘t*’ scripts demonstrate the principles of MRI. You can click on each of the links below to view each script independently. However, it is easier to download all of the scripts, executables and images as a single zip archive:

    • click here to download all the scripts as a single archive.