stDEC-TDI

Hello,

I have just started using MRtrix so please excuse me if these are boneheaded questions. So far the user experience has been great. Basically I am trying to implement the procedure in this paper: http://dx.doi.org/10.3174/ajnr.A4685.

I have made a TDI image following the tutorial, but then I tried to “go to 11”. I was expecting the process to run for a while, but we’re going on close to 12 hours, and 570000000 generated tracts later we’re still trucking along.

If I want to implement what is in the citation, am I on the right “track” with the command below? If I kill it, will it save the file with the number of generated tracks, or will it basically be a bust?

tckgen DWI_fod.mif DWI_shortrack.tck -seed_image DWImask.mif -mask DWImask.mif -number 0 -maxlength 1

Thanks!

Anthony

Update. I realized my mistake.

tckgen DWI_fod.mif DWI_shortrack15.tck -seed_image DWImask.mif -mask DWImask.mif -step .3 -angle 9 -number 4000000 -minlength 15 -maxlength 20 -force

is working better.

Yes, I was going to ask, why the -num 0? That basically means keep tracking forever…

Also: yes, you can interrupt the tracking, and the streamlines saved on file will be usable. The only thing is it will write files in chunks of approximately 16M (by default) to avoid constant small writes (and possible fragmentation), so you will lose the last chunk that hasn’t yet been written. But given the numbers you were suggesting, I don’t think that would be a huge issue!

Just out of interest: why did you need to change the -step and -angle parameters…?

Yes, that was insane. And I set the maxlength to 1mm. Not surprising it generated so many tracks.

I changed the values to try to implement what is in the referenced paper. Right now I am just trying to understand what the program is doing and making a few mistakes along the way. Here is the relevant text from the paper:

To generate the track density maps, we performed whole-brain probabilistic fiber-tracking by randomly seeding 4,000,000 tracks throughout the brain by using the MRtrix software package (http://neuro.debian.net/pkgs/mrtrix.html).28 The constrained spherical de-convolution technique with probabilistic streamlines was used to model multiple fiber orientations. The relevant fiber-tracking parameters were the following: 0.3-mm step size, 9° maximum angle between steps, 2.0-cm maximum and 1.5-cm minimum track length, and maximum harmonic order lmax = 8. Super-resolution TDI and direction-encoded color (DEC) TDI maps were generated with a 500-um isotropic resolution.

This is just a suggestion, but is it possible to supply code to implement various procedures from papers that use these approaches? I do realize that the parameters might have to be tweaked because of the different imaging protocols, but it would be a good start. For example, the stDEC-TDI procedure was developed by your group, but I haven’t been able to find a suggested pipeline to implement it. Note I am also aware that tutorials often take the back seat to software development.

Great product by the way. I know it has been around a little while but I’m just getting over to it and really enjoying it!

That’s perhaps a bit harsh… :wink:

It’s possible - but as you guessed, there’s a lot of other stuff that we need to prioritise. One option though if you feel like contributing is to make a new post about your pipeline in this forum, and we can turn it into a wiki post. I’ve actually no idea what happens when we do this, I haven’t tried yet, but it sounds good - it could be a valuable resource, if users are willing to invest a little bit of their time helping each other out… :grin:

And I’m guessing anything that turns out to be widely used will eventually make its way into the official docs.

Just to add about this topic, the command for stTDI we use is pretty much the same as the standard TDI but with the tracking parametrs changed to have a maximum length of about 10 times the acquired voxel size (please check this number from the paper, it’s been a while since I did this work :slight_smile: and many more tracks (because they are much shorter and therefore won’t contribute counts to as many voxels, thus producing less SNR for a fix number of tracks compared with the standard TDI).
You can obviously play changing other parameters such as curvature, step, etc, but as a first attempt, all the defaults that you would have used for the standard TDI maps should be a good starting point.
Cheers,
Fernando

Thanks! This is very straightforward really. It just took some time getting to know the program. If people want to start this, the following commands (modified from the standard workflow) will do the job.

After conversion and preprocessing in the standard workflow,

dwi2mask DWI.mif DWImask.mif

dwi2response tournier DWI.mif DWI_out

dwi2fod DWI.mif DWI_out DWI_fod.mif -mask DWImask.mif

tckgen DWI_fod.mif DWI.tck -seed_image DWImask.mif -mask DWImask.mif -number 4000000 -step .3 -angle 9 -minlength 15 -maxlength 20 -force

tckmap DWI.tck DWI_tdi.mif -vox .5 -dec -force

The -dec flag gives the color coding.

Regarding the number of tracks, my guess is that 4M will not be enough for a 0.5mm super-resolution (the SNR will be low). You are likely to need to do more tracks. However, with TDI (or stTDI) you can always build the SNR in stages, until you are happy you have enough SNR. For example, you can run your 4M tracks, generate the stTDI. If this map looks noisy, then just run more tracks and generate the corresponding stTDI map, and add it up to the one you already have (alternatively, you can obviously combine the tck files first and then calculate the final stTDI map in one go).

One final comment regarding stTDI (and that it is a difference compared with TDI) is that, if you are interested in a particular brain region (instead of the whole-brain), then you don’t need to do whole-brain tracking: for stTDI, only tracks in the local area contribute information (for example, in your case, only tracks within 20mm from your ROI will play a role). So, what you can do (to save time and keep tck file size small) is to do the tracking only within an ROI mask (as we did, for example in this paper:
http://www.sciencedirect.com/science/article/pii/S1053811914006314

This will let you do many more tracks, improve the CNR in that region, while still keeping the processing time and tck file size small.

Good luck!
Fernando

Thanks! This is really helpful. I’m specifically interested in the lateral lemniscus, so this would speed things up considerably.

Anthony