3dTrackID after TORTOISE processing

AFNI version info ( afni -ver):
Precompiled binary macos_10.12_local: Mar 18 2026 (Version AFNI_26.0.10 'Pupienus Maximus')

Hi experts

I'm relatively new at DTI analysis.

I have processed my DTI with TORTOISEv4

I wanted to do some tracking to compute connectivity between ROI

I'm not sure what the input should so I use ${subj}_AP_TORTOISE_final_L1_DT.nii which has 6 subbriks.
Is this correct?

I used this and got the error below:


	3dTrackID									\
		-overwrite								\
		-mode DET								\
		-mask structural_0.nii			\
		-netrois ${ROI}					\
		-dti_in ${subj}_AP_TORTOISE_final_L1_DT.nii							\
		-prefix Tract_ROI_DET			\
		-logic AND								\
		-algopt ../scripts/ALGOPTS_DET.niml.opts \



++ ROI logic type is: AND
++ Tracking mode: DET

++ Number of ROIs in netw[0] = 8
++ No refset labeltable for naming things.
++ SEARCHING for vector files with prefix 'CFS_124_AP_TORTOISE_final_L1_DT.nii*':
	FINDING:	** FATAL ERROR: Can't open dataset: 'V1' file
** Program compile date = Mar 18 2026

Howdy-

For some background and reference information on this, there is this step-by-step FATCAT+TORTOISE demo documentation, which is still largely applicable even with the latest TORTOISE version. There are also these FATCAT recordings from a previous AFNI Bootcamp. And there is this paper on tracking with 3dTrackID, including mini-probabilistic tracking and full-probabilistic tracking and direct connections with TORTOISE.

In your specific command, the issue is with using -dti_in ... This is meant for providing the prefix of a set of DTI-based features, like the V1 (1st eigenvector), L1 (first eigenvalue) FA (fractional anisotropy) and MD (mean diffusivity) volumes. When you use AFNI's 3dDWItoDT to estimate a tensor from a DWI dataset, these are all created, and you would provide the root-prefix part that is common to all of them, like with -dti_in DT_BASENAME. That will allow the program to find all of the necessary pieces for tracking+statistical reporting.

There is also the consideration that different software use different sign conventions of what negative signs mean in DWI bvectors. This is similar to the differences in how orientation strings in volumetric datasets are required to interpret signs in values. The role of AFNI's @GradFlipTest is to make sure when you are bringing in data from different software for tracking, that the sign conventions get set for how AFNI interprets them (which is in the standard RAI-Dicom fashion). This issue is described here.

In the end, I think the simplest thing to do to make sure that everything is set, is to follow this code snippet for taking TORTOISE-processed data and doing DWI fitting in AFNI, with a grad-flip check included, and then you should be able to run the tracking straightforwardedly. The paths will be different in your case, and the TORTOISE DWI output won't be called buddi.nii, etc., but you can change those names in your own script:

# I/O path, same as above, following earlier steps
set path_P_ss = data_proc/SUBJ_001

# shortcut names for what will be our input (-> from TORT proc)
# and output (-> another dwi_* directory)
set itort = $path_P_ss/dwi_04
set odir  = $path_P_ss/dwi_05

# A) do autoflip check: not ideal to need this, but such is life
@GradFlipTest \
    -in_dwi       $itort/buddi.nii                \
    -in_col_matT  $itort/buddi.bmtxt              \
    -prefix       $itort/GradFlipTest_rec.txt

# get the 'recommended' flip; still should verify visually!!
set my_flip = `cat $itort/GradFlipTest_rec.txt`

# B) DT+parameter estimates, with flip chosen from @GradFlipTest
fat_proc_dwi_to_dt \
    -in_dwi       $itort/buddi.nii                    \
    -in_col_matT  $itort/buddi.bmtxt                  \
    -in_struc_res $itort/structural.nii               \
    -in_ref_orig  $path_P_ss/anat_01/t2w.nii          \
    -prefix       $odir/dwi                           \
    -mask_from_struc                                  \
    $my_flip

Note the automatic checks for things that are described, to make sure the gradients are correctly interpreted.

Then, you could track with the <DT_MASK> and <DT_BASE_NAME> from the outputs of the above commands, and use a command like this for deterministic tracking:

3dTrackID                                                                    \
    -overwrite                                                               \
    -mode       DET                                                          \
    -mask       <DT_MASK>                                            \
    -netrois    ${ROI}                                                       \
    -dti_in     <DT_BASE_NAME>                                                   \
    -prefix     Tract_ROI_DET                                                \
    -logic      AND                                                          \
    -algopt     ../scripts/ALGOPTS_DET.niml.opts

That is useful to check quick results, but please also consider the mini-probabilistic tracking and the full probabilistic, for more robust ones.

--pt

Hi Paul

thanks a lot for this thorough response!!

It's working very well!!!

I'm doing the tracking with PROB and MINIP and testing different settings

best

Patrick

1 Like

Hi, Patrick-

Awesome, glad to hear it, and thanks for letting us know.

--pt