Extract the two endpoints (voxel coordinates) of streamlines

Hey Community,

I am using the tck2connectome command with the -out_assignments flag. However, instead of the start and end node, I want the voxel coordinates for the respective start and endpoint of each streamline. I am pretty sure that I can do it with tck2connectome, but so far I only extracted information about the nodes.

Is there a way to achieve this?

Best regards!

Hi @Ape_San,

If you are only interested in the spatial locations of the streamlines endpoints, then there’s no need to invoke any interpretation of a “connectome”; this is just querying the raw streamlines data.

I would suggest the following:

  1. Use tckresample with the -endpoints option to generate a track file containing only the two endpoints of each streamline.

  2. Use tckconvert with the scanner2voxel option to transform these points from scanner space coordinates to voxel coordinates.

  3. Use the provided MatLab function read_mrtrix_tracks() to access the data.


Thanks a lot @rsmith,

works perfecly fine!

A post was split to a new topic: Voxel coordinates of streamline endpoints