I wanted to inquire if anyone knew a way to write out a command that can filter out a streamline that has both ends in the same ROI. I am looking at the acoustic radiations tract and specified my ROI 1 as heschl’s gyrus and ROI 2 as the thalamus. I am trying to develop an automatic cleaning script and would like to have this as one of the specifications.
Thank you in advance for your time.
Welcome to the mrtrix3 community!
Sounds like the objective here is to extract streamlines that originate in ROI1 and terminate in ROI2 (and vice versa). To do this, check out tckedit. Something like this should work:
tckedit $tck_file_in $tck_file_out -include $ROI1 -include $ROI2 -ends_only
and if SIFT2 has been completed, then the weights options can be included, as follows:
tckedit $tck_file_in $tck_file_out -include $ROI1 -include $ROI2 -ends_only -tck_weights_in $tck_weights_in_path -tck_weights_out $tck_weights_out_path
Hope this helps!