ROI Toolbox Docs

Documentation: XYZ_rois (roi_xyz.m)
--------------------------------------------
Jeff Cooper
12/16/02

1. Summary

roi_xyz is a script which allows users to create an ANALYZE-format
.img file specifying a cubical region of interest with user-specified
dimensions.  This is primarily useful if the user has an a priori 
hypothesis about particular voxels that should be activated, perhaps
from a previous study.  The user inputs x, y, and z limits for their
cube, and then selects a template image by which the mm coordinates
are transformed into an image file (see txt2img_readme.txt for 
details on the mm-to-voxel conversion process).

2. Usage

roi_xyz

The script can be used either from the command line or from the
XYZ_rois button in the ROI Toolbox.  Either way, the user is first
prompted for X, Y, and Z limits in order, each time from the SPM
Interactive window.
	Each limit is entered the same way.  The limits are entered
in millimeters, so a pair of numbers represents a range of millimeters
of brain to be included in the image.  The numbers should be entered
separated by whitespace or by a comma, e.g., (12 16) or (-24 -18).  The
first number in each pair should always be lower and/or more negative
than the first  it is always interpreted as the lower bound of the
range.  So a user might enter in Xlim = 18 24, YLim = -28 -18, 
ZLim = -8 12 as valid ranges.
	The user is then asked to pick an output filename; this name
should not include an extension.  A .tal file (coordinate set) will
be saved in the present working directory with this filename.
	Now that the user has a coordinate set, he or she must convert
it into an image file, and so the user is then asked to choose a 
template image for the new image file.  The new, output image file
will have the same voxel size, dimensions, etc. as the template image.
	The user then chooses an output directory for the new image
file, and the new .img file is saved there with the chosen filename.


3. Output

The roi_xyz scripts primary output is an ANALYZE-format image in the 
chosen output directory, which is a standard ROI image  all zeros outside
the region of interest, all ones within it.
	The script also produces a .tal file of the ROI in the present
working directory as a byproduct.
 


4. Last Bits

tal_roi.m was written as part of the Gabrieli Lab ROI Toolbox,
a package of utilities to examine ROI data in SPM99.  It requires 
several functions in both of those packages to be 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...

