Visualise successful seed points in tckgen


Due to issues with MPRAGE contrasts, I’ve decided to perform my tracking without ACT, and proceed onto keeping a WM segmentation as my tracking mask.

To ensure the successful seeds (I am still using the dynamic seed option) are homogeneously placed throughout the brain - and to also satisfy my curiosity - I was wondering if there was a simple code to visualise these seed points?

I’ve extracted the floating points obviously with the -output_seeds option in tckgen, but I have no idea to create the subsequent image, as per Smith et al . (2015) below:


I asked the same few months ago, this is the answer that @rsmith gave me:

Figure 6 is the easy one. That’s basically a TDI, but where only the endpoints contribute to the density image rather than the entire track. You can achieve that using tckmap with the -ends_only option.

I hope it helps.



So the image copied from the ACT paper is of the density of streamlines terminations, not the seed points: that’s fairly easily generated using tckmap -ends_only. A map of the seed points is slightly trickier, since both the code and the file format are largely designed around ignoring which point along the track was the seed point.

A couple of options:

  • Since you’re specifically using dynamic seeding, you could try un-commenting this line and re-compiling. (Hopefully it still works; trouble with #ifdef'd code is that it can go out of date…). That should give you some fixel output images, and some extra terminal output.

  • For anything other than dynamic seeding, you can use tckgen -algorithm seedtest to generate a track file where each track only contains one point, corresponding to the location of a seed point.

  • If you specifically want the seed points corresponding to a particular generated tractogram, then some trickery will be required. My suggestion if you want to give this a go (no idea if it’ll work):

    • Use the -output_seeds option in tckgen
    • Parse the 3-vector corresponding to the real-space position of each seed point
    • Use tckconvert to convert this from ASCII to a .tck file - will probably come out as a single file containing a single track, where each point is a streamline seed point
    • Use tckmap, with the option -upsample 1 so that no interpolation of the ‘track’ is performed between seed points.

Let us know if you succeed!