Welcome Jacek!
What you’re essentially asking for here is sometimes referred to as “connectivity-based parcellation”. It can however be difficult to find prior discussions when you’re not even sure which search terms to use! This is the most recent relevant thread I think. I have a script (provided on good faith) that is not a part of MRtrix3 but uses MRtrix3 commands in such a way as to provide the key reconstruction data, which can then be analyzed manually.
In your specific case, if you want to fully tailor the experiment, what you would do is:
-
Generate a parcellation image where M1 voxels have the value 1, all labelled voxels not in M1 have the value 2, and all unlabelled voxels retain the value 0. This could be done with some
mrcalc
work. -
Use the thalamus as the mask input to that script, and the image from 1 as the parcellation image.
What you will then have in the output of that script is, for every voxel in the thalamus, the number of streamlines for which the endpoint was: (1) not assigned to a parcel; (2) assigned to M1; (3) assigned to anything other than M1. That image could indeed be visualized directly.
Cheers
Rob