Tckconvert Error

Hey everyone,

I converted a .tck Whole Brain Tractography to .vtk using the following command: tckconvert tracks_10M.tck tracks_10M.vtk

After doing some experiments with an external software package (WMQL), I wanted to convert the results back to .tck format. (tckconvert result.vtk result.tck) However, every time I ran the reverse command, I get the Error message below. I tested this on two different iMacs with different MRtrix versions (3.0.2 + 3.0.3), both with the same result.

Error message:
tckconvert: [SYSTEM FATAL CODE: SIGSEGV (11)] Segmentation fault: Invalid memory access

In order to test, if the failure comes from MRtrix or the other software package, I converted a .tck file to .vtk and this very .vtk file right back to .tck; resulting in this Error message: [ERROR] VTK Reader only supports BINARY input

Is there any solution to this?

Hi Philip,

Looks like two distinct issues; both are imperfect handling of alternative tractography file formats, but there’s a good chance they’re unrelated.

tckconvert: [SYSTEM FATAL CODE: SIGSEGV (11)] Segmentation fault: Invalid memory access

If you’re up to it you can try following these instructions, which will give us more useful error information.

[ERROR] VTK Reader only supports BINARY input

This one’s pretty literal. The VTK format supports storage of geometric data in either raw text (“ASCII”) form or as raw binary data. The current *MRtrix3 code implementation of reading streamlines from a VTK file however only supports the latter, presumably because that’s all that was needed for the contributor of that code to satisfy their own needs at the time. So if an input VTK file is detected as containing ASCII data, it simply errors out. So supporting this would require someone to write the requisite code to read from such files; which probably wouldn’t be too difficult, it’s not a super complex format.

The plan has always been to move such code out of tckconvert and into the backend, along with supporting a wider range of tractography formats across all MRtrix3 commands, but I’ve no idea when I’ll ever find the time to get around to that one…

Cheers
Rob