This is a tiny page introducing a set of batch scripts to do a full analysis with SPM2, including undistortion. It is specifically tailored to the CBU/Cambridge processing stream, but may be useful to others as examples for things like coregistration, normalization, etc.The scripts are available from the CBU Imagers SPM2 batch directory.
To get an idea how the scripts can be customized to your own situation, mave a look at the myv.m file, and the do_ana_spm2.m file, which runs all the steps. The README file explains the data directory structure on which the scripts are based.
For users of the Rhodri Cusack's undistortion toolbox, there's an edited version of fieldmap_mireg.m which works with SPM2. For the undistortion, you'll need SPM99 on the path after SPM2, so matlab finds the SPM2 functions first.
The scripts also uses custom routines, which combine the realignment, undistortion, normalization and smoothing in one resampling step. If you want to replicate this, you will need to download these undistort_reslice routines. If you don't want to use undistort_reslice, it should be easy to see from the scripts how to use standard SPM2 reslicing instead.
Other sources of SPM2 batch information
Another overall batch script for SPM2 (with some differences from our processing stream) is available at the FIL website:http://www.fil.ion.ucl.ac.uk/~wpenny/datasets/face-rep/SPM2.html. Here are some relevant emails from the SPM list:Some suggestions from John Ashburner on batching preprocessing.
Edited batch scripts from Ron Peeters.
SPM2 batch scripts from the University Catholique de Louvain.
As usual, in the wierd world of batch,
Good luck.
Matthew Brett