A note for TORTOISE users interested in using this tractography:
TORTOISE outputs via DIFF_CALC have slightly different naming and file conventions than `3dDWItoDT -sep_dsets'. The various inputs to new AFNI tractography programs (3dTrackID, 3dDWUncert, 3dProbTrackID) are mostly assumed to have come from 3dDWItoDT... But never fear! I believe that there will soon be an option in the DIFF_CALC to output with these particular conventions in mind. Until then, I've written a very simple bash script to convert the outputs of TORTOISE's DIFF_CALC to match the files for AFNI-tracking. I called the file `convert_TORT_AFNItrack.sh', and the text of it is included at the bottom of this message below the dotted line (so you can make your own such file by copy-and-paste-ing).
The script takes two options-- the prefix of the TORTOISE *.nii files and whatever name you want to be a prefix for the new ones it creates (which are zipped themselves so as to take up less space). If your TORTOISE files are zipped NIFTI files (*.nii.gz), then you can put a third option in the commandline (including quotation marks): ".gz" .
To use, one then simply enters the following in a commandline:
bash convert_TORT_AFNItrack.sh [Tortoise prefix] [AFNI prefix] ".gz"
This assumes that you've asked DIFF_CALC to output eigenvalues (*_EV.nii), eigenvectors (*_EG.nii), fractional anisotropy (*_FA.nii), and trace (*_TR.nii), which is simply converted to mean diffusivity (MD). Please let me know if there are any difficulties with this.
Thanks,
pt
(cut and paste from below this dotted line (not including the line!) to make your own
convert_TORT_AFNItrack.sh script)
-----------------------------------------------------------------------------------------------------------------------
#!/bin/sh:
# convert *.nii output of TORTOISE DIFF_CALC to format for AFNI tractography
# simply putting in the input (TORTOISE) prefix, then the output (AFNItrack) prefix,
# and one can also convert *.nii.gz files by having a third option: ".gz"
# EXAMPLE USE:
# bash convert_TORT_AFNItrack.sh TORT_NAME AFNI_NAME ".gz"
TORTPREF=${1} ; AFNIPREF=${2} ; POSTFIX=${3}
# FA
3dcalc -a ${TORTPREF}_FA.nii${POSTFIX} -expr 'a' -prefix ${AFNIPREF}_FA.nii.gz
# first eigenvalue
3dcalc -a ${TORTPREF}_EV.nii${POSTFIX}[0] -expr 'a' -prefix ${AFNIPREF}_L1.nii.gz
# mean diffusivity = trace/3
3dcalc -a ${TORTPREF}_TR.nii${POSTFIX} -expr 'a/3.0' -prefix ${AFNIPREF}_MD.nii.gz
# eigenvectors
3dcalc -a ${TORTPREF}_EG.nii${POSTFIX}[0..2] -expr 'a' -prefix ${AFNIPREF}_V1.nii.gz
3dcalc -a ${TORTPREF}_EG.nii${POSTFIX}[3..5] -expr 'a' -prefix ${AFNIPREF}_V2.nii.gz
3dcalc -a ${TORTPREF}_EG.nii${POSTFIX}[6..8] -expr 'a' -prefix ${AFNIPREF}_V3.nii.gz
echo "Done copying/renaming"