FA value from tck file

Dear MRtrixers,

Currently I’m trying to extract the FA value from tck files but I was wondering if I’m doing it the right way. Hopefully you can help me out and let me know if it’s correct or how to do it in case I’m wrong.

What I did was:

- dwi2tensor dwi_preproc.mif tensor.mif
- tensor2metric tensor.mif -fa fa.mif
- tcksample tracks.tck fa.mif output.file

I opened the output file in Excel and calculated the mean FA value from all the points.

Hopefully it’s the right way to go.

Cheers, Ida

I’m trying to extract the FA value from tck files

I really discourage describing the process in this way: the FA values are not embedded in .tck files to be “extracted”. It’s sampling FA values along streamlines; hence “tcksample:stuck_out_tongue:

I opened the output file in Excel and calculated the mean FA value from all the points.

If you’re looking for a per-streamline mean FA value, rather than an FA value per streamline vertex, this can be achieved within tcksample using -stat_tck mean.

Rob

1 Like

Hi Rob,

Thank you for explaining! And sorry for the describing it like that :wink: It makes more sense what you said :slight_smile:

The stat_tck make it a whole lot easier. However I have one question, in some subjects I have a few tracts that say NaN instead of a number. Could you maybe explain what that means?

Best, Ida

“NaN” = Not A Number. Most likely it means that you are trying to compute a mean based on zero samples, which results in a division by zero. Why this is arising is difficult to know; it most likely implies the presence of streamlines that are not only of zero length, but don’t even contain a single vertex… we’ve generally made sure that such can’t occur, but there’s conceivably ways to produce such depending on the precise nature of the steps you’ve used to produce that data.