SPM/Downloading SPM
From Wikibooks, the open-content textbooks collection
Contents |
[edit] Introduction
The SPM software is a suite of MATLAB functions and subroutines with some externally compiled C routines. SPM was written to organise and interpret the FIL's functional neuroimaging data. The distributed version is the same as that which the FIL uses.
SPM is not a biomedical imaging package, although there are sufficient tools for basic visualisation and interrogation of results such that SPM may be used standalone.
[edit] Licensing
SPM is made freely available to the (neuro)imaging community, to promote collaboration and a common analysis scheme across laboratories. The software represents the implementation of the theoretical concepts of Statistical Parametric Mapping in a complete analysis package.
SPM (being the collection of files given in the manifest in the Contents.m file included with each distribution) is free but copyright software, distributed under the terms of the GNU General Public Licence as published by the Free Software Foundation (either version 2, as given in file spm_LICENCE.man, or at your option, any later version). Further details on "copyleft" can be found at http://www.gnu.org/copyleft/. In particular, SPM is supplied as is. No formal support or maintenance is provided or implied.
[edit] SPM Version
[edit] SPM8
SPM8 was released in April 2009 and represents a major update to the SPM software, containing substantial theoretical, algorithmic, structural and interface enhancements over previous versions:
Regular updates are made available here:
[edit] Previous versions
Previous versions are still available for download, however you should prefer the most recent one:
- SPM5: http://www.fil.ion.ucl.ac.uk/spm/software/spm5/
- SPM2: http://www.fil.ion.ucl.ac.uk/spm/software/spm2/
- SPM99: http://www.fil.ion.ucl.ac.uk/spm/software/spm99/
- SPM96: http://www.fil.ion.ucl.ac.uk/spm/software/spm96/
[edit] Prerequisites
You need the following to run SPM on your computer:
- MATLAB: MATLAB is a high level numerical mathematics environment optimised for operations on untyped matrices. Its syntax is close to that of matrix algebra, making the code an effective pseudo-code for the algorithms, and leading to fast development times. Matlab is produced by The MathWorks, Inc. Natick, MA, USA. SPM requires only core Matlab to run (no special toolboxes are required).
- SPM also uses external C programs, linked to Matlab as C-mex files, to perform some of the more computationally intensive operations.
- Pre-compiled binaries are provided with the distribution for Linux (*.mexglx, *.mexa64), Windows (*.mexw32, *.mexw64) and Mac (*.mexmac, *.mexmaci, *.mexmaci64). For these platforms you only need Matlab.
- For other UNIX platforms, you will need an ANSII C compiler to compile external mex files. A Makefile is provided with the distribution, configured for various platforms.
- SPM8 uses the NIFTI-1 file format for the image data. All images are written as NIFTI-1, but it will also read the old Analyze format used by SPM2. Tools are provided to import data from DICOM, MINC and ECAT7. SPM8 also uses the GIfTI file format for surface-based data.
[edit] Download
SPM is available via FTP, but you will be asked to complete a registration form prior to downloading. Having completed the form, you will be directed to the download location, via a keyword enabled FTP URL.
You should be able to download the archive using your Internet browser (Firefox, Internet Explorer, Konqueror, Opera, ...) as they implement FTP transactions. Otherwise you can use free dedicated FTP software such as FileZilla or KBear. And, of course, the 'ftp' command line tool should do the trick too (as well as wget).
If your download fails, try to use passive mode.
[edit] FTP configuration
- In the 'Host:', type "ftp.fil.ion.ucl.ac.uk"
- In the 'Port:', choose "21" (this is the default FTP port)
- In the 'User:', type "anonymous"
- In the 'Pass:', type any email address
- then hit the 'Enter' key.
You will be able to navigate the SPM ftp site and can download everything.
[edit] Installation
- On Unix/Linux, probably tar xvfz SPM.tar.gz
- On Windows, use 7-Zip (free and powerful file archiver) or any other archive software that you might already have installed (WinZip, PowerArchiver, WinRAR, ...)
- On Mac, double-click to unpack the archive
Then launch MATLAB and add SPM in the path:
>> addpath C:/software/matlab/spm
SPM is now ready to use:
>> spm
[edit] Updates
SPM updates are made from time to time and advertised on the SPM mailing list. They can be downloaded from the following FTP address:
- ftp://ftp.fil.ion.ucl.ac.uk/spm/spm8_updates/
- ftp://ftp.fil.ion.ucl.ac.uk/spm/spm5_updates/
- ftp://ftp.fil.ion.ucl.ac.uk/spm/spm2_updates/
Unpack the archive on top of your SPM installation so that newer files overwrite existing files.
[edit] Toolboxes
A list of SPM toolboxes and extensions is available on the SPM website: http://www.fil.ion.ucl.ac.uk/spm/ext/.
To install one of them, follow the instructions probably provided with the package. If not, simply copy the functions into a subdirectory of the toolbox directory of your SPM installation.