How to save the generated streamlines

Dear Experts,

I followed the script on MRTRIX3 to analyze the data and displayed the results with streamlines(FBA_pipline). At this time, I hope to save the streamlines for further analysis. What should I do?

I want to export fiber bundles in .tck or .vtk format, the effect is similar to the type that Mito publishes on brain(doi:10.1093/brain/awx355).

I would be very grateful if you could help me solve this problem.


I think what you’re asking is answered in the second part of this wiki post…? Let us know if that doesn’t answer your question!

Thank you for your reply. I did the second part of the wiki you gave, and got the streamlines in mrtrix3. Now I hope to export it(in ‘.tck’ or ‘.vtk’) for further analysis. Please give me some advice

Well, the streamlines are already in .tck format – what you have now is an additional .tsf file that you can use to threshold and/or colour the streamlines in mrview. If you’re looking to export these to vtk format for display in other packages, I’m afraid we don’t have the tools to do this currently (others might correct me if I’m wrong here). But assuming you’re happy to display them in mrview, then you can simply load the original streamlines, and select your newly-generated tsf file in the Thresholds selection.

Hello, thank you for your reply. I really need to export the streamlines after setting the threshold. Cause, it’s hard for me to determine the white matter area corresponding to these streamlines, so I would like to export them for further analysis. Thank you!

Exporting just the supra-threshold streamline vertices is unfortunately not something immediately accessible. Hopefully in the future the tckedit -mask option will be able to take a fixel mask as input, which would probably serve this purpose (albeit without TSF-based smoothing).

You could generate a voxel mask of those voxels containing at least one supra-threshold fixel and then mask streamline vertices based on that, but it wouldn’t get you all the way to the data you want.

The other alternative is to make use of the MatLab functions for reading both .tck and .tsf files, select only streamline vertices for which the value in the TSF is supra-threshold, and then write the result to a new .tck file. You do however need to be wary when masking streamlines in this way that you can have an individual input streamline lead to multiple output streamlines due to being bisected by the masking process.