*****************************************************************
ROI Toolbox Overview
*****************************************************************

    The ROI Toolbox is a pushbutton user interface to many handy
programs for artifact detection/rejection, generating ROIs, and analyzing data
that is in an ROI. It also contains various utility programs.
There are a few programs in the toolbox that were written outside of the
gablab and the URLs for those programs can be found below.  There is a
very brief description of each program below however you can access detailed
descriptions and usage from the program help button. If you have any questions
or comments about the Toolboxs functionality or usage, please ask Sue.  email:  swg@mit.edu


************************
Opening/Closing the Toolbox
************************ 

-  Open: Start MATLAB and add the BIT programs to your path.
         At the MATLAB prompt, type roimod2.

  - Opening from Stanford: Start MATLAB with the spm2-devel command at a 
    UNIX command prompt.  At the MATLAB prompt, type roimod2.
    (The command spm2-devel sets all MATLAB paths correctly.
    For Matlab version 7.0, spm3-devel sets the MATLAB paths correctly.)

    - Closing: Click the x button in the upper-right hand corner, like a regular 
    window.  


*************************
Section: Artifact Detection 
*************************
These tools help you find scanner artifacts or outliers in your data caused by radical 
head motion or scanner mishap, and repair or remove them. The "Artifact protocol" button
in the Toolbox gives a description of how these repairs work with the SPM analysis.

 -Global Variate checks for outlier volumes and returns the indeces of those images exceeding user specified thresholds.

 -Contrast Movie allows a user to view all the data, voxel by voxel.

 -Slice Repair checks for outlier slices, and offers repair methods.

 -Movement Parameters allows a user to check for total motion.

 -Task Correlation checks the correlations between the movement params and the task.

 -GlmMask bypasses spm_global routine that generates the mask.img and lets the user explicitly define a mask to get full brain coverage in 1st level satistics.

      
*************************
Section: Display
*************************
These tools provide several different ways to visualize your region of 
interest in an interactive fashion or in one suitable for printing.

 -Display ROIs shows one or more ROIs in 3D interactive overlayed on a background image.

 -Display Slices shows the same thing as a montage of slices. 
  Author: Mathew Brett:
  URL: http://www.mrc-cbu.cam.ac.uk/Imaging/Common/display_slices.shtml

 -Render activates a sooped up version of SPM's rendering:
  Summary: Improved version of the Render->Xtract Brain function, which allows user to create render*_.mat file containing any number of general 3D views of general cuts of the extracted brain
  Author: Tom Sieger
  URL: http://www.neuro.lf1.cuni.cz/spm/spm_xbrain_3d.html




*****************************
Section: Anatomical ROIs
*****************************
These tools generate and manipulate anatomically-based regions of interest.

 - Tal or MNI ROIs can generate an ROI in MNI space starting from the MNI atlas or the 
   Talaraich atlas. The atlas is the WFU_PickAtlas, which includes the conversion of 
   Talaraich coordinates into MNI coordinates (so Brodmann areas have MNI locations).
   Author: Joseph Maldjian
   URL: http://www.fmri.wfubmc.edu/download.htm



 - XYZ_rois generates a box ROI based on specified x, y, and z limits in millimeters. 

 - Tal ROI to MNI converts Talaraich coordinate ROIs from the Talaraich Daemon into MNI
   images. 


*****************************
Section: Utility Programs
*****************************
These programs are automated tools for common user functions.

 - Find Anatomy Names finds names  (hemisphere, lobe, Brodmann area)  for one or more 
   [XYZ] points in MNI space using the WFU_PickAtlas database.
 
 - Contrast Copier collects contrast images from different subjects and puts them in
   a single folder. A convenient program for 2nd analyses, eg to correlate fMRI data with behavioral data.

 - Create Head Mask automatically generates a reasonable full-head mask. Designed to 
   eliminate the wrap-around artifact in spiral scan data.
   
 - Fix Bad Pathnames. When files are moved or old files are restored, the names embedded
   in SPM.mat are not valid. This program (modifySPM2.m) can repair the file names.
 
 - Dump SPM to Anatomy dumps voxels from SPM Results/Volumes table, and names all the points.
   Allows the user to identify anatomy locations of active SPM cluster regions.


*****************************
Section: Talairach Atlas
*****************************
These programs allow direct use of the Talairach Atlas (instead of WFU_PickAtlas).

- Dump SPM to Tal  (glassbrain2.m) creates a list of points in Talairach space from
  a cluster region in SPM. Like Dump SPM to Anatomy, but this one returns only the Tal
  coordinates, suitable for input to the Talairach Daemon.

- Tal stats summary (sum_coord.m) summarizes an output file generated by the Talairach 
  Daemon program.



*************************
Section: ROI Analysis
*************************
These tools extract statistics, time course histories and measures of activation 
within a region of interest (specified by an .img or .tal file) over an entire timecourse
of images.

- ROI stats finds mean, min, max, and variance of data in an ROI for each image in a series.
  ROI is defined by a .img file.

- ROI Extract finds the mean intensity of an ROI for each user specified image. ROI
  is a .tal list of coordinates.

- Run Xbeta is a utility program to run roi_stats on multiple beta files. A good program 
  to correlate fMRI data with behavioral data.

- ROI HRF Estimate can estimate the HRF responses to different conditions within an ROI.

- MARSBAR is an outside package written by Mathew Brett with similar ROI functionality.

- ROI Time Series Analysis is an interactive display of timecourses from single voxels or ROIs. It also
  provides signal processing options and displays percent signal change for all specified conditions.



*************************
Section: Voxel Coordinate Conversion
*************************
An ROI can be expressed as:
     - An image of 1's and 0's. ( .img file )
     - A list of points in MNI space  ( .txt file ) in mm units.
     - A list of points in Talaraich space ( .tal file ) in mm units.
     - A list of points in single subject space.
The tools in this section work together to allow conversions between these spaces.

- img2txt converts an ROI img ( in MNI space ) into list of points (.txt file.)

- txt2img converts a list of points in MNI space into a .img file. Program asks for
  a sample image in order to set the voxel size and image dimensions.

- mni2tal converts a list of points in MNI space to a list in Talaraich space (.tal file). Uses Mathew Brett's conversion.

- tal2mni converts a list of points in Talaraich space to a list in MNI space. It
  appends _mni to the filename in its translation process. Uses Mathew Brett's conversion.

- Reverse Norm converts a list of points in MNI space to a list of points in
  single subject space by performing a reverse noramlization with the (_sn.mat) calculated by SPM.

