Filter streamlines by endpoint landing ROIs

Hi folks,

I would like to make sure that the below usage of tckedit answers the following problem: having a tractogram that has been seeded from a region in the GMWMI, I am trying to find the streamlines that connect a number of ROI pairs defined on that GMWMI region. I am calling

tckedit ${in_tractogram_fname} \
  ${out_tractogram_fname} \
  -include ${mask1_fname} \
  -include ${mask2_fname} \
  -ends_only

Streamlines visually seem to be doing what is described above, but I have read several posts in the forum where this solution is not proposed, maybe because some of the options (e.g. ends_only) were not available at the time.

So, I am wondering whether the command above is the correct one to achieve the desired behavior.

Thank you.

Hi Jon,
This seems sensible. Multiple -include options are combined with AND logic (a streamline must satisfy all of them), and -ends_only restricts the test to the two terminal points of each streamline rather than its whole path. So this extracts the streamlines with one endpoint in mask1 and the other in mask2.

Hope this helps :slight_smile:
Arkiev