KULeuven automatisation scripts for SPM99
This section contains all scripts and functions for the automation
of spm99.
In essence, only few adaptations have been made to the spm99b-scripts
in order to implement the extra tools available in the final release of
spm99.
The basic additions are:
-
the extra tools of spm99 in all postprocessing steps
-
the possibility to implement a user defined hrf
-
an overlay tool for activation maps onto anatomical slices (based on a
script by M. Brett)
1. Create an automation script for your experiment
To use the automated SPM99 functions you have to create a text file
in which you supply all the information necessary to run the functions
one after another. This text file will be executed in the matlab command
window, and is thus itself a matlab script. This file should be stored
in a directory in the MATLABPATH with the extention .m.
An example of a standard script for analysing fmri data from realignment
to computation of statistics is provided with the functions and is called
kul99example.m
Let us look at such an automation script step by step.
The script file consists of several parts; comments start with the
character %.
1.1 Obligatory part of the automation script
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Obligatory first part of the automation
script
%
%***************************************************************************
% fmriTEST = 1 to run the simulation
mode
%
= 0 to run the actual post-processing
% fmriDIR = the directory
in which all your data is situated
%---------------------------------------------------------------------------
global fmriTEST fmriDIR;
%set global variabels
fmriTEST = 1;
fmriDIR = '/images_rinda3/beatse/sidev6';
f99_CWD('LOG');
%make the LOG and RESULTS directory
This sets a few global variables to make the functions work.
The fmriTEST variable, if set to 1, makes the automation script run
in a test or simulation mode: the script, if executed, will now
simulate all steps of postprocessing and report warnings (e.g. missing
image files). You will want to run the script in simulation mode to detect
such warnings. If everything seems OK, you will change the fmriTEST value
to 0. Then, if executed, the real thing happens...
The fmriDIR string is the name of the directory that holds your subdirectories
with images. (on a windows PC it looks like 'c:\images_rinda\sunaert\spm99_kul_data')
Let's look how this part actually works: start a matlab, and start SPM99
as usual. Suppose you have copied the above script into a file called kul99example.m.
Type in 'kul99example' into the matlab window. This window will now look
like this:
1.2 Image processing steps in the
analysis(i.e. slice timing correction, realignment, coregistration,
normalisation and smoothing of the images).
1.3 Statistical part (i.e.
constructing your design matrix and execution of the analysis).
1.4 Overlay of activations
on anatomical slices
Webpage last updated on 26/7/2000. Authors: Stefan
Sunaert & Erik
Beatse.