If you specifically want to extract those streamlines from one parcel to all / a large number of other parcels, then manipulating the data as a “connectome” is the more robust & efficient way of doing so.
Say, for instance, you have a parcellation image where the amygdala of interest is node number 41. You then want those streamlines that connect from that region to every other region, such that, for example, connections from the amygdala to the entorhinal area (let’s say, parcel number 5), are stored within one track file; connections from the amygdala to some other parcel are written to another track file, and so on.
tck2connectome tractogram.tck parcellation.mif connectome.csv -out_assignments assignments.csv
will give you the vital file assignments.csv
, which encodes which two parcels each streamline was assigned to.
Now, to separate the tractogram into separate files, one for each connection from the amygdala to another parcel:
connectome2tck tractogram.tck assignments.csv edge_tracks_ -nodes 41 -files per_edge
From this, you will get a series of files:
edge_tracks_41_1.tck
edge_tracks_41_2.tck
edge_tracks_41_3.tck
edge_tracks_41_4.tck
edge_tracks_41_5.tck
...
Each of these files contains the tracks from parcel number 41 (the amygdala) to another parcel, where the target parcel is captured within the name of the file. So connections from the amygdala (41) to the entorhinal area (5) would be stored in file edge_tracks_41_5.tck
.
connectome2tck
is fairly powerful and flexible in how it can capture & store specific tracks of interest based on assignments of streamlines to parcels; but it takes a deep understanding of exactly what you’re trying to achieve with it in order to configure it properly. Though it may well be a bit of fun to just play around with the options and see what it gives you.
Rob