Tckresample and tcksample for along the tract statistics

tractography

#1

Hi all
I am attempting to use tckresample and tcksample to resample FA values along my anterior forceps tract perpendicular to the tangent of an arc. I have followed instructions from a few other posts including this one: Along tract analysis. My commands are:

tckresample genu.tck -arc 20 -18,54,2 0,28,2 18,54,2 genu_samples.tck -nthreads 0
tcksample genu_samples.tck IITmean_FA.nii.gz genu_fa_values.txt

Where the coordinates roughly correspond to the red dots in this image:

The resulting resampled genu_samples.tck file looks like this:

I was expecting something that looks more like this that shows where the samples are located and their angles along the tangent of the tract (an illustration from Groeschel et al, 2014) so that I could verify that I have sufficiently sampled the tract evenly:

So my question is, how can I be sure that the sampling has come from the entire anterior forceps rather than just the central portion shown in the genu_samples.tck file? The output genu_fa_values.txt file appears to have the correct amount of data in it (20 columns and 4450 rows corresponding to the number of streamlines).

I get a similar result if I move the anterior points closer to the centre point essentially making a smaller arc with shorter streamlines.

Thank-you
Helen


#2

Hi Helen,

It definitely looks like tckresample is somehow misbehaving. The only possible scapegoat I could think of here was if you were providing voxel positions rather than scanner-space positions; but that doesn’t appear to be the case. The fact that genu_fa_values.txt contains 20 values per streamline would suggest that tckresample is in fact producing 20 vertices per streamlines as requested, and tcksample is doing its own job just fine, but that those vertices are simply not being appropriately mapped to the path of the desired arc.

I’ll need to do a bit of poking and prodding to figure out exactly what’s going wrong here, and there’s a chance that it might take a little while to get an answer, but I’ll let you know how I progress.

Cheers for the report
Rob


#3

Hi Rob,
I wanted to add a few pieces of additional information here just in case they help with troubleshooting.

The misbehaviour of tckresample does not appear to be isolated to the -arc option. The -line option appears to have the same results as the images presented in the previous post.

Also, while the output file does contain the requested 20 samples, it does have some “ragged edges”. I initially attributed this to the fact that some of the streamlines may have not quite made it to the end of the sampling area. However, in this post (Coordinates for tckresample…) it clearly states that only streamlines that span the entire path will be sampled therefore there should be no “ragged edges” in the data file.

In this example below I asked for 10 samples along a line and the resulting data file has 9 or 10 values in any given row and some rows are shifted to the right. Could this possibly help to diagnose the misbehaviour of tckresample?

Thanks very much
Helen


#4

Hi @hcarlson,

Just so you’re aware, and as well for anyone else interested in this topic: these issues were indeed confirmed to be due to a bug, and a solution is in the making / has been found; see this pull request on GitHub (where we develop MRtrix3) for more details and to follow up on progress: https://github.com/MRtrix3/mrtrix3/pull/1248

Cheers,
Thijs


#5

Hi Thijs and Rob
This is great! Any idea as to when the fix will be available? I updated my MRtrix this morning (to MRtrix 3.0_RC2-117-gf098f097) and tckresample does not appear to be working just yet. Might I have an old version or not be updating MRtrix correctly (I used git pull and ./build)? Or perhaps I need to be a little more patient? :grinning:
Thank-you very much
Helen


#6

Hi Helen,

The changes were awaiting approval (we’re doing our best to prevent ourselves from introducing more problems than we fix, so changes that go to the public need to be independently checked by another developer). They have now been merged into the master branch; so a git pull; ./build should now update you to mrinfo 3.0_RC2-119-g84318c78, which contains the fixes.

Do however continue to be diligent in checking your data & processing :+1:

Rob


#7

Thank-you,
It all appears to be working now. We appreciate your hard work and your great program!
Cheers
Helen