ROI Toolbox Docs

Documentation: SPM Tal Stats (glassbrain2.m)
--------------------------------------------
Jeff Cooper
12/17/02
Program converted to glassbrain2.m for SPM2.

1. Summary

glassbrain.m is a script which, when run while a set of SPM
results are currently displayed, dumps the complete set of
activated coordinates into a text file and converts them
into Talairach-space coordinates (from the MNI space of 
SPM results).  This text file is then suitable for input
into a coordinate look-up database, such as the Talairach 
Daemon program, to find out the anatomical location of 
particular clusters of functional activation.
	The script must be run while SPM is currently displaying
results, as the script assumes that certain variables are 
available in the workspace.  If results aren’t being displayed,
this script results in an error.
	The script only dumps Tal-space coordinates into the
text file, and dumps the complete list of coordinates in,
without any indication as to which voxels are in which clusters
or what their p-values are.  This renders it workable for the 
Talairach Daemon. 
       A significantly more sophisticated
version of this script is now available, which notes which 
clusters voxels belong to, as well as their original 
coordinates, p-values for set-, cluster- and voxel-levels,
and more – if you’re interested, contact Sue Whitfield 
(suewhit@stanford.edu) or Jeff Cooper(jcooper@stanford.edu)
in regards to glassbrain3.

2. Usage

glassbrain

glassbrain can be run either from the command line or the 
‘SPM Tal Stats’ button in the ROI Toolbox.  It may only be 
run while SPM’s results section is currently displaying; there
should be a maximum intensity projection in the graphics 
window and the results control panel in the SPM interactive
window to allow this script to run correctly.
	When run, this script operates without feedback, and
it always dumps its output text file to the present working
directory.

3. Output

glassbrain.m produces a single text file each time it’s run, in
the present working directory, and with a filename based both
on the name of the contrast currently being viewed and the 
thresholds used in the current contrast.
	The output file consists of three columns of x, y, and 
z coordinates in mm, respectively.  Each row represents a single
activated voxel in the current results.  The coordinates in the
output file are in Talairach space, not MNI space, and so they
will differ from the ones displayed in the Results window (see
mni2tal_readme.txt or tal2mni_readme.txt for information on
the MNI-Tal space conversion issue).  As well, the SPM Results
window usually only displays information for a few voxels in
each cluster; this output file will contain coordinates for
every activated voxel in a cluster.
	This output file is suitable for input into the 
Talairach Daemon, which (I think) has a multiple-voxel
input mode which accepts text files like this one.

4. Last Bits

glassbrain.m was written as part of the Gabrieli Lab ROI Toolbox 
as an adjunct to the SPM99 brain analysis package.  It requires
several other functions in both of those packages to run.

This code is in a very fluid state of development, and any suggested
modifications are welcomed and invited.  Please contact Jeff Cooper
in the Stanford Psychology Department at jcooper@stanford.edu with 
any questions about usage, bug reports, or suggestions for further
revision.  Good luck...

