SPM'96: ftp://ftp.fil.ion.ucl.ac.uk/spm/spm96.tar.gz (4.59Mb)
Updates for SPM'96: ftp://ftp.fil.ion.ucl.ac.uk/spm/spm96_updates
Basic random effects kit for SPM'96: ftp://ftp.fil.ion.ucl.ac.uk/spm/spm96_RFX.tar.gz
Event related fMRI kit for SPM'96: ftp://ftp.fil.ion.ucl.ac.uk/spm/spm96_ER.tar.gz
SPM'96 - released 9th April 1997
SPM96 is very old now. Consider using SPM12.
The content of this page is not updated.
SPM96 is available via anonymous ftp at ftp://ftp.fil.ion.ucl.ac.uk/spm/spm96.tar.gz (4.59Mb). For comprehensive download and installation instructions, review the distribution page. The SCCS directory is available to developers on request to the authors.
An update file, updating SPM96b (the public beta release of SPM96) to SPM96, is available at ftp://ftp.fil.ion.ucl.ac.uk/spm/spm96b_update.tar.gz (84Kb). This contains only files updated for SPM'96 since the beta release.
There may still be bugs, especially in the more esoteric parts of SPM that are infrequently visited. Please report bugs to <spm@fil.ion.ucl.ac.uk>. Peculiarities and general queries should be raised on the SPM discussion list. We will discuss problems on the list, with a summary appearing in the SPM96: Bugs & Fixes section of this page. Updated routines are available at ftp://ftp.fil.ion.ucl.ac.uk/spm/spm96_updates.
Note: SPM'96 was developed for Matlab4.2c on UNIX. SPM'96 will not work with Matlab5. We do not plan to release "patches" for SPM'96 to enable it to run under Matlab5. SPM'99 is a re-write of SPM for Matlab5
SPM'96 public beta - released 28th September 1996
Initially, we didn't have time for a full two month period of internal beta testing and feature stabilisation. However, we felt that the software was stable enough to release, and that a public beta would iron out any remaining difficulties much more efficiently than internal testing, and provide an introduction to SPM96 without further delay.
Relatively few bugs were found during public beta testing: The majority are updates and bug-fixes as discussed on the SPM email discussion list, and summarised in the SPM96b: Bugs & Fixes section of this page. The remaining modifications are largely cosmetic. The Contents.m
file in the SPM'96 distribution (& the update archive) details the affected files.
Compatability
SPM96 is backward compatible, in that each module will read files from previous versions. (E.g. SPM96 statistics will read normalised images from SPM95) However, it is recommended that you don't mix versions of the same module in a single analysis. (E.g. Don't mix SPM96 and SPM95 spatial normalisations in the same study group - the templates are different!) You should identify which versions of SPM were used for which stages of analysis in any publications.
A version choosing routine, spm_choose, is provided in the distribution. This presents a graphical menu of versions, which set the MatLab path and start the appropriate spm. Type `spm_choose` to use this facility. (System administrators need to edit the version and path definitions in spm_choose.m for this to work.)
New features
This section describes features of SPM'96, and is derived from spm.man
v1.15
- [S]PET vs. Functional MRI
- Alignment
- Spatial Normalisation
- Statistics
- Non parametric Statistical Methods (SnPM toolbox)
- Interface improvements
- Help
- Source code control
- Defaults
- Tissue Classification
- Rendering
- Image Calculator
- SPM{F} - inference and display
- Displaying results
- left-right orientation
- P values and statistical inference
- Conjunctions and masking
- Smoothness estimators
- Directory independence
- Miscellaneous
In addition, there are several minor extensions and additions that are not detailed here.
[S]PET vs. Functional MRI
On invoking SPM96 you are asked to select one of two user-interfaces. The first is for SPECT, PET and fMRI data that can be considered a series of independent scans. The second is for fast fMRI that generates temporally correlated time-series. The interfaces are very similar and largely call upon the same routines. The differences between these two components of SPM96 are:
- The fMRI realignment routines perform an optional mathematical adjustment to remove movement-related variance components that remain after simple realignment (see fMRI_1 in the bibliography below)
- The spatial normalisation is based on high resolution volumetric MRI data acquired at the same time as the fMRI data. One applies the ensuing transformations to the [realigned] fMRI data by specifying them as 'other images'. These routines will deal with T1 and T2-weighted data. In our experience the gray-white matter distinction (and homogeneity over the image) is better in T1-weighted images. The high resolution structural image must have the same orientation as the fMRI data and the corresponding voxels in both images should be specified using the ORIGIN field in the header. Clearly if the structural and functional data are exactly congruent (same position and voxel size) than the ORIGIN can be any voxel, as long as it is the same in both scans. Alternatively, the new coregistration module can be used to register the T1 image with the functional images. The necessary transformations are stored in the ".mat" files which the spatial normalisation module reads. If the T2*-weighted fMRI data are of sufficiently good quality; in some instances it is possible to normalise these directly (however this will require careful evaluation in your own laboratory)
It is not necessary to spatially normalise the data (this is only a pre-requisite for intersubject averaging or reporting in the Talairach space). If you wish to circumnavigate this step (e.g. if you have single slice data or do not have an appropriate high resolution MRI scan) simply specify where you think the anterior commissure is with the ORIGIN in the header of the first scan (using the 'Display' facility) and proceed directly to 'Smoothing' or 'Statistics'. - The statistical analysis assumes that the repeat time (inter-scan interval) is sufficiently short (e.g. less than 6 seconds) to make temporal smoothing viable. In this instance some special extensions are required to the general linear model to accommodate temporal correlations (see fMRI_2, fMRI_3 and fMRI_4 below). The reference waveforms are specified separately for each condition (allowing many conditions) using either a box-car, a single (half sine wave) or two basis functions for the response. The latter allows for different forms of response to task-specific epochs (see fMRI_5 and MRI_6 below). If you use a box-car (i.e. square wave) function you can optionally include its temporal derivative as an additional covariate of interest. The box-car function is delayed by 6 seconds, however this may be two much or too little for some brain regions. The timing covariate (temporal derivative) models a small shift in time that best fits the data. Inferences about whether the observed delay is significantly different than 6 seconds can be tested using contrasts in the usual way (a positive parameter estimate means a shorter delay).
The way that epochs or successive conditions are specified is now more intuitive and flexible. If there are 3 conditions just type in the conditions in the order they were presented i.e. 1 2 3 3 2 1 .... Later you will be asked to specify the number of scans for each epoch, again as a vector (list of numbers). If the epochs were all the same length, then just type in that length once. - Multisubject fMRI studies
Epochs can now vary in length (and order) within and between subjects or runs. If multiple subjects or sessions are specified, then subject or run-specific waveforms are used. This means that main effects of conditions and interactions between conditions and subjects (or sessions) can be evaluated with the appropriate contrast. If you want to treat all your sessions (or subjects) as one then specify just one session/subject.
Alignment
(a) ".mat" files
A new concept has been introduced into the alignment and coregistration parts of SPM. This is the storage of the alignment parameters in '.mat' files for use at a later time. It is no longer necessary to write out the realigned images before continuing on to the spatial normalisation stage. Since the realignment parameters are saved, they get incorporated straight into the affine part of the spatial normalisation*.
(b) fMRI-specific adjustments
This is now optional*. The adjustment has also been modified so that it is more constrained.
*Note that to perform the adjustment, the resliced images must be written in the realignment stage.
(c) Between modality coregistration
The old "mri to pet" button has been replaced by a more general "coregister" button. To replicate what "mri to pet" did, specify:
- Modality of first target image?
- target - PET
- Modality of first object image?
- object - T1 MRI
- select target image for subject
- your mean PET image
- select object image for subject
- your structural T1 MR image
- select other images for subject
- nothing
- Modality of first target image?
Note that the MR images should NOT be 'scalp-edited' for coregistration.
Spatial Normalisation
(a) New templates images
The template images which are now provided in SPM are now based upon data provided by the MNI (ICBM, NIH P-20 project). These templates are slightly larger than those from previous versions of SPM, and so the default bounding box has been increased accordingly. No 'scalp-editing' is needed on any images which are to be spatially normalised - since the templates have scalp on them.
(b) Three dimensional nonlinear normalisation
The two-dimensional nonlinear spatial normalisation has been extended into three dimensions. The (fourier-like) basis functions which are used are in fact 3D discrete cosine transform basis functions. The extension into the third dimension should eliminate the 'swirly' effects which many people reported at the tops of normalised brains.
(c) Image orientation
Rather than being prompted during the 'statistics' module of SPM for the orientation of the images, the spatially normalised images should be in neurological convention (with the right side of the brain being at the right side of the image). The default orientation of the un- normalised images is specified by the global variable "sptl_Ornt" in spm_defaults.m.
(d) Normalisation parameters are saved
The parameters which specify the spatial normalisation are saved to a '_sn3d.mat' file. They can be subsequently applied at any time to any images which have been coregistered to the image from which the parameters were determined.
Statistics
Clearly statistics do not change...
The core routine (spm_spm) has now been consolidated to deal with both PET and fMRI data. The case of independent observations (PET) is now treated as a limiting [uncorrelated] case of 'serially correlated regression' as used for fMRI. spm_spm now samples little cubes of data (as opposed to planes). This allows very large data sets to be analysed (over 2000 64x64x64 voxel images) without two much paging or related memory problems.
The specification of thresholds for the maximum intensity projections is now more exhaustive and comprehensive. The height threshold is specified as before in terms of an uncorrected p value or Z score. If you only want to see clusters that survive a corrected p value (based on spatial extent) than the corrected p value you enter will specify the extent threshold employed. If however you choose to see all clusters you can specify an extent threshold in terms of an uncorrected p value (i.e. the probability of getting a cluster that size or larger, assuming it exists) or voxels. If you want to see all voxels simply enter 0 (i.e. SPM95 style). In this instance the 'set-level' inference can be considered an 'omnibus test' based on the number of clusters that obtain (see statistical inference below).
Non-Parametric Statistical Methods (SnPM)
A suite of routines implementing non-parametric randomisation/permutation based tests for analysing PET/SPECT functional mapping experiments are now available. This approach combines the general linear model for computation of statistic with the non-parametric tests described by Holmes et al.
The software has been developed by Andrew Holmes and Tom Nichols (of Carnegie Mellon University). The approach is modular: Plug-in code modules are required for each type of design, defining the design matrix and possible permutations of appropriate labels on the data.
It is envisaged that the non-parametric approach (incorporating variance smoothing and 'pseudo' t-statistic images) will be most powerful for experiments yielding t-statistic images with low degrees of freedom, such as single subject experiments.
This SnPM suite is somewhat distinct from mainstream SPM, and is available as an add-on "toolbox". See http://www.fil.ion.ucl.ac.uk/spm/snpm for further details.
Interface Improvements
The input routine which handles user questioning in the 'Interactive' SPM window has been improved: Default responses are available for button and menu type questions (if appropriate), and keyboard accelerators have been added. The text response for string and evaluated input may now be edited without having to click in the response widget (dedicated to Dan Pavel). View the help on spm_input.m for details.
The file selector dialog (spm_get.m) now gives "summary views" for directories with a large number of files (after filtering). The summary view shows blocks of files with similar filenames (e.g. s0095_*.img). These multi-file items can be selected, deleted, and expanded to permit selection of individual files. This dramatically speeds up file selection for large numbers of similarly named files, such as in fMRI analysis.
SPM can now be switched between PET & fMRI "modes" using a pull-down menu on the SPM Menu window. This changes some of the Menu buttons, sets the MODALITY global variable, and sets the default values for the modality.
The initial splash screen can be bypassed with `spm pet` and `spm fmri` as appropriate.
The toolbar in the Graphics window has been improved.
An SPM version chooser function, spm_choose, is included to allow users to choose which SPM version to use without recourse to manually editing their MATLABPATH.
On startup, SPM'96 displays the "message of the day" file spm_motd.man
in the Graphics window, providing SPM administrators with a reliable communications channel.
Help
The Help facility has been improved. A new help window is used for help display and interaction. A pull-down menu of previous topics is maintained in addition to a pulldown menu of topics referenced by the current topic, enhancing the recursive help facility. Long topics are paged, with page controls appearing in the bottom right when required. These multi-page help files now print properly.
Context sensitive help has been added in a number of locations.
The special "message of the day" help file (spm_motd.man) is displayed (if it exists in the SPM directory) in the Graphics window at startup.
Many of the Help pages have changed slightly so please take time to review them.
Source code control
We now use SCCS source code control for SPM development. At it's most basic, this enables you to see the improvements/alterations between releases, and to compare any customised versions you may have with the SCCS history. SCCS was introduced after the release of SPM95, so most of SPM95's routines can be regarded as v1.1, although some were edited slightly between SPM95 release and the introduction of source control.
The SCCS subdirectory is *not* shipped with SPM (it's quite large), but will be made available to interested developers upon request.
Defaults
The old defaults module has been changed drastically. Changes to any of these defaults should remain until the end of the SPM session. Resetting the defaults sets them back to those specified in the file spm_defaults.m.
The spm_defaults.m file is intended to be customised by whoever maintains SPM. It should be reasonably clear what the different options mean. Probably the most important default to check is "sptl_Ornt" which contains the orientation of the images before spatial normalisation.
Defaults now govern the way many routines behave, including how much control the user is given over the parameters of routines.
A wide variety or printing options are available, including EPS.
Tissue Classification
A "segment" button has been added to SPM for partitioning MR images into gray matter, white matter and CSF. These partitions may be used for voxel-based morphometrics, assisting scalp editing etc. The tissue classification module is also used by the between mode coregistration module.
Rendering
The old "render" option has been replaced by a new one. This one simply renders blobs on to a 'standard' Talairach brain.
Image Calculator
A simple image calculator has been included. For example, to add two images and divide by a third, this can be done with a simple expression like "(i1+i2)./i3".
SPM{F} - inference and display
SPM{F} now emulates SPM{Z} in providing summary data on the SPMs. P values corrected for the volume analysed are available for the SPM{F} based on peak height. P values based on spatial extent, or the number of clusters are not yet available and these fields are filled in with NaN at the present. 'Results' can now also handle SPM{F}, which allows you to display graphical and image data about selected clusters in the SPM{F}. This facility is in preparation for a more extented use of the SPM{F} particularly in relation to model selection and fMRI data analysis.
Displaying results
As noted above 'results' display now includes the facility to view SPM{F}s. The plotting routines have been generalised such that one can plot adjusted and fitted data against scan number, any specified covariate or specified ordinate. This should be useful for plotting responses against some parameter in parametric designs and nonlinear regressions. The table option has been removed. Adjusted and fitted data are contained in the variables y and Y following a plot of the voxel in question. These data are arranged in a matrix with data from each subject in a column. If the number of scans per subject is not constant then column vectors are returned. The variable Fnames contains the filenames of the associated data.
Dragging of the pointers in the MIP is now dynamic, and is faster. Coordinate information appears on printouts. Tables of maxima are "dynamic" - pressing the coordinates leads to the location being highlighted.
Tables of results may now occupy more than one page, allowing a full characterisation of all local maxima within a region. The first page of the table is displayed, and paging controls provided to move to subsequent pages. Printing a multi-page figure prints each page individually.
Filtered SPM{Z} can be written out to Analyze files (spm_projections_ui)
left-right orientation
This has always been a difficult area for people analysing data. We have chosen the simplest option - namely orientate your images to the required convention at the point of spatial normalisation. Following this SPM will simply analyse what it is given. SPM does not know what is left or what is right but generally the neurological convention that right is right (i,e, looking at slices from the top) is preferred and is adopted by SPM.
See also note (i.c) above: Rather than being prompted during the 'statistics' module of SPM for the orientation of the images, the spatially normalised images should be in neurological convention (with the right side of the brain being at the right side of the image). The default orientation of the un- normalised images is specified by the global variable "sptl_Ornt" in spm_defaults.m.
P values and statistical inference
The P values associated with the thresholds SPMs now include:
- uncorrected P values based on Z - the voxel height
- uncorrected P values based on k - the cluster size
and corrected P values based on
- Z - the voxel height
- Z - the voxel height and k - the cluster size
- c - the number of clusters
It is important to distinguish between corrected and uncorrected P values (the former are only used if you did not have an apriori hypothesis) and the level of inference: voxel (1 and 3), cluster (2 and 4) and set [of clusters] (5). Two thresholds are now requested to define the excursion set (a height threshold and a spatial extent threshold). The default extent threshold is the expected number of voxels per cluster for both SPM{Z} and SPM{F}. Setting this threshold to 0 gives a SPM95-like profile. In this case the set level inference (5) corresponds to an omnibus test based on the observed number of clusters. The footnotes of the summary tables now include the expected number of clusters and voxels per cluster to guide your interpretation.
The p values are based on the probability of obtaining c, or more, clusters of k, or more, voxels above u, in the volume S analysed = P(u,k,c). For specified thresholds u, k, the set-level inference is based on the observed number of clusters C = P(u,k,C). For each cluster of size K the cluster-level inference is based on P(u,K,1) and for each voxel (or selected maxima) of height U, in that cluster, the voxel-level inference is based on P(U,0,1). All three levels of inference are supported with a tabular presentation of the p values and the underlying statistic (u, k or c).
Conjunctions and masking
Either single contrasts can be examined or conjunctions of different contrasts. In the latter case a new SPM{Z} is created, that reflects the sum of all specified effects and voxels are eliminated where there are significant differences among these effects (at p < 0.05 uncorrected). A conjunction is therefore the conjoint expression of two or more effects (each specified in terms of a contrast) to a similar degree.
Masking simply eliminates voxels from the current contrast if they do not survive an uncorrected p value (based on height) in one or more further contrasts. No account is taken of this masking in the statistical inference pertaining to the masked contrast.
Smoothness estimators
The smoothness estimator is now based on the normalisation residuals and is, we hope, a much more robust estimator. In particular it is not affected by deviations from the null hypothesis or the contrasts specified.
Directory independence
SPM is now largely "directory independent". Results (spm.ps files, *.mat files etc.) are written in the current directory, rather than the directory in which SPM was started. A "CD" button has been added to the interface. The only exception here is the spatial routines, which write realigned and normalised images (and the respective *.mat files) in the same directory as the source images (clearly the realignment *.mat files have to go alongside the original images). However, the spm.ps file will still be written in the current directory :-)
Miscellaneous
Filtered SPM{Z} can be written out to Analyze files (spm_projections_ui). SPM*.img are no longer automatically written out during the statistical analysis.
SPM96: Bugs & Fixes
This section describes the bugs that have been reported, along with the appropriate fixes.
Updated versions of appropriate SPM functions are available from our anonymous FTP server in the spm96_updates
spm_coregister.m
v1.12avg305T1.hdr
- SPM96 not quite directory independent! (
spm.m
v1.26) - SPM-PET assummes six confounds when I ask for more! (
spm_spm_ui.m
v1.15.1.2) - GUI input goes off bottom of interactive window!
spm_input.m
v1.9 - Ordering of files within groups in file selection window when using summary views may not be as expected.
spm_get.m
v1.13
spm_coregister
v1.12: Rigid body registration deviates very slightly from rigid body.
Synopsis: There was an almost imperceptible deviation from a rigid body transformation in the coregistration, resulting in a tiny amount of shearing being introduced into the transformation matrix.
Fix: The orders of matrix multiplications have been rearranged to eliminate the problem.
sccs diffs -r1.12 spm_coregister.m ------- spm_coregister.m ------- 42c42 < % %W% John Ashburner FIL %E% --- > % @(#)spm_coregister.m 1.13 John Ashburner FIL 97/06/13 290c290,291 < params = [sptl_Ornt(1:6) sptl_Ornt(1:6) sptl_Ornt(7:12) 1 1]'; --- > tmp = spm_imatrix(inv(spm_matrix(sptl_Ornt(1:12)))); > params = [tmp(1:6) tmp(1:6) tmp(7:12) 1 1]'; 295,297c296,298 < params = spm_affsub3('register1', PPG, PPF, 1, 12, params); < params = spm_affsub3('register1', PPG, PPF, 1, 8 , params); < params = spm_affsub3('register1', PPG, PPF, 1, 4 , params); --- > params = spm_affsub3('register1', PPF, PPG, 1, 12, params); > params = spm_affsub3('register1', PPF, PPG, 1, 8 , params); > params = spm_affsub3('register1', PPF, PPG, 1, 4 , params); 302c303 < MM = spm_matrix(params([1:6 13:18]))\spm_matrix(params([7:12 13:18])); --- > MM = spm_matrix(params([1:6 13:18]))/spm_matrix(params([7:12 13:18])); 311c312 < spm_segment(PGF,spm_matrix(params([1:6 13:18])),'t'); --- > spm_segment(PGF,inv(spm_matrix(params([1:6 13:18]))),'t'); 331c332 < spm_segment(PFF,spm_matrix(params([7:12 13:18])),'t'); --- > spm_segment(PFF,inv(spm_matrix(params([7:12 13:18]))),'t');
Download: spm_coregister.m
v1.13, to replace v1.12 as shipped with SPM96
-john (Friday) 13/06/97
avg305T1.hdr
ORIGIN is in the wrong place in the image.
Synopsis: The Z coordinate of the ORIGIN was out by two voxels in avg305T1.hdr. This will have affected spatial normalizations only if avg305T1.img was specified as the template image, but it does result in a 4mm discrepency in Z if you used this image for superimposing your results on to.
Fix: The correct ORIGIN of [46 65 35] has been put into the header.
Thanks: to Dr Paulesu for pointing this out.
Download: avg305T1.hdr
to replace version shipped with SPM96, or alternatively modify the existing header from the `Display' module of SPM.
-john (page modified) 19/08/97
spm.m
v1.26: SPM96 not quite directory independent
Synopsis: Changing directory doesn't quite work:
Some files are still written to the original working directory.
Description: Historically SPM used a global variable CWD
to trach the current working directory, and this hasn't been eliminated from all components of SPM96.
Fix: Set the global variable CWD to the current working directory after changing directory:cd dir, global CWD, CWD=pwd;
The SPM Menu window has a "CD" button, handled by spm.m
, which can be fixed by changing spm.m
v1.26 at line 442 as follows:
fil % sccs diffs -r1.26 spm.m 442c442,444 < 'cd(spm_get(-1,[],''Select new working directory'')),',... --- > 'global CWD, ',... > 'CWD = spm_get(-1,[],''Select new working directory''); ',... > 'cd(CWD), clear CWD, ',...
Thanks: to all those who pointed this out!
Download: spm.m
v1.26.1.1 to replace version v1.26 as shipped with SPM96
-andrew 26/01/1998
spm_spm_ui.m
v1.15.1.4 PET stats uses 6 confounds when I ask for more
Synopsis: Choosing "greater than 5" for the number of confounding covariates in a PET/SPECT statistics run actually gives you six!
Description: Typo...
Fix: Change line 353 of spm_spm_ui.m
v1.15.1.2 as follows:
fil % sccs diffs -r1.15.1.2 spm_spm_ui.m 353c353 < if (c == 6), g = spm_input('# of confounding covariates',J); end --- > if (g == 6), g = spm_input('# of confounding covariates',J); end
Thanks: to Christophe Phillips for pointing this out.
Download: spm_spm_ui.m
v1.15.1.4 to replace version v1.15.1.2 as shipped with SPM96
-andrew 19/01/1998
spm_input.m
v1.9 GUI input goes off bottom of interactive window!
Synopsis: GUI input can go off the bottom of the SPM "Interactive" window, which isn't resizable.
Description: SPM appears to hang whilst doing nothing, but in fact it's actually waiting for an answer to a question you can't see! This doesn't usually happen in vanilla SPM96, but with an event-related fMRI analysis using the event-related kit for SPM96 (SPM97) there can be lots of questions for different event types and the problem is quite common.
Fix: Either use the command line (use the defaults button to set global CMDLINE to 1, or download and install a fixed spm_input.m
(there are too many changes to list here)
Thanks: to Tom Ellmore & Vinod Goel for pointing this out.
Download: spm_input.m
v1.10 to replace version v1.9 as shipped with SPM96
-andrew 20/11/1998
spm_get.m
v1.13
Synopsis: Ordering of files within groups in file selection window when using summary views may not be as expected.
Description: The SPM file selection window (titled SPMget) uses summary views for directories with large numbers of files. In a summary view, files with similar names are grouped, labelled by a wildcarded filename (such as image*.img), and can be selected as a group be selecting the label.
There are certain circumstances when the ordering of the files within a group is not the same as the order displayed outwith summary views (a group summary can be expanded by clicking the white figure to the left of the group label). Outwith summary view, files are listed in a smart alphabetical order. In this smart ordering, file image2.img
would appear before file image10.img
, even though alphabetically they should be the other way round. With a file filter of *.img
, a sumary view with label image*.img
would enforce alphabetical order, putting image10.img
before image2.img
. In certain circumstances when using no file filter string, i.e. a file filter of *
, the members of a group in a summary view can be in a completely bizzare order (sorted on the last letters)!
Further, in certain circumstances, when using a filter of *
in a summary view with lots of very similar named files, spm_get.m
can crash with an "Index exceeds matrix dimensions" error.
Fix: Either:
- Always use leading zeros and a file filter with a definite tail (such as
*.img
) when using summary view file selection. - Don't select files in a summary view (expand the group and then select all).
- Modify the 'FileSummary' sub-function of
spm_get.m
v1.13 to respect the original order of the file listing when summarising:fil % sccs diffs -r1.13 spm_get.m 167c167 < % Specifys which end to take as common for file summary --- > % Specifies which end to take as common for file summary 171a172,175 > % FSpecs - String matrix of file patterns, with n rows > % FnamePos - Matrix of n rows. > % Each row contains the indicies of all Fnames matching the pattern > % given in the corresponding row of FSpecs. Padded with zeros. 859c863 < fS = ones(nS,Sl); --- > fS = setstr(zeros(nS,Sl)); 880,883c884,887 < if size(Fnames,1) == 1 < %-Only one filename! < R1 = deblank(Fnames); < R2 = 1; --- > if size(Fnames,1)==1 | size(Fnames,2)
%-Only one filename | text shorter than required common length > R1 = Fnames; > R2 = [1:size(Fnames,1)]'; 908c912,913 < tI = I(cI); --- > %-Note indices of Fnames in this group, retain original ordering > tI = sort(I(cI)); 914a920,924 > %-Order groups by original ordering of first member occurence > [null,tmp] = sort(FnamePos(:,1)); > FSpecs = FSpecs(tmp,:); > FnamePos = FnamePos(tmp,:); 954,955c964 < %-Sort in next line keeps ordering by headers < cI = chI(sort(tI(j,tI(j,:)>0))); --- > cI = chI(tI(j,tI(j,:)>0));
Thanks: to Andreas Bork, for noting the "Index exceeds matrix dimensions" problem.
Download: spm_get.m
v1.13.1.1 to replace version v1.13 as shipped with SPM96
-andrew 18/01/1999
SPM96b: Bugs & Fixes
SPM96b is a public beta release. This section describes the bugs that have been reported, along with the appropriate fixes.
Updated versions of appropriate SPM functions are available from our anonymous FTP server in the spm96b_updates
spm_get_space.m
v1.6spm_figure.m
v1.13spm_write_sn.m
v1.4spm_spm_ui.m
v1.15spm_sptop.m
v1.1spm_get.m
v1.12spm_projections.m
v1.11spm_realign.m
v1.15spm_coregister.m
v1.11spm_spm_ui.m
v1.15.1.1spm.m
v1.25spm_projections_ui.m
v1.11
spm_get_space
: Occasionally crashes out.
Synopsis: Occasionally crashes out.
Fix: The fixed version (v1.7) differs from v1.6 at line 52 as follows:
fil % sccs diffs -r1.6 spm_get_space.m 52c52 < vx = abs([M(1,1) M(2,2) M(3,3)]); --- > vx = sqrt(sum(M(1:3,1:3).^2));
Download: spm_get_space.m
v1.7, to replace v1.6 as shipped with SPM96b
-john 30/09/96
spm_figure.m
v1.13: SPM crashes at startup
Synopsis: SPM96b crashes at startup, reporting "MATLAB bus errors" or "MATLAB segmentation violations" at line 256 of spm_figure.m
Description: SPM96 usues the 'Tag' attribute of the figures to locate them, rather than hardcoding the figure number into the programs. Line 256 of spm_figure.m
checks that figure F exists:
if ~any(F==findobj(get(0,'Children'))), F=[]; end
The error appears to be in the implementation of findobj, and is version dependent.
Fix: Upgrade to MatLab v4.2c, the current version of MatLab, on which SPM is developed.
Alternatively...
Fix: The findobj here is redundent, and so the line should be changed to:
if ~any(F==get(0,'Children')), F=[]; end
Rene deBruin suggested commenting out this line. This will also work, but removes a layer of protection from the code.
Thanks: to Dan Pavel and Rene deBruin for their comments.
Download: spm_figure.m
v1.14, to replace v1.13 as shipped with SPM96b.
-andrew 07/10/96
spm_write_sn
v1.4: Unmap files.
Synopsis: Memory mapped images to normalise aren't unmapped. Not unmapping causes problems on HPUX 9.x.
Fix: Unmap the files! The fixed version (v1.5) differs from v1.4 at line 278 as follows:
fil % sccs diffs -r1.4 spm_write_sn.m 190a191 > for i=1:size(V,2), spm_unmap(V(:,i)); end;
Thanks: to Darren Gitelman for reporting this problem.
Download: spm_write_sn.m
v1.5, to replace v1.4 as shipped with SPM96b
-john 28/10/96
spm_spm_ui
v1.15: Confounding covariate by factor interactions don't work?
Synopsis: Subject by covariate of no interest interaction doesn't work, study by covariate of no interest interaction actually gives subject by covariate interactions, and condition by covariate of no interest interaction actually gives study by condition interactions!
Description: In SPM95, Interactions of covariates with study and subject were permitted in various designs. In SPM96b, interaction with condition was added as an additional option, supposedly only for covariates of interest. Unfortunately, changes in the code for confounding covariates for the presence of this additional covariate weren't made.
(Interaction of covariates of no interest with condition should not be presented, since such an interaction leaves the interpratability of main effects of condition dependent on the level of the interaction, necessitating the examination of the interaction, and therefore the specification of the covariate as of interest.)
Fix: The problem is in lines 378 & 381 of spm_spm_ui.m
v1.15, where the indices should be incremented by one. Further, the option of interaction with condition should not be offered. The fixed version (v1.15.1.1) differs from v1.15 as follows:
fil % sccs diffs -r1.15 spm_spm_ui.m ------- spm_spm_ui.m ------- 374a375 > iCovEffInt(iCovEffInt==2)=[]; 378c379 < if (i==2) %-Interaction with study --- > if (i==3) %-Interaction with study 381c382 < elseif (i==3) %-Interaction with subject --- > elseif (i==4) %-Interaction with subject
Thanks: to Geriant Rees, Gereon Fink and Sergey Pakhomov for reporting this bug.
Download: spm_spm_ui.m
v1.15.1.2, to replace v1.15 as shipped with SPM96b.
-andrew 15/11/96
spm_sptop
v1.1:
This section is still under construction...
Synopsis:
Description:
Fix: Set row-wise sums to unity
Thanks:
Download: spm_sptop.m
v1.2, to replace v1.1 as shipped with SPM96b.
-karl 09/11/96
spm_get
v1.12: CmdLine mode says files don't exist?
Synopsis: When using SPM in command-line mode the file selection program incorrectly reports files not to exist when the filenames have trailing spaces.
Description: spm_get.m
, the file selection dialog for SPM, has a command line mode, entered using the "KEYBD" button on the file selection window, or directly if SPM is in command-line mode (global CMDLINE=1). This command line variant checks the existance of entered filenames, prepending the current working directory to relative paths. However, filenames with trailing spaces are erroneously reported not to exist.
(If you load the SPM.mat file after a statistics session, the variable P contains all the filenames, padded with spaces as necessary so they fit into a square string matrix. This would be handy for copying and pasting into command-line mode SPM, but for the problem described.)
Fix: The fix is to insert deblank
statements at various places in the command line code. An updated version (v1.13) may be downloaded.
Thanks: to Manabu Honda for noting this bug, and to Corbett Nelson for noting this and proposing an amendment.
Download: spm_get.m
v1.13, to replace v1.12 as shipped with SPM96b.
-andrew 21/11/96
spm_projections
v1.11: Incorrect FWHM {voxels} printed.
Synopsis: Summary print-outs of SPM{t} print an erroneous value for the smoothness (FWHM) in voxels.
Description: The smoothness estimate is saved internally as the sigma (in voxels) of the equivalent Gaussian point response function. (Note that this is a convenience, only the bivairate cluster size-&-height test assummes a Gaussian auto-correlation function.) In the footer of parameters, spm_projections
prints sigma in millimeters where it should print the FWHM in voxels. The two are related by FWHMvoxels = SIGMAmm * VoxDim/sqrt(8ln(2))
.
Fix: The problem is on line 351 of spm_projections.m
v1.11. The fixed version (v1.12) differs from v1.11 as follows:
fil % sccs diffs -r1.11 spm_projections.m ------- spm_spm_ui.m ------- 351c351 < str = sprintf(' {voxels} = %0.1f %0.1f %0.1f',sqrt(8*log(2))*W); --- > str = sprintf(' {voxels} = %0.1f %0.1f %0.1f',W.*V([1:D] + 3)');
Thanks: to Alistair Howesman for reporting this bug.
Download: spm_projections.m
v1.12, to replace v1.11 as shipped with SPM96b.
-andrew 30/01/97
spm_realign
v1.15: Suboptimal adjustment of fMRI data.
Synopsis: The adjustment for movement when writing realigned fMRI data was only subtracting anything correlated with movements in the Z direction.
Description: After some empirical research, we found that signal changes correlated with motion within plane can also confound the results. This adjustment is still an optional part of the realignment procedure, but the user also gets the choice of a first or second order adjustment, either with or without spin history correction.
Fix: The adjustment works by subtracting from the data anything which is correlated with the movement parameters. A constant term should have been included in the design matrix for determining what is correlated with movement. This was omitted in spm96b, but has been re-introduced with the patch.
Thanks: to Sylke Grootoonk, Chloe Hutton and Bob Turner for looking into the problem.
Download: spm_realign.m
v1.16, to replace v1.15 as shipped with SPM96b, and also a new routine
spm_imatrix.m
v1.2
-john 05/02/97
spm_coregister
v1.11: Leaving temporary files behind.
Synopsis: Within modality coregistration was leaving temporary files behind.
Fix: The temporary smoothed images are now being deleted properly.
Download: spm_coregister.m
v1.12, to replace v1.11 as shipped with SPM96b
-john 05/02/97
spm_spm_ui
v1.15.1.1: Incorrect F statistics for most PET designs.
Synopsis: For all PET designs except the "covariates only" designs, the (numerator) F degrees of freedom are one too many, and hence the F-statistic is incorrect.
Background: In SPM effects are divided into confounding effects and effects of interest. An F-statistic is computed at each voxel for the null hypothesis that the parameters for the effects of interest are zero, that is that there are no effects of interest. This F-statistic image is thresholded at upper tail probability value UFp (a global default), and only suprathreshold voxels are retained for display and interrogation in the results section of SPM.
Description: For PET designs other than the "covariates only" designs, a constant term is not added to the model, and any block effects are constrained to sum to zero, such that the mean is modelled in the condition effects. Thus the confounding partition of the design matrix cannot model the mean. However, the fitting code implicitly fits the mean for all (balanced) designs, by mean correcting the data. The additional degree of freedom implicated here is not accounted for, and the (numerator) F-degrees of freedom printed are therefore one too many, and the F-statistic computed from these degrees of freedom incorrect.
E.g. SPM96b prints the F degrees of freedom as [a,b]. The true degrees of freedom are [a-1,b]. The printed F-statistic differs from the true one by a factor of (a-1)/a, multiply the erroneous SPM96b F-statistic by a/(a-1) to obtain the correct F-statistic. The threshold applied by SPM96b to the erroneous F statistic using erroneous df is UF=spm_invFcdf(1-UFp,[a,b])
, which translates to a threshold of a*UF/(a-1)
for the correct F-statistics. Compare this with the correct threshold of spm_invFcdf(1-UFp,[a-1,b])
.
Comment: In general it is impossible to say whether the p-values attributed to the erroneous F-statistics are conservative or liberal. This is because the true F-statistic is greater than the one printed, but the F-distribution for the correct degrees of freedom has a fatter tail than the one used, so high F-values are more likely.
For most PET designs the SPM{F} is not of interest in itself, and it is only the effect of the SPM{F} thresholding we need to consider. Thus the F error will not affect the Type I (false positive) error rate for the contrasts (SPM{t}). The possibility is that thresholding the erroneous SPM{F} at p=UFp (for the erroneous df) is exceptionally severe when compared to that for the true F and df: The probability of Type II error (false negatives) may be increased. Clearly the error is most marked when the degrees of freedom involved are small. For small numbers of effects of interest the omnibus F-statistic will be highly significant if the contrast is, such that voxels with SPM{t} reaching corrected significance at p=0.05 are likely to have very high (true) SPM{F}, and therefore pass the UFp threshold even with the erroneous F and df of SPM96b. Our experience comparing results from SPM96b with a fixed version is that this is the case, and that the regions reaching corrected significance are the same.
(In SPM95 the PET & fMRI statistics section were separate, and a constant term was introduced on the fly where needed for the F-statistic. In SPM96 the statistical analysis code for the two modalities was merged, and this bug is an oversight from the merger.)
Fix: The fix is to always let the block partition model the constant term. For single subject designs this is acheived by including a column of ones as a dummy variable for a constant term, for multi-subject designs this is acheived by not constraining the block effects to sum to zero.
Modify the block effect code in lines 269--270 of spm_spm_ui.m
v1.15.1.1, and delete lines 548,556. The fixed version (v1.15.1.2) differs from v1.15.1.1 as follows:
fil % sccs diffs -r1.15.1.1 spm_spm_ui.m 267,276c267,273 < %-Always model block (subject) effects if possible < %----------------------------------------------------------------------- < if (nSUBJ == 1) | (nSUBJ == q) %-Unestimable effects < B = []; Bnames = []; < else < %-Use implicit SumToZero constraints via relative block effects & < % MatLabs pinv. See spm_DesMtx for more information on this. < %--------------------------------------------------------------- < [B,Bnames] = spm_DesMtx(iSUBJ,'+0m','SUBJ'); < end --- > %-Always model block (subject) effects > %----------------------------------------------------------------------- > if (nSUBJ == 1) | (nSUBJ == q) > B = ones(q,1); Bnames = 'Constant'; > else > [B,Bnames] = spm_DesMtx(iSUBJ,'-','SUBJ'); > end 548,556d544 < < %-Include a constant term in G if H isempty < %----------------------------------------------------------------------- < if ~size(H,2) < K = ones(q,1); Knames = 'Constant'; < G = [G K]; < if isempty(Gnames), Gnames = Knames; < else Gnames = str2mat(Gnames,Knames); end < end
Thanks: to Thomas White for reporting this bug.
Download: spm_spm_ui.m
v1.15.1.2, to replace v1.15 as shipped with SPM96b.
-andrew 06/02/97
spm
v1.25: Watermark & Progress bar.
Synopsis: The "watermark" in the interactive window slows down the redrawing of the progress bar.
Description: The "SPM96" watermark in the interactive (bottom-left) SPM window needs redrawing every time the progress bar is updated. This takes a considerable amount of time, and slows SPM down considerably!
Fix: Lose the watermark, or make it temporary. The fixed version (v1.26) differs from v1.25 at line 278 as follows:
fil % sccs diffs -r1.25 spm.m 278c278 < spm_figure('WaterMark',Finter,spm('Ver'),'NoDelete',45), fprintf('.') --- > spm_figure('WaterMark',Finter,spm('Ver'),'',45), fprintf('.')
Thanks: to John Ashburner & Thomas White for reporting this bug.
Download: spm.m
v1.26, to replace v1.25 as shipped with SPM96b
-andrew 17/01/97
spm_projections_ui
v1.11: Occasional problems with eig
.
Synopsis: eig
gives some problems (ML4.2c/Sol2.4).
Fix: Use svd
instead.
The fixed version (v1.11.1.1) differs from v1.11 at line 106 as follows:
fil % sccs diffs -r1.11 spm_projections_ui.m 106c106 < [e v] = eig(J); --- > [e v d] = svd(J);
Download: spm_projections_ui.m
v1.11.1.1, to replace v1.11 as shipped with SPM96b
-karl ??/03/97
SPM96_RFX:
A basic random effects kit for SPM96
-released 20th February 1998
Introduction
SPM only models residual variance, and therefore only fits and assesses fixed effects models. In studies with repeated measurements of a condition, and where there is subject-by-contrast interaction, a fixed-effects analysis is limited to the inferring about the effects on these subjects during these scanning sessions. Inference does not extend to the populations from which the subjects were drawn. Thus, all fixed-effects analyses are basically case studies. This is particularly a problem for group comparisons, and (paradoxically) in fMRI, where the inter-scan variability within an imaging session is very small in comparison to the variability of responses from subject to subject.
In general mixed effects models (with both random and fixed effects) are difficult to analyse. However, in functional neuroimaging the models are fairly simple, balanced, and the only random effect of concern is the subject by condition interaction: Further, the models are seperable into individual subject models. This enables a basic mixed effects analysis to be easily be carried out in two stages, corresponding to the two levels of variability in question. The first level is the intra-subject level, the second the inter-subject (intra-population) level.
The key is to avoid repeated measures: If we have only one scan per condition per subject, then the residual variance incorporates the appropriate inter and intra-subject variance components, and effects a mixed effects analysis appropriate for population inference. With repeated measures the trick then is to collapse over replications to give a single summary image representative of each condition for each subject. Such collapsing may be as simple as a straight mean of the replicate observations, or can be a sophisticated weighted mean of adjusted data effected via the General Linear Model, enabling removal of confounds.
A basic random effects kit for SPM96
To enable random effects analyses suitable for population inference to be carried out within SPM96, we have produced a `kit' of routines to assist in producing appropriate summary ajusted condition images.
Downloading and installation instructions
The kit is available from ftp://ftp.fil.ion.ucl.ac.uk/spm/spm96_RFX.tar.gz (29Kb), and contains:spm_adjmean_ui.m
(v1.5.1.1)- Produces adjusted means for PET (independent) data.
spm_adjmean_fmri_ui.m
(v1.2.1.1)- Produces adjusted means for fMRI data.
spm_RandFX.man
(v1.3)- Basic overview of the kit, and `recipe' for use.
spm_hrf.m
(v1.2)- Approx HRF for fMRI.
spm_sptop.m
(v1.7)- SParse TOePlitz update. (v1.2 came with SPM96)
- ...and also a includes updates to two interface routines, allowing easy launching of the new programs:
spm.m
(v1.26.1.2)- "Mean" button now "AdjMean", & calls
spm_adjmean_ui
orspm_adjmean_fmri_ui
according to the current SPM mode, PET of fMRIspm_help.m
(v1.15.1.2)- Menu topic changed to reflect new AdjMean button
To install: move to the directory where you want the files to reside, download the GNU-zipped tar file spm96_RFX.tar.gz, and unpack with the UNIX command gzip -dc ./spm96_RFX.tar.gz | tar -xvf - Then make sure that this directory preceeds the SPM96 installation on your MatLab search path (help path in MatLab for details).
Since spm_sptop.m (v1.7), spm.m (v1.26.1.2) & spm_help.m (v1.15.1.2) are backwards compatible with the versions supplied with SPM96, so the SPM96 random effects kit can be installed over an SPM96 installation.
References
- A paper is currently (20/02/1998) in preparation.
- A poster titled Generalisability, Random Effects & Population Inference was presented at the 4th International Conference on Functional Mapping of the Human Brain, with abstract published in NeuroImage.
- The
spm_RandFX.man
file contained in the kit contains a basic overview and recipe for use. - In the interim, you are referred to the relevant correspondance on the SPM disussion list: Messages are archived at the UK's Academic MailBase facility (Queries are included in replies where relevant, so only the (APH) replies need be looked up):
- Eric Zarahn raising the issue in 1996
- http://www.mailbase.ac.uk/lists/spm/1996-05/0026.html
- Discussion with Jack Van-Horn: concerning appropriate variances...
- http://www.mailbase.ac.uk/lists/spm/1997-11/0011.html (JV-H)
- http://www.mailbase.ac.uk/lists/spm/1997-11/0015.html (APH)
- http://www.mailbase.ac.uk/lists/spm/1997-11/0028.html (JV-H
- http://www.mailbase.ac.uk/lists/spm/1997-12/0005.html (APH)
- http://www.mailbase.ac.uk/lists/spm/1997-11/0015.html (APH)
APH to Eric Zahrahn: Subject by task interactions & group by task interactions...- http://www.mailbase.ac.uk/lists/spm/1997-12/0031.html (APH)
Discussion with Darren Gitelman: adjusting images...-
http://www.mailbase.ac.uk/lists/spm/1998-01/0001.html (DG)
- http://www.mailbase.ac.uk/lists/spm/1998-01/0036.html (APH)
Dsicussion with Andy Saykin: Multisubject and Between Group fMRI Analyses... (one scan per condition per subject)...-
http://www.mailbase.ac.uk/lists/spm/1997-12/0004.html (AS)
- http://www.mailbase.ac.uk/lists/spm/1997-12/0006.html (KJF)
- http://www.mailbase.ac.uk/lists/spm/1997-12/0013.html (APH)
- http://www.mailbase.ac.uk/lists/spm/1997-12/0006.html (KJF)
Thanks
- ...to Jack Van-Horn
- for resurrecting the issues, prompting action!
- ...to Keith Worsley
- for reminding me of the summary measure approach to repeated measures
- ...to Darren Gitelman, Andy Saykin (& Sterling Johnson)
- for beta testing the software & for useful discussions
- ...to Geoff Aguirre & Eric Zahrahn
- for useful discussions
- ...to John Watson
- for supporting the development of some of this work
- ...and to Karl & John
-andrew 20/02/1998
SPM96_ER:
Event related fMRI kit for SPM96 -upgrading SPM'96 to SPM'97
-released 31st July 1998
Introduction
The event-related fMRI "kit" for SPM96 upgrades SPM96 for event related fMRI using basis functions of peri-stimulus time to model responses to single events within the standard SPM framework of the General Linear Model.
This "kit" upgrades SPM'96 to have the functionality of SPM'97, the (unreleased) Matlab4 version of SPM implementing event related fMRI, which has been cited in the literature. The combination of this kit and SPM'96 should be referred to as SPM'97.
The kit provides an updated interface for SPM96 fMRI stats, incorporating event related fMRI, along with appropriate extended plotting routines and various utility functions. There are also improvements for block-mode fMRI designs, such as additional options (time and global by condition interactions) and convolution of reference functions with a synthetic haemodynamic response.
Overview: event-related fMRI (efMRI) in SPM'97
SPM'97 offers the possibility to analyse efMRI studies. The basic concept is identical to blocked fMRI analyses, using the GLM. The difference is only the design matrix and the plotting routines. In the current implementation SPM creates a sparse matrix n x t for n events over time t. This matrix is created with a temporal resolution of 100 msec. The events are modelled as delta functions ('ones' in this matrix). This matrix containing ones modelling an event and zeros elsewhere is then convolved with the basis function(s) you specify. This is still done at 100 msec resolution. Since there is only a single observation per scan and this is likely to cover more than 100 msec, the matrix is downsampled to match the TR that has been entered. The user's choice is mainly the set of basis functions to be used:
- Fourier set
- sines and cosines
- Windowed Fourier set
- sines and cosines windowed with a Hanning window
- Gamma functions
- set of three gamma functions (early, middle and late)
- Gamma functions with derivates
- as above plus the derivatives
- HRF
- synthetic hemodynamic response function
- HRF + derivative
- as above plus the partial derivative with respect to time. This can model shifts of the HRF in time.
- HRF + temp. deriv & dispersion derivative
- as above, plus the partial derivative with respect to the dispersion parameter of the gamma function. This can model 'sharper' or 'flatter' responses
- Fourier set
SPM will create an additional *.mat file (ER.mat) for this analysis. Load this file and plot the variable DER to see the basis function(s) you have used.
The plotting routines have been extended to cope with efMRI analyses. You can plot the estimated HRF time locked to the events. This menu offers several options:
- Plot the modelled response only
- As above but with the SEM
- As above but with the SEM for the onset of the response
- Plot the modelled response and the data points
General guidelines & references
Events can be equally or unequally distributed over time. In the former case you only have to specify the time between two events. In the latter case SPM expects a vector of time points when events occured. SPM expects time in scans [i.e. an event at 10 seconds with a TR of 4s has to be entered as 2.5 (TRs)]. Differences between events can be estimated in two ways: Using t-statistic when comparing two events modelled by a single basis function (eg. HRF alone). Howver,this gets problematic if you model your events as a linear combination of more than one basis function (eg. Fourier set). In this case you can use the F-statistic and the option 'model differences'. If you model your events as 'HRF alone' you choose the option 'all events' and test for differences with contrasts.
- Theory and implementation...
- Event-related fMRI
- Josephs O, Turner R, Friston KJ (1997)
Human Brain Mapping 5:243-248- Event-Related fMRI: Characterizing differential responses
- Friston KJ, Fletcher P, Josephs O, Holmes AP, Rugg MD, Turner R (1998)
Neuroimage 7:30-40- Non-linear extension...
- Nonlinear event-related responses in fMRI
- Friston KJ, Josephs O, Rees G, Turner R (1998)
Magnetic Resonance in Medicine 39:41-52- Application...
- Brain systems mediating aversive conditioning: an event-related fMRI study
- Büchel C, Morris J, Dolan RJ, Friston KJ (1998)
Neuron 20:947-957- Theory and implementation...
The event related fMRI kit for SPM'96
The kit is available from ftp://ftp.fil.ion.ucl.ac.uk/spm/spm96_ER.tar.gz (22Kb), and contains:
spm_efmri.man
(v1.2)- Overview of the kit and it's use.
spm_AnCova.m
(v1.6)- replacing v1.4 of SPM96
spm_Volt_W.m
(v1.1)- Volterra kernels (new)
spm_fmri_spm_ui.m
(v1.35)- fMRI stats interface update (v1.17 came with SPM96)
spm_graph.m
(v1.17.1.1)- Updated plotting routines for efMRI (v1.3 came with SPM96)
spm_graph.m
(v1.17.1.1)- Plotting routines updated for efMRI and error bars (v1.3 came with SPM96)
spm_graph_ui.m
(v1.1)- User interface for plot customisation (new)
spm_hrf.m
(v1.2)- Approx HRF for fMRI (new - also included in RandFX kit)
spm_results_ui.m
(v1.10.1.1)- Updated results interface (v1.7 came with SPM96)
spm_spm.m
(v1.32)- Updated core stats module (v1.23 came with SPM96)
spm_sptop.m
(v1.7)- SParse TOePlitz update. (v1.2 came with SPM96 - also included in RandFX kit)
NOTE: Since this "kit" includes an updated interface for block fMRI analyses, which gives slightly different results to SPM96 (although results files are cross-compatible between the two implementations), we recommend you maintain the integrity of your SPM96 installation and install this kit in a seperate directory to SPM96. Place the directory containing this kit before SPM96 on your Matlab path when you wish to use the updated SPM97 event related or the updated block fMRI interface, and refer to this combination as SPM97 in correspondance.
To install: move to a new directory where you want the files to reside, download the GNU-zipped tar file spm96_ER.tar.gz, and unpack with the UNIX command gzip -dc ./spm96_ER.tar.gz | tar -xvf - Then make sure that this directory preceeds the SPM96 installation on your MatLab search path (help path in MatLab for details).
Credits...
Event related fMRI for SPM was developed by Oliver Josephs, Karl Friston and Christian Büchel. The "kit" upgrading SPM96 to SPM97 was compiled and tested by Christian Büchel and Andrew Holmes. Thanks also to our beta testers.
-andrew 31/07/1998
SPM96: User contributions
This section describes user contributed functions, extensions and ports for SPM. Each contribution has a subsection written by the author. The SPM authors are not responsible for this code! However, most contributors do read the SPM email discussion list, so discussion of these contributions is best staged there alongside "official" SPM.
SPM96 contributed files are available from our anonymous FTP server in the spm96_contrib
Contributions should be accompnied by a description along the lines of those below, including installation, configuration, and usage instructions. These can be left in our anonymous FTP upload area: ftp://ftp.fil.ion.ucl.ac.uk/in. eMail spm@fil.ion.ucl.ac.uk detailing your contribution, and we'll put it up here.
- SPM96 modifications for DEC Alpha Matthew Brett
Minor port & modifications to run SPM96 on DEC AlphaStation under DEC UNIX - Matthew Brett's SPM96 utilities Matthew Brett
(offsite link to ftp://ftp.mrc-cbu.cam.ac.uk/pub/imaging/matthew.brett/) - Disp_Analyze: Analyze image viewer Emmanuel Stamatakis
Matlab function utilising the SPM toolbox to display an analyze image as a matrix of transverse slices.
(offsite link to http://jura.stir.ac.uk/viewer/) - SPM96 for WindowsNT4 under MatLab5
Vijay Dhawan & Phoebe Spetsieris
SPM96 modified to run in Matlab5 under WindowsNT4
SPM96 modifications for DEC Alpha
Overview & Description:This contribution contains a minor port of SPM96 to DEC Unix. I have not attempted a complete test of SPM, but in my hands (analysing only PET data), it runs without complaining. I have tested it on a DEC AlphaStation 200, running DEC UNix 4.0 (rev 386), and 4.0A (464). There are still some problems; text in the input routines is sometimes displayed truncated, and the menu / text input routines will not accept defaults without some selection / placebo editing. I haven't attempted to look at these; they seemed quite minor.
Installation: If you want to extract the dec archive onto a pre-existing standard spm96 installation, then you will need to allow write permission first. Type 'chmod u+w *.m' to allow the files to be updated. Then extract the spm96_dec archive into the directory with the SPM 96 standard distribution. You may want to restore write protection with 'chmod u-w *.m'. The archive is a gzipped tar file containing byte swapped image headers, modified m-files (see below), compiled mex files,and some small byte swapping routines. The byte swapping script is called byte_conv_imgs. Below are some notes on the changes that I have made, in the archived files, to the standard distribution.
Usage: Hey, it's just SPM!
Details: ...are given in the README file.
Download: ftp://ftp.fil.ion.ucl.ac.uk/spm/spm96_contrib/spm96_dec.tar.gz
(116kb>
SPM96 port to WindowsNT4 under MatLab5
Overview & Description: Dr. Phoebe Spetsieris, working with Dr Vijay Dhawan at the Functional Brain Imaging laboratory of North Shore University Hospital, Manhasset, NY, has successfully ported SPM'96 to Windows NT 4.0 on an Intel PC platform, in Matlab 5.0.
A significant number of changes had to be implemented for this to work. Although not all features have been tested, the results for typical PET data sets previously analyzed on our SUN Ultra SPARC 1 were identical (within round-off errors). A few lingering problems for which temporary solutions have been provided are being looked into. The software is undergoing final testing/documentation and will be released within a few weeks.
The PC platform was a Pentium Pro 200 with 128 MB RAM and a 2GB SCSI ultra wide disk. The C compiler was Watcom C/C++ (version 10.6) and MATLAB 5.0 was utilized. The initial benchmarks against a similarly configured SUN Ultra SPARC 1 suggest a 20% faster performance on the PC platform. As North Shore does not have an FTP site yet, we can only transfer this package to other FTP sites. We have therefore arranged with Drs. Friston/Holmes for this package to be posted here on the original SPM FTP site so that any user can download the software from there.
Details of the port, on installation and usage are given in the README.NT file supplied with the distribution.
Download: ftp://ftp.fil.ion.ucl.ac.uk/spm/spm96_contrib/spm96_nt.tar.gz
(5.7Mb)