I am trying to export the streamlines generated by MRtrix to a 3D object format that I can edit in blender or other 3D softwares (goal: 3D print white matter tracts). Is there a way to export/convert the tck file to a .obj/.ply or similar formats? how about the brain surface, that can be rendered in 3D in MRview?
I think tckconvert with either PLY or RIB output should do what you’re after. I’ve certainly managed to import into blender in the past with one of these – can’t remember which though…
Hi. It looks like tckconvert writes wrong coordinate system to PLY files. I created .stl model of head using segmentation tool in 3D Slicer and converted .tck tracts to .ply files. Here is screenshot from Blender:
My guess is that much of the addition of new file formats such as PLY to the tckconvert command were motivated by the fact that .tck files will not be supported by non-neuroimaging programs such as Blender. So the localisation of data within the PLY format is what needs to be addressed.
These capabilities were contributed by @blezek, not core MRtrix3 team members, and I’m not familiar with the format personally. It may be beneficial to instead post an issue onto GitHub.
@Eduard_NSI, author of the PLY writer here. The PLY writer exports exactly the coordinates in the .tck format, which is the Nifti standard, and importantly, differs from the DICOM standard (which is what Slicer uses?).
I’ve tended to use ParaView to view Nifti and .tck exported as PLY. But have not yet worked on head surfaces with streamlines.
Incidentally, the PLY writer was written explicity for 3D printing.
Interpolate diffusion data to 1x1x1 mm3 voxel size
Calculate in Mrtrix3 whole brain fiber tracts in 1x1x1 mm3 space
Coregister T1 structural image to interpolated diffusion data then save coregistered T1 in Nifti. I used this Nifti in Slicer for creating head surface.
Convert whole brain *.tck data to *.trk using TractConverter.py script -> load *.trk data to TrackVis -> construct fiber tracts -> save the tracts in *.trk -> convert the tracts to *.tck
Convert *.tck tracts to *.ply format
Fin!
The *.tck tracts in step 5 have proper coordinates: if load it to mrview with coregistered T1 Nifti I can see correct picture.
I tried ParaView: threre is the same issue with my data as in Blender.
@blezek, if you need, I can share you all the data.