Prostate Tractography - Colouring Tracts

I am currently using the MRtrix3 software in an attempt to perform tractography of the neurovascular bundles surrounding the prostate. I have two questions:

  1. Is there a way of manually assigning several different colours to different groups of tracts within one .tck file? For example I would like to assign tracts passing between 12 o’clock to 1 as GREEN and 1 to 2 as RED etc.

. Is there a way of combining several separate .tcks files such that all tracts are visible in one file but still retain their own manual colour coding?

Thanks for the help!

Hi Aman,

All of the tracks within a single .tck file are considered equally; there’s no scope within the long-standing .tck file format to store individual properties (colour, weight, any other quantity of interest) per track, it’s literally just a list of points in 3D space.

However if you are able to split the tracks across multiple files - for instance using tckedit - then you can use the mrview interface to manually set the colour of each individual bundle (since each will be in its own file). Separating tracks based on small differences in the local tangent direction is unlikely (both practically and conceptually), but if the tracks branch out and end at different locations then you can use manually-defined ROIs at those endpoints to separate the bundles from one another.


Thanks for the quick response!

I have seeded several separate tracts around the prostate. Each .tck file can be assigned a colour manually and viewed together on mrview.

Is there a way (possibly with tcpmap) to combine these for visualisation purposes so that I dont have to manually reassign the colours again each time when opening a case.

Thanks for the help.

Hmmm. There’s a couple of options here, one that you can try now and one that would require a bit of coding:

  • Generate a TDI for each bundle, do some trickery to make it coloured, and then combine them:

    • tckmap to get the TDI;
    • mrcalc -mult to generate three copies of the TDI, but with different multipliers (corresponding to RGB intensities);
    • mrcat to concatenate the three volumes together to produce a 4D RGB image;
    • mrcalc -add to add the results from multiple bundles together into a single 4D RGB volume.
  • The list of mrview command-line options for automating GUI setup is slowly increasing. If a command-line option were available to set the colour for a track file imported using -tractography.load, I reckon that would allow you to import the tracks and colour them as you wish without needing to do any manual interaction?