I have generated a “DTI_30000.tck” file (The number of tracks is 30000). The command:
$ tckgen -algorithm SD_Stream DTI_fod.mif DTI_30000.tck -seed_image DTI_mask.nii -mask DTI_mask.nii -number 30000
Then, I want to generate a fa.mif file of the “DTI_30000.tck” file, so that each point of the trajectory corresponding to a FA value. Is there any method to reach the goal?
I am a beginner of MRtrix3, Thanks for your help!

I’m not sure if this is the correct answer to your question, but I recently worked out how to create connectomes based off of FA values. The first step in deriving this may be what you’re looking for:

Then, I want to generate a fa.mif file of the “DTI_30000.tck” file, so that each point of the trajectory corresponding to a FA value. Is there any method to reach the goal?

If what you’re looking for is the underlying FA value of each streamline point, then the resulting data will not be an image (and so would be best not to be referred to as "a fa.mif"). The tcksample command is indeed what you’re looking for. However, unlike the documentation page to which Amanda provided a link, you do not want to use the -stat_tck option. The purpose of this option is to compute some statistic from the values sampled along each streamline, such that only a single scalar value per streamline is produced. In your case, you explicitly want an FA value per streamline point, and hence you don’t want to use this option.

to compute an FA mask, based on the preprocessed diffusion data (dwi.mif) and used it for subsequent command, to get info about the FA-values:

tcksample fiber_bundle.tck fa.mif values.tsf

Questions:

I’d like to get info about the min and max FA values of the track.
How could I calculate that? If I export the tcksample file via dwi2tensor without .tsf, I get a textfile showing all values. However, I don’t know how to find out the min and max values via computing (I could read through the whole document and mark the values by hand but that would take ages…)

Is there an option to visualise the track file with the min and max FA values in the fashion of a heat map? So that the min FA values could be visualised dark and the max values bright?

Like always, thank you very much for your great support. Best, Lucius

as provided above already by @aszymanski (thanks)
and add the .tsf file as a color input, vgl. picture (green = tumour, bundle = sort of arcuate fascicle)

I’d like to get info about the min and max FA values of the track.

This is where you should use the -stat_tck option within tcksample. That allows you to compute some statistic from the underlying values along each track, such as the minimum or maximum. The only reason for omitting the -stat_tck option is if it is necessary to retain all values along each streamline; for example, for the visualisation you have shown. You could theoretically compute these yourself from the output of tcksample, e.g. using a script to read the ASCII output and compute the min/max along each row, or implementing a hypothetical tsfstats command; but that would be wasteful given the functionality is already right there in tcksample.