ROI Toolbox Docs

Documentation: img2txt (roi_list.m)
--------------------------------------------
Jeff Cooper
12/13/02

1. Summary

roi_list.m is a script which converts ANALYZE format .img files into
.tal files, which are text files containing the XYZ coordinates of 
nonzero voxels in a particular image.  It’s used as a utility in the
ROI Toolbox, since several of the functions in the Toolbox require .tal
files as input.
	This utility features a reverse utility as well, txt2img, which
transforms .tal files into .img files.  Interested users are referred
to the docs for that script, txt2img_readme.txt.
	PLEASE NOTE that the .tal/.img distinction is completely separate
from the MNI-space/Tal-space distinction, and thus NOTE that a .tal
file may contain coordinates in MNI space or in Talairach space.  We 
maintain the .tal extension (as opposed to something less confusing, 
like .coord) for compatibility with SPM, which uses the .tal extension
for its small volume correction masks. 

 
2. Usage

roi_list
roi_list(imgs)

roi_list may be run either from the command line or with the ‘img2txt’ 
button in the ROI Toolbox.  If it is run from the command line, it may
be used with or without arguments; it optionally takes one argument,
a cell array of strings containing filenames of the image files to 
be converted.  If it is run without arguments, or from the Toolbox button,
the user is simply asked to select the .img files he or she wants to
convert with the standard SPM file selection window.
	Once the list of .img files has been selected, the program runs,
automatically producing .tal files of the same name as the selected .img 
files (so given an ROI image of the name ‘r_pfc_1.img,’ the script would
produce a .tal file of the name ‘r_pfc_1.tal’).  Each .tal file is 
automatically produced in the same directory as its corresponding .img
file.  As each file is produced, a text message is printed to the console
notifying the user as to the location and filename of each .tal file.


3. Output

roi_list produces one .tal file for each input .img file, in the same 
directory as the .img file and with a corresponding filename.  These .tal
files are text files in three columns, where the first column is x 
coordinates, the second is y, and the third is z, and each row represents
a single nonzero voxel in the .img file.  These files are required as
input into several ROI Toolbox scripts.


4. Last Bits

roi_list.m was written as part of the Gabrieli Lab ROI Toolbox,
a package of utilities to examine ROI data in SPM.  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...

