<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>SpmBatch2</title><revhistory><revision><revnumber>5</revnumber><date>2013-03-07 21:24:01</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>4</revnumber><date>2006-07-27 10:34:21</date><authorinitials>devel01.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>3</revnumber><date>2006-07-27 10:24:57</date><authorinitials>devel01.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>2</revnumber><date>2006-07-27 10:20:37</date><authorinitials>devel01.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>1</revnumber><date>2006-07-24 22:23:29</date><authorinitials>Scripting Subsystem</authorinitials></revision></revhistory></articleinfo><section><title>SPM2 batch scripts</title><para>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 <ulink url="http://imaging.mrc-cbu.cam.ac.uk/downloads/SPM2_batch">CBU Imagers SPM2 batch directory</ulink>. </para><para>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. </para><para>For users of the Rhodri Cusack's <ulink url="https://imaging.mrc-cbu.cam.ac.uk/imaging/SpmBatch2/imaging/FmBackground#">undistortion toolbox</ulink>, 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. </para><para>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 <ulink url="http://imaging.mrc-cbu.cam.ac.uk/downloads/Undistort_reslice">undistort_reslice routines</ulink>. 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. </para><section><title>Other sources of SPM2 batch information</title><para>Another overall batch script for SPM2 (with some differences from our processing stream) is available at the FIL website:<ulink url="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 <ulink url="http://www.jiscmail.ac.uk/cgi-bin/wa.exe?A2=ind0303&amp;L=spm&amp;T=0&amp;F=&amp;S=&amp;P=45776">batching preprocessing</ulink>. </para><para>Edited <ulink url="http://www.jiscmail.ac.uk/cgi-bin/wa.exe?A2=ind0307&amp;L=spm&amp;P=R32114&amp;I=-1&amp;T=0">batch scripts from Ron Peeters</ulink>. </para><para>SPM2 batch <ulink url="http://www.md.ucl.ac.be/rdgn/autospm2.html">scripts from the University Catholique de Louvain</ulink>. </para><para>As usual, in the wierd world of batch, </para><para>Good luck. </para><para>Matthew Brett </para></section></section></article>