Tckgen - termination mask

tractography

#1

Dear experts,

with tckgen, I would need to terminate my streamlines once they are leaving the specified region. In probtrackx this feature is called “termination mask”.

I could overcome that by creating whole whiter matter mask and supply it as -mask option, but that is cumbersome, since I do not want to constrain how my streamlines can enter my termination mask.

Do you have any clues how to do it with my current tckgen version (3.0_RC2-82-gbb77205e)?

Antonin Skoch


#2

Eeek… that’s an awkward one. Let’s see if my interpretation here is correct:

  • Streamlines can propagate and terminate entirely outside the termination mask.

  • Streamlines can propagate and terminate entirely within the termination mask.

  • Streamlines can propagate from outside the termination mask into the termination mask.

  • Upon entering the termination mask, streamlines are still free to terminate at any point within that mask due to other streamlines tractography criteria.

  • If a streamline attempts to propagate from inside the termination mask to outside the termination mask, it is terminated due to the constraint imposed by having provided that termination mask.

If that’s the case, the closest thing I can suggest would be to define a 5TT image where what you define as a “termination mask” is labelled as sub-cortical grey matter. Streamlines will be forbidden from entering and then exiting that region by ACT prior #6. (They will however be truncated and so the termination may no longer be exactly at the point where the streamline attempted to exit the mask, but this is something that could be temporarily disabled short-term / controlled by a command-line option flag long-term.

Otherwise, it’s a slightly clumsy functionality to even define appropriately; so I’d be curious to know whether this is simply a feature that can be used to serve your purpose that you’re looking to duplicate in MRtrix3, as opposed to having a purpose that needs serving but could be achieved in some other manner using either existing or more appropriate methods.

Rob


#3

Dear @rsmith,

my goal is following: I want to do FBA but I want to restrict my FBA to fixels located in the region of a specific pathway (for example acoustic pathway between Inferior colliculus and Heschl gyrus). So I need to provide streamlines connecting these two structures, but I want to restrict streamlines propagating outside the connection of these two structures (i.e. in case of acoustic pathway I do not want streamlines to continue to propagate from inferior colliculus more inferiorly to the brainstem and in cortex I do not want them to propagate outside from the heschl gyrus mask more distant to the periphery of the temporal lobe). Ideal is to crop the streamline once it enters the ROI on both sides.
As you are suggesting ACT, I am wondering, is ACT compatible with other features, such as -include, -exclude and -seed_image?
Or maybe the -stop parameter is what I am looking for. Do you think that the following could achieve my goal?

tckgen wm_fod.mif -seed_image inferior_colliculus.mif -include heschl_gyrus.mif -exclude excludion_region.mif -seed_unidirectional -stop

Antonin


#4

I want to do FBA but I want to restrict my FBA to fixels located in the region of a specific pathway

If you are specifically trying to constrain FBA to a particular pathway, this could be done using the -mask option in fixelcfestats. Since the fixel-fixel connectivity matrix is constrained to only consider pairs of fixels within this mask, and data smoothing is performed based on this connectivity matrix, use of this option will prevent smoothing from introducing values from outside your pathway of interest into the analysis. So this may be a more direct solution to your issue than attempting to restrict the trajectories or extent of the streamlines used to determine this connectivity.

Ideal is to crop the streamline once it enters the ROI on both sides.

An alternative but imperfect approach, if you really want to manipulate the streamlines in this way, is:

  • Perform whole-brain tracking on the template as per whole-brain FBA.

  • Add the two ROIs, and then take the inverse of this mask (using mrcalc 1.0 - -sub).

  • Use this as the -mask option in tckedit. This will crop out any streamline vertices within your two ROIs. Note that as a result, any streamline that passes entirely through one or both of these ROIs will be broken into multiple streamlines in the output track file.

  • Dilate each of your ROIs by one voxel.

  • Run tckedit again, providing the two dilated ROIs as separate inputs via the -include option. This will select only streamlines that intersect both of the dilated ROIs. Mostly, this will be streamlines that traversed both ROIs, but only the segment in between the two ROIs will be preserved due to the prior masking step. This may however additionally select some streamlines that pass adjacent to one of the ROIs due to the requisite dilation step; these would need to be cleaned up manually, or you could use e.g. the tckedit -minlength option.

As you are suggesting ACT, I am wondering, is ACT compatible with other features, such as -include, -exclude and -seed_image?

Yes, ACT operates more-or-less independently of such features. The exception is if you draw such regions entirely within cortical grey matter, then things may not behave as one may expect intuitively; though this will change in the future. But using ACT here would be a bush-mechanic’s fix, and would suffer from a similar problem to the -stop option described below.

Or maybe the -stop parameter is what I am looking for. Do you think that the following could achieve my goal?

The -stop option in tckgen will terminate a streamline as soon as it intersects the last include region that it encounters. So if you want the streamlines to end as soon as they enter a region, rather than as soon as they exit a region, then this approach can work; however streamlines will still fully traverse and even exit any -include region if there is at least one other -include region that it has not yet encountered. So this may or may not be adequate for what you’re trying to do, since each streamline would only be constrained from passing through one of the two ROIs, depending on the direction of propagation. But this could potentially be “solved” using the tckedit streamline cropping technique described above.

Rob