3.1. Your data (images) must be organized in a certain way
The functions are dependent on a typical organization of the images!Let's explain this by a fmri experiment performed in one subject.
This is what we acquired sequentially.This is a good example of a bad experiment ('rest' as baseline...), but it will do nicely as example data for these functions...a high resolution anatomical image a timeseries of 120 timepoints of EPIs during e.g. semantic decision versus rest a timeseries of 120 timepoints of EPIs during e.g. verb to noun generation versus rest
The functions expect that the 2 timeseries of 120 EPI images are in separate directories. The names of these directories should be of the same length e.g. 'ts01' and 'ts02'. The anatomical images are best stored into a separate directory, and again the length of the directory name should be of the same length as the name of the EPI image directories, e.g. 'ts01' is 4 digits long so 'anat' would be a good name.
Finally, the functions will generate directories in which the results (different SPM*.mat and spm.ps files) and logs of what has been done will be written.
Thus your directory structure should look like this:2 directories of equal 'name-length' in which the images of the corresponding timeseries are stored 1 directory of the same 'name-length' in which the anatomical image(s) are stored ![]()
Additionally the scripts will generate:
a directory 'LOG' with log files a directory 'RESULTS' in which sub directories will hold the results of statistics 3.2. Automatisation scripts
Are described below the links:
- SPM96 automation functions
- SPM99 automation functions last updated on 23/aug/2000.
- adapted version of spm99b functions to the final release
- possibility to implement a user defined hrf function
- tool for overlay of activation on tra, sag and cor slices
4.1. The first step is to download the package:
4.1.1. SPM96 scripts
spm96_kul.tar.gz, containing the matlab functions is 46763 bytes large.
spm96_kul_data.tar.gz, containing the sample data is 46197269 bytes large (45 MB!).
4.1.2. SPM99 scripts
download spm99_kul.tar.gz containing the matlab functions to automate SPM99 (final release) and some example scripts!!4.2. The second step is to install the scripts onto your workstation:
The installation for the spm96 or spm99 sripts are almost identical. The examples below are for spm96. If you want to install scripts for spm99 just replace '96' with '99'...On your workstation, go to the directory where the spm directory resides, e.g.
cd /usr/local/SPM (replace with your real directory names)Extract the files by typinggunzip -c spm96_kul.tar.gz | tar -xvf -This will create a subdirectory 'spm96_kul' in which the scripts are stored.
Make a subdirectory, e.g. in your home directory, to store the automation scripts that you will create for your studies.Optionally, to run the example script:
On your workstation, go to a directory that you use to store MRI data & extract the data: e.g.cd /my_100Giga_disk/always_full/ (replace with your real directory names)This will create a subdirectory 'spm96_kul_data' with the example data in subdirectories.
gunzip -c spm96_kul_data.tar.gz | tar -xvf -4.3. The third step is to tell matlab where the functions are located on your workstation:
This is done by adding the directory in which the functions reside into the MATLABPATH. This is usually done in your .login file in your home directory. Ask the person who installed SPM. So, continuing with the example above you will have to add /usr/local/SPM/spm96_kul to the MATLABPATH.
Also add the directory containing the automation scripts for your studies (see 5.2) in the MATLABPATH.4.4. The fourth step is to (e)mail us a nice postcard!
If you do so, we will keep you informed if new things happen or if bugs are reported and fixed.
And it makes us feel good... you should know that our lab is located 2 levels below ground, without windows... so mail us and make our day!
One known bug: some of the comments in the code are in Dutch, our native language (This might be a feature (joke)).
As a very small fMRI group of two to three people, we CANNOT promise
to answer your questions, why this or that is not working, or not
implemented. However, if you find a bug (and preferably also a solution),
please let us
know.
Please, don't disturb the people of the FIL with questions about
the (mal)functioning of our scripts.