Bidirectional fibers

Hello,

After seeding a several number of fibers from a given ROI, I realized that the voxels closer to the ROI are saved not only in the first raws of the tck.data but also in the last raws for certain fibers. I thought that the first voxel has to be inside the ROI mask or at least in the vicinity of it, but it doesn’t seem to be the case… Could you explain what it is due to ?

Fiber 1:
First_1

Fiber 2:
Last_1

Thank you in advance
Nick

Assuming you’re not using either the -seed_unidirectional or -seed_direction options in tckgen, then streamlines will be bidirectional, and start in random directions. This means that the algorithm will first start from the seed region along some random direction, track as long as it can, then flip the streamline back to front and start tracking along the opposite direction from the seed point. So half the time, it will start in a ‘forward’ direction, half the time in the opposite direction, which would explain what you see.

If you specify -seed_direction, then you can guarantee that the streamlines always start in what you consider the ‘forward’ direction, which should mean that they all behave as you expect. If you use the -seed_unidirectional option, then the half of the tracks that start in the ‘wrong’ direction will be discarded, so those left will again behave as expected.

I hope this at least explains what’s likely going on…?
Donald.

You’re right, I’m not using these two options. Thank you for the tips !

I have however another question. Are the “wrong fibers” wrong in biological terms or not? I mean, if I just flip the column up to down in order to keep all the fibers, as though they all started from the ROI, would it be correct regarding the brain anatomy and connections in the white matter? Or should I however eliminate them?

Thank you
Nick

Yes, absolutely nothing wrong with them. If you think about it, these streamlines were reversed internally within tckgen anyway, so there’s no reason you can’t ‘un-invert’ them manually if you want to. They’re strictly equivalent to having started with the opposite seed direction.

Dear MRtrix experts,

I’m tracking from a seed region to a target region and I’m a bit confused by the bidirectional tracking.

This means whenever the streamline originated in the seed region arrives to the target, my target will become the initial point (or seed) of the next streamline generated, right?

If the streamline that is generated from the seed doesn’t reach the target, there is no bidirectionality involved, right? That streamline is discarded and we start all over again generating another streamline from the seed region,right?

Thank you!

No, I think there’s a misunderstanding as to what we mean by bi-directional here: what we mean is that the algorithm will propagate the streamline in both the forward and backward direction from the seed point. It does not mean that it’ll track from seed to target and then back from target to seed.

What actually happens is that the algorithm will proceed from the same original seed point, starting in one direction first to generate the first half of the streamline, and then go back to the same seed point and start in the opposite direction to produce the second half. And the two streamlines generated that way are fused together to produce the single, final streamline.

The reversal of the streamline that I mentioned in my earlier post is needed to fuse the two halves of the streamline into a single coherent one: it will look like it starts from one end (distant from the actual seed point), goes through the seed point at some stage, then carries on to the other end. If that first half of the streamline is not reversed, there will be a massive jump between the end of the first half of the streamline and the start of the second half, which is clearly undesirable. It does mean that the actual seed point will end somewhere in the middle of the streamline, but I guess that’s the price to pay for bi-directional tracking.

I think this is a consequence of the misunderstanding of the term bi-directional – hopefully the clarification above will be enough, but just in case: if the first half of the streamline doesn’t hit the target, it definitely needs to try the other direction in case the second half hits the target. And if either half hits the target, it’ll need to generate the full (bi-directional) streamline to store it in the output, and also to check that it doesn’t hit any exclusion regions, etc.

The only time it won’t run the second half is if an exclusion region was encountered while tracking the first half, in which case it discards the streamline immediately and starts on the next one.

See above. But just to avoid any confusion: if a streamline is discarded, it’ll indeed start again and generate another streamline from another fresh seed point within the seed region – it will not in general try again from the same exact seed location.