DTI-related changes in 3dDWItoDT, 3dDWUncert and 3dTrackID

This is a description of some updates to DTI functions in AFNI and FATCAT. These are all available in AFNI ver >=16.3.09 (some intermediate changes miiiight have existed a bit before, but some more wrinkles have been ironed out now).


  • Now calculates and outputs radial diffusivity RD = 0.5*(L2+L3) automatically. This used to be done internally in 3dTrackID, but that was silly and caused me headaches when updating stuff. This seems much simpler and more appropriate now.

  • I will re-mention a recent change that was posted on earlier: this function knows about b-value magnitude and returns diffusivity values with corresponding physical units, as "mm2/s" by default. Typical adult, human primate parenchyma has a MD ~ 0.0007 mm2/s, which is a small number in these units. That can be a bit annoying for viewing, and possibly quite annoying later when doing statistics/calculations. Therefore, if you are inputting b-matrices or gradients with the physical magnitudes in them, I would generally recommend using the ‘-scale_out_1000’ to return values in units of "10**-3 mm2/s", so that the numerical values of the mean mean diffusivity would be around MD ~ 0.7 (10-3 mm**2/s). Makes reporting easier/nicer as well, I think.

  • On another note, I think when putting DWIs into tensor fitting, with both the standard 3dDWItoDT fitting method and with how 3dDWUncert has been updated, it makes sense to not average b0 reference volumes together.


  • Now can make use of OpenMP to process voxels in parallel. For big data sets (i.e., high spatial res, and/or large numbers of gradients) this can really improve life. On my desktop, I usually have OMP_NUM_THREADS=8 in my source file.

  • I will note that when using 3dDWUncert it also really makes sense to apply the subject’s whole brain mask-- things will move along really slowly if you don’t. (I don’t see why knowing the uncertainty of non-brain voxels would matter, either.)

  • There is also a slightly new method of estimating the tensor fit for each jackknife iteration. For standard-ish data, the values don’t change much, but it is more flexible and can still fit data whose reference (minimum) b-value is well above 0 s/mm**2. This likely won’t affect many people’s lives, but it’s there if you need it.


  • The mean and standard deviation of tract length within a bundle are now automatically calculated and output in the *.grid files (variable names “BL” and “sBL” for bundle length and its standard deviation, respectively). This might be useful for estimating distances as a crow flies (or as a electrochemical signal flies) within the brain. This is output for all modes of tracking.

  • As part of the above’s new measurement, there are new options for trimming/stopping tracts that connect targets. Basically, the user can decide what is a meaningful length: should tracts stop just outside the target surface; should they just enter into the target surface and stop; should they propagate as far as possible through the targets but not extend out away from both targets; or should they reflect the full length of tract that was found between stop conditions? This is described with pictures here:
    Since not all tracts will always go 100% through a target, I think if you are really wanting to use tracking to estimate the distance “between” targets, then one of the new “-targ_surf_*” options should probably be used.


An additional comment–

If you run the new 3dTrackID using results of the old 3dDWItoDT, you will like get the following error message:

"Can't open dataset: 'RD' file"

… because 3dTrackID now expects an RD=0.5*(L2+L3) volume to be made and sitting with the FA, MD, L1, etc. volumes.

To alleviate such pain, you can either:
A) rerun the tensor+parameter calcs with the new 3dDWItoDT,


B) use 3dcalc to generate an RD file from the L2 and L3 sets, such as. This could be done as follows:
Say that you have output your tensor and parameter files into a directory called DTI, and specified the prefix for the 3dDWItoDT output to be ‘DT’. Then, to output RD files into the same place, you could run:

3dcalc -a DTI/DT_L2+orig -b DTI/DT_L3+orig -expr "0.5*(a+b)" -prefix DTI/DT_RD

… and then you should be able to keep on trackin’.