Integration of AFNI with DTI-Query
DTI-Query is a software package for computing and displaying tractography path information for diffusion tensor imaging data. The software was written by David Akers and Anthony Sherbondy at Stanford University. It is available on most computing platforms that are widely used today including Mac PowerPC and Intel versions, Linux (32 and 64 bit versions), Cygwin and Windows 32-bit versions.
Download the programs here for the appropriate platform you are using
http://graphics.stanford.edu/projects/dti/dti-query/
Once downloaded, extract the software using this command:
tar xzvf dtiquery_macppc_bin.tar.tgz (use the appropriate version for your platform)
Note, if you would rather proceed from source code, follow the notes here for help:
http://afni.nimh.nih.gov/sscc/dglen/DTIQueryCompiling
DTI-Query reads tensor data as its input in NIFTI-1 format. The file format matches the output of the 3dDWItoDT program in AFNI. Here is an example of the 3dDWItoDT command to use.
3dDWItoDT -prefix DTIdata.nii -reweight -sep_dsets gradient.1D DWIdata.nii
This will create several files including DTIdata_DT.nii.
An "automask" file can also be generated based on either the B0 sub-brick in the DWI data or the FA data output from the 3dDWItoDT step above.
3dAutomask -prefix automask.nii DTIdata_FA.nii
To compute the fiber tractography, use DTI-Query dtiprecompute_gui ("open dtiprecompute_gui.app" on the Mac) or the command-line version dtiprecompute_cmd. The command-line version can be easily used in a script with other AFNI commands. To get started, I'd recommend using the GUI form first. This is an example of using the command-line version:
dtiprecompute_cmd -t DTIdata_DT -o . -m automask.nii
Next to display the computed fiber paths, use the DTI-Query program:
dtiquery &
On a Mac, do this instead,
open dtiquerypath/dtiquery.app
or select the application using the Finder. It can also be placed in the dock for convenience.
In the DTI-Query GUI, one can save computed paths as either paths or volumes. The volumes are saved in NIFTI format (at the resolution of the background image) and can be viewed in the AFNI GUI and the AFNI Render New plug-in. Each voxel is given a value corresponding to the number of fibers passing through that voxel. One can also use 3dROIstats to compute mean FA over paths computed by DTI-Query. More complex manipulations can also be done with familiar tools like 3dcalc.