Using ACT in tracts that go through subcortical GM structures


Hello MRtrix team,

My project team is trying to run tckgen with -act for the cerebello-thalamo-cortical (CTC) tract, but have run into some difficulties. We are wanting to generate similar tracts to the Palesi et al. 2015 & 2016 CTC papers with the addition of using ACT.

Here is the what we have for the command:

tckgen -algorithm iFOD2 -seed_image roi_SCP_R.nii -include roi_RN_L.nii -select 3000 -act 5tt_anat_cor.nii.gz -seed_gmwmi gmwmi_anat_cor.nii.gz -crop_at_gmwmi fod_map.nii.gz -fslgrad data.bvec data.bval tract_R_ctc_csd_act.tck

The tracts we have produced (using the above command) enter the thalamus, but then are not able to leave the thalamus and project towards the cortex. We understand the anatomical reasoning for this, but are interested at looking at the pathway as a whole.

Therefore, is it possible to edit the code to get rid of rule 6 in the 2012 Smith ACT paper when running tckgen with -act so that these tracts are not terminated in thalamus?

Thank you in advance!



Interesting question…

First off, note you’re providing two seeding options. I’m not sure how the command will handle this… I’d designed it to handle multiple -seed_sphere and -seed_image options back in the day, and it would seed probabilistically from both. But that was before these other options were introduced… @rsmith would be better placed to clarify here.

Otherwise, the simplest way to ‘disable’ the rule for SGM is simply to make sure that the SGM is not labelled as such – either by assigning it to the WM segment, or to the last ‘lesion’ segment (which disables all ACT priors in that region).

You can do this relatively easily with standard tools:

  1. split the 5TT image into individual volumes:

    $ mrconvert 5tt.mif tt-[].mif
  2. add SGM into WM segment, overwriting original WM segment:

    $ mrcalc tt-1.mif tt-2.mif -add - | mrconvert - tt-2.mif -force
  3. zero original SGM segment:

    $ mrcalc tt-1.mif 0 -mult - | mrconvert - tt-1.mif
  4. merge volumes back into single 5TT image:

    $ mrconvert tt-[].mif 5tt-modified.mif

Alternatively, if you prefer to assign the SGM segment to the ‘lesion’ tissue type, just swap tt-1.mif and tt-4.mif around instead of steps 2 & 3:

$ mv tt-1.mif tmp.mif
$ mv tt-4.mif tt-1.mif
$ mv tmp.mif tt-4.mif

Try either or both of these, see if that allows you to do what you’re after…



… is it possible to edit the code to get rid of rule 6 …

It would certainly be possible. I didn’t want to have command-line options toggling such things as it would introduce unnecessary code branching that can really slow down modern processors. But I’d need to re-acquaint myself with the code and experiment to get such a change working; I’m not convinced it’s going to be a simple one- or two-liner.

I would instead advocate re-thinking how to approach the experiment. My naive biological expectation is that the individual neuronal axons constituting this pathway do not individually “pass though” the thalamus: instead, there are fibers that come from the cerebellum and synapse in the thalamus, and then there are other fibers that project from the thalamus to the cortex. Why not try to reconstruct this pathway in a similar fashion:

  1. Reconstruct one half of the pathway only, using tckgen / tckedit.

  2. Generate a spatial map of streamline endpoint density, using tckmap -ends_only.

  3. Mask the output of step 2 to include only the streamlines terminations within the thalamus.

  4. Reconstruct the other half of the pathway, providing the output of step 3 to the -seed_rejection option in tckgen, and additionally using -seed_unidirectional.
    This instructs tckgen to place streamline seeds in the same locations as where the streamlines from step 1 terminated, but will importantly place more seeds in those locations where there were more streamlines from step 1 terminating.
    While not described in the ACT manuscript, the current implementation does permit seeding of streamlines within sub-cortical grey matter structures, with the requirement that such a streamline must still traverse the WM at some point along its length (i.e. no within-SGM-only streamlines are permitted).

The difference between this approach, and disabling ACT criterion 6, is that you will not have individual streamlines that go from cerebellum to cortex through the thalamus. You will instead (approximately) have streamline pairs: one from cerebellum to thalamus and one from thalamus to cortex, that originate from (approximately) the same location in the thalamus. The tangent direction of these streamlines at their endpoints within the thalamus will not necessarily be collinear, whereas an individual streamline passing through the thalamus would necessarily have a continuous, slowly-varying tangent.

@jdtournier’s suggestions are also entirely valid.

… note you’re providing two seeding options. I’m not sure how the command will handle this…

Even though it’s “interface” seeding, -seed_gmwmi still requires an image volume as input, and thus has a reportable 3D volume (integral in this case since it can contain floating-point values). So when you provide tckgen with two seeds, what happens is: For each individual streamline to be seeded, one of the two provided seed sources is chosen at random based on their relative volumes, with seed sources of larger volume being more likely to be chosen each time. So once you’ve generated a large number of streamlines, the proportion of generated streamlines (not necessarily the number of selected streamlines) that originated from having seeded in each seed source image should approximately match the relative 3D volumes of those seed sources.

Note however that there are certain seed sources that are expressly forbidden from being combined with one another in a single tckgen invocation… this applies particularly to the -seed_grid_per_voxel and seed_random_per_voxel options. I also can’t guarantee that tckgen will perform exactly in an unambiguously expected manner for all conceivable combinations of multiple input seeds; but I hope that the logic I put in place is robust against such malicious intent.