Resampling


#1

Dear MRtrix team ,

I generated a bundle of fibers between two ROIs as following:

  • Generate track file 1 using red region as the seed region and blue region as the -include region.
  • Generate track file 2 using blue region as the seed region and red region as the -include region .
  • Concatenate the two results.

Now I want to do resampling:

The goals of my resampling is to keep all the tract in the resampling procedure and all tracts have an equal number of points. So, I used -num_points option.
But, If I understood correctly, resampling along tracts starts from seeding point of fiber and ends at include (target) point of fiber. So, the result of resampling for track file1 is reverse of track file 2.

My question is that there is a way to perform resampling whole length of tract (keep all the tract in the resampling procedure) and start always from a one side of tract ?

Best
Behnam

resampling


#2

Hi Benham,

But, If I understood correctly, resampling along tracts starts from seeding point of fiber and ends at include (target) point of fiber.

Well, it starts from the start of the streamline and ends at the endpoint of the streamline. The start of the streamline will correspond to the seed point if you used the -seed_unidirectional option in tckgen. The last point of the streamline is only guaranteed to reside in the target / include ROI if you specified the -stop option in tckgen.

So, the result of resampling for track file1 is reverse of track file 2.

If you use the -num_points option, then yes. There’s not currently any way to “reverse” the order of vertices in track data (indeed I dabbled with such in the early stages of my PhD, as it’s necessary for the construction of exemplars like discussed here; turns out in the most general of cases, with potentially highly divergent streamlines trajectories, determining whether or not one streamline is “reversed” with respect to another is actually quite tricky).

My question is that there is a way to perform resampling whole length of tract (keep all the tract in the resampling procedure) and start always from a one side of tract ?

I would suggest looking at the -arc option in tckresample. It’s intended for use cases just like this: looking only at the segment of each streamline between two demarcated regions, and produce a fixed number of points along each streamline within that segment, reversing the order of the streamline if necessary. See example operation here.

Rob