3dTrackID

Hi everyone,

I’ve been having a hard time running 3dTrackID. It seems like every time I run it I get the following error:

SEARCHING for vector files with prefix ‘/Users/dti-afni_DT.nii.gz*’:
FINDING: ** FATAL ERROR: Can’t open dataset: ‘V1’ file

My question is… why is the program looking for the vector files in the folder “dti-afni_DT.nii.gz”? I have other file names in that same folder specifically labelled “dti-afni_V1.nii.gz” and “dti-afni_V2.nii.gz”

This is the code I typed up:
3dTrackID -mode PROB -netrois /Users/ROIs.nii.gz -uncert /Users/dti-afni_dwuncert.nii.gz -dti_in /Users/dti-afni_*.nii.gz -dump_rois BOTH -prefix network6_ROI

Is there something I can about about this? It seems to be just a mismatch in the naming of the files.

Any ideas on how to solve this issue?

Thanks for your time. I hope to hear back soon.

Hi, Sondos-

That isn’t the format for providing the DTI parameter files. It’s described here:


-dti_in  INPREF :basename of DTI volumes output by, e.g., 3dDWItoDT.
                     NB- following volumes are *required* to be present:
                     INPREF_FA, INPREF_MD, INPREF_L1,
                     INPREF_V1, INPREF_V2, INPREF_V3,
                     and (now) INPREF_RD (**now output by 3dTrackID**).
                     Additionally, the program will search for all other
                     scalar (=single brik) files with name INPREF* and will
                     load these in as additional quantities for WM-ROI
                     stats; this could be useful if, for example, you have
                     PD or anatomical measures and want mean/stdev values
                     in the WM-ROIs (to turn this feature off, see below,
                     'dti_search_NO'); all the INPREF* files must be in same
                     DWI space.
                     Sidenote: including/omitting a '_' at the end of INPREF
                     makes no difference in the hunt for files.

So, instead of:


-dti_in /Users/dti-afni_*.nii.gz

I guess you would want:


-dti_in /Users/dti-afni

(though, that looks like you are writing DTI outputs to your /Users/ directory?)

In short, if you want to use dti_FA.nii.gz, dti_MD.nii.gz, etc., then provide “-dti_in dti”-- just the prefixes without extensions.

–pt

Hi Paul

Thanks for the clarification :slight_smile:

I put the Users/ as my directory but that is not the directory I have all my files in. I just did that to simplify the troubleshooting (maybe it ended up causing more confusion).

So now that I fixed the file name for the argument, it ran with no trouble in finding the vector files.

But now I’m getting another error:

SEARCHING for scalar files with prefix: /Users/dti-afni
FINDING: **FATAL ERROR: Can’t open dataset ‘/Users/dti-afni-trackid_det.niml.opts’

I’m not sure if you’d be able to help out with that.

I hope to hear back soon. Thanks

Does a file called “dti-afni-trackid_det.niml.opts” exist in that directory? If so, I think it is confusing 3dTrackID, which wants to open all files with the prefix supplied to “-dti_in …”. It is expecting only volumetric files (NIFTI or BRIK/HEAD) to have that prefix-- I bet if you rename it, then it should be fine. (*Assuming that it is currently existing… otherwise, I’d have to think more. Eek.)

–pt

Ah, that makes sense. It fixed the problem.

Only now the output I get is quite odd, and I don’t think it’s correct. I tried looking at FATCAT_DEMO to find something I can compare it against, but I couldn’t find it.

I’m not sure if I can email you the files I get as output from 3dTrackID… I tried to map it onto SUMA and it didn’t seem to work out too well (because of the 3dTrackID output - which I assume is wrong)

Could you take a look at it and let me know what your thoughts are?

Let me know what your thoughts are :slight_smile:

And thanks again for all your help, I appreciate it.

Hi, Sondos-

I have sent you instructions via PM for uploading dsets and I can take a look.

–pt

Thanks Paul.

So I took a look again, and I figured out why things don’t quite look right. It has to do with the 3dTrackID step.

I realized that I got the following error, but did not notice it:

++ Tracking mode: PROB

++ Number of ROIs in netw[0] = 9
++ No refset labeltable for naming things.
++ SEARCHING for vector files with prefix ‘/Users/dti-afni*’:
FINDING: ‘V1’ ‘V2’ ‘V3’
++ SEARCHING for scalar files with prefix ‘/Users/dti-afni*’:
FINDING: not:‘DT’ ‘FA’ ‘L1’ not:‘L2’ not:‘L3’ ‘MD’ ‘RD’ not:‘dwuncert’
++ Done with scalar search, found: 4 parameters
→ so will have 15 output data matrices.
++ Minor note: there is a tiny (magn < 0.1) vector in the 0-th direction set.
→ Will exclude that voxel from walkable mask-- recommend checking model fit.
++ Effective Monte iterations: 5000. Fraction threshold set: 0.00100
→ Ntrack voxel threshold: 5.

Does that mean it an’t find DT, L2, L3 and dwuncert??

Because all of those files are there in my folder (I’ve attached image), I’m not sure why it won’t detect them?

Also, when I tried to run SUMA
I got the following error:
– Error SUMA_LoadDsetOntoSO_eng (SUMA_Color.c:10630):
Could not find network_file “network6_ROI_TEST_000.niml.tract” on disk for dset /Users/network6_ROI_TEST_000.niml.dset

So I noticed that there was no outputted tract file from 3dTrackID either, and this could be because of the “missing scalars” (that are actually present in the folder)?

What could I do to fix this?

all copy.jpg

Hi, Sondos-

I don’t see any error here:


++ Number of ROIs in netw[0] = 9
++ No refset labeltable for naming things.
++ SEARCHING for vector files with prefix '/Users/dti-afni*':
FINDING: 'V1' 'V2' 'V3'
++ SEARCHING for scalar files with prefix '/Users/dti-afni*':
FINDING: not:'DT' 'FA' 'L1' not:'L2' not:'L3' 'MD' 'RD' not:'dwuncert'
++ Done with scalar search, found: 4 parameters
--> so will have 15 output data matrices.
++ Minor note: there is a tiny (magn < 0.1) vector in the 0-th direction set.
--> Will exclude that voxel from walkable mask-- recommend checking model fit.
++ Effective Monte iterations: 5000. Fraction threshold set: 0.00100
--> Ntrack voxel threshold: 5.

that looks fine. Though, I would use a higher fraction threshold, in general, like 0.1 (see “-alg_Thresh_Frac” in the help; and/or add “-alg_Thresh_Frac 0.1” to the command; i should probably update the default value).

Does that mean it an’t find DT, L2, L3 and dwuncert??

No, it doesn’t; it just means it isn’t using those for matrix output.

Also, when I tried to run SUMA
I got the following error:
– Error SUMA_LoadDsetOntoSO_eng (SUMA_Color.c:10630):
Could not find network_file “network6_ROI_TEST_000.niml.tract” on disk for dset /Users/network6_ROI_TEST_000.niml.dset

I would need to see the command you tried running. Note that “3dTrackID -mode PROB …” does not output tract files.

So I noticed that there was no outputted tract file from 3dTrackID either, and this could be because of the “missing scalars” (that are actually present in the folder)?

Nope, in probabilistic mode, tract files are not output. Please see this documentation, esp. from pg 22 onward about the different modes:
https://afni.nimh.nih.gov/pub/dist/edu/latest/afni_handouts/FATCAT_03_dti_tracking_funcs.pdf
as well as here for more about tracking and visualization tools for probabilistic tracking:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/tutorials/fatcat_prep/Postprocessing_IV.html

–pt

Thanks for the tips, Paul. It really helped. I noticed in the documentation that the brain was split into left and right thalamus, but there were no instructions on how (or why) to do that. When I tried looking it up, most forums suggested to do some additional step in freesurfer. Is there any other way around that?

Also, when I used the fat_proc_connec_vis in the following way:

fat_proc_connec_vis -in_rois /Users/NET_000_ROI_*.nii.gz -prefix testing -trackid_no_or

and I got the following error messages:

*+ WARNING: output sub-brick 0 is all zeros!

What does this mean ?

*+ WARNING: Set TR of output dataset to 1.0 s
++ elapsed time = 0.3 s

Also this confused me.

Warning SUMA_Make_Edge_List_eng:
Min/Max number of edge hosting triangles: [1/4]
Warning SUMA_Make_Edge_List_eng:
You have edges that belong to more than two triangles.
Bad for analysis assuming surface is a 2-manifold.
Warning SUMA_Make_Edge_List_eng:
Min/Max number of edge hosting triangles: [1/3]
Warning SUMA_Make_Edge_List_eng:
You have edges that belong to more than two triangles.
Bad for analysis assuming surface is a 2-manifold.
Warning SUMA_Make_Edge_List_eng:
Min/Max number of edge hosting triangles: [1/3]
Warning SUMA_Make_Edge_List_eng:
You have edges that belong to more than two triangles.
Bad for analysis assuming surface is a 2-manifold.

I’m not sure what to make of all these errors, what do they mean? I tried to look up the error, for instance, " You have edges that belong to more than two triangles." and I read something about overlapping networks, and how it should be fixed through freesurfer, but I think it just ended up making me a lot more confused.

Also the output files from this command are labelled k1… up until k36, which then are plotted. but from the file names (k1-k36) how am I supposed to know which ROI’s the tracts are running through?

I’ve attached the .niml.dset file screenshot, because I’m not sure if getting all these “NULL”'s at the beginning is normal

Hi, Sondos-

Before getting into these other tracking/viewing issues, there is a more fundamental problem with the network of targets (as uploaded): it is not made of binary numbers. Each region must be defined as being either a 1 or 2 or 27, etc. Central parts of the ROIs appear to be integers, but at the edges that is not the case. I am going to guess that these were warped somehow without applying a “nearest neighbors” (NN) interpolation?

Since there is no history in this file’s header, I don’t know what command was used to make that file. Also since there is no history, I can only guess it was a non-AFNI program? How did you make it?

This is a fundamental issue to tracking before looking at anything else.

–pt

Thanks Paul, the ROI’s are now binary but I’m still getting the same issues of getting the following warning:
*+ WARNING: output sub-brick 0 is all zeros!
when trying to visualize the tracts. Why is that?

What command are you using to visualize the files?

And are you trying to look at the network of ROIs, or at the output of tracking?

–pt

I used the fat_proc_connec_vis command in the following way:

fat_proc_connec_vis -in_rois /Users/NET_000_ROI_GMI.nii.gz -prefix testing -trackid_no_or

and I got the following error messages:

*+ WARNING: output sub-brick 0 is all zeros!

What does this mean ?

*+ WARNING: Set TR of output dataset to 1.0 s
++ elapsed time = 0.1 s

Also this confused me.

Well, the fat_proc_connec_vis program is designed to read in multiple data sets after “-in_rois …”, each assumed to be a mask/map of a single ROI. It then turns each of those into a separate surface file (“*.gii”), and then those can be viewed together with SUMA. (Supplementarily, it also makes+applies labels from each file name.)

You have a good idea to try to load in the GM ROIs and turn them into surfaces, the way in which those ROIs are stored is different and not really a good input for
fat_proc_connec_vis: all the ROIs are in a single file (identified by different integer values). At present, each ROI would have to be dumped out into a separate file and then input in a similar manner to the WM ones.

I am contemplating how best to view all the GM and WM, as well as possibly being able to input a file like the GM/GMI ROIs directly…

–pt

I ended up adding an extra argument, -vol GMI_ROIs. I’m not sure if this is correct but it seemed to give me the output I was looking for