New tractography by using a weights.csv file

Hello,
I created a streamlines tractography by one million of seeds:

tckgen -algorithm iFOD2 -act DTI.nii.gz -backtrack -seed_gmwmi gmwmSeed_coreg.mif -nthreads 8 -minlength 15 -maxlength 250 -cutoff 0.06 -select 1000000 -mask mask.nii.gz wmfod_norm.mif tracks.tck

After that I used tcksift2:

tcksift2 -act 5tt2.nii.gz -out_mu sift_mu.txt -out_coeffs sift_coeffs.txt -nthreads 8 tracks.tck wmfod_norm.mif weights.csv

In this way I obtained my weights.csv file.

I have created the connectometry (tck2connectome) by using both methods: with and without the weights.csv file. The two connectometry files are different. However, I wanted to re-created my tractography by using the weights.csv file. I do not know if my procedure is correct, however, I did:

tckedit  -tck_weights_in weights.csv tracks.tck tracks_tcksift2.tck

The issue is the the output file containing the tracks generated (tracks_tcksift2.tck) is the same of my input file.

Do I make some error? Which is the correct method to re-create the filtered tractography by using a weights.csv file

Thanks,
Best,

Michele

I think there is confusion as to what the SIFT2 weights represent, and how that relates to the streamlines themselves. Have a look at @rsmith’s wiki post on the topic, hopefully it’ll clarify how things work.

HI,
thank you so much for the link. Therefore, if I understand correctly, there is not method to create a new tract with the SIFT2 weights. Correct?
Michele

That’s right. The SIFT2 weights are additional information that complements the streamlines.The tck file is entirely unaffected by that information, and can’t store that type of information anyway.

Thanks!
Michele

Hi Michele,

The .tck file format is described here, and while it doesn’t say so explicitly, has no capacity for storing the per-streamline weights. Given you’re not the first person to attempt to “embed” the SIFT2 weights within a .tck file like this, I might make a little addition to the documentation mentioning such.


Mildly on-topic: If anybody is both interested in the prospect of an alternative format for storing streamlines data that would have the capacity to internally store per-streamline weights (along with a wealth of other information), and doesn’t mind a little bleeding from the eyes, check out this nibabel thread.

Rob

@rsmith
Thank you for the link.
I have read that it is not possible to recreate a new tractography after filtering.
Only last question: what is the utility of -tck_weights_in tckedit?
Michele

Let’s say you’ve got a whole-brain tractogram, have applied SIFT2, and now want to extract a specific tract of interest using tckedit. If you just run tckedit on your whole-brain tractogram, then the output of tckedit will be a new track file, but of those streamlines in the output file, you will have lost the information about what weight was ascribed to each. By using -tck_weights_in and -tck_weights_out, in addition to the output track file, tckedit will also output a new weights file, containing only the weights of those streamlines that were written to the output file.

It’s also possible to select which streamlines are written to the output file and which are not based on the streamline weights; esoteric and not useful to most people, but it’s nevertheless a valid answer to your question.