Tracking command: Different order of streamline vertices for left and ride sight
See original GitHub issueHello everyone,
I ran into the following problem while using the Tracking command:
I supposed the Tracking command, which requires the ending segmentations to have been computed already, would result in a trackfile where the streamline vertices are arranged in the order from begin of the bundle to end of the bundle as defined by the ending segmentations.
When I executed the command this was not the case. I looked into the vertex location by converting the output .tck file to .txt format using mrtrix’s tckconvert command.
Example CST
CST_left streamline vertices:
127.667 110.775 52.9779
126.36 112.427 60.0848
126.196 113.506 62.3268
125.923 115.761 66.3677
125.089 117.488 70.3891
123.409 119.131 74.7557
122.176 119.661 78.0519
121.118 120.343 80.9664
119.601 121.746 84.2786
117.835 122.891 87.5252
=> z-value is increasing (brainstem to cortex)
CST_right streamline vertices:
142.737 126.355 186.33
143.476 125.426 183.441
144.322 125.102 179.042
145.725 125.305 174.887
147.764 125.885 169.781
149.152 126.058 166.287
150.995 126.208 162.278
151.756 126.531 159.446
152.321 127.27 155.558
153.544 127.645 151.72
=> z-value is decreasing (cortex to brainstem)
Therefore the left side seems to be inverted in relation to the definition of the bundle sides.
I would like to know whether this behaviour is intentional. I found it non-reproducible between different bundles. I.e. OR is “correct” for both hemispheres (definition from begin/cortex to end/thalamic). IFO left and right are also both inverted related to the ending definitions.
Is there an option to request a specific order/direction with TractSeg’s commands?
Thanks Darius
Issue Analytics
- State:
- Created a year ago
- Comments:6

Top Related StackOverflow Question
In general this should work. However, the resulting tractogram will be a lot more sparse. Only starting tracking from one end it is difficult to get a full tracking. To get a full tracking you have to start everywhere.
Hi, during the tracking we simply start and random points in the track mask and run until we reach the start/end mask. Therefore it is not enforced that start is always the same. For Tractometry this is a problem. Therefore at the beginning of the Tractometry command we reorient all trackings that they start in the “start” region. This is done here: https://github.com/MIC-DKFZ/TractSeg/blob/master/tractseg/libs/tractometry.py#L50