Select streamlines connecting specific nodes

Hi,

I would like to perform tractography (and obtain a connectivity matrix) between specific nodes of interest that are not part of an atlas, but are derived elsewhere. More specifically, I have 24 masks files (in nifti format and registered to dwi) and I want to obtain the fibres count (and ideally the FA) between each pair of regions (resulting in a 24X24 connectivity matrix).

I seem to understand that a common approach is to tract the whole brain streamlines (with tckgen), which I already did, and to then select the streamlines connecting specific nodes. If I understand correctly there should be two possibilities to select the streamlines of interest:

Use tckedit. But from what I understand the -include option in this command would allow to compute the streamlines that connect a pair of ROIs only. In my case, I should do this an enormous number of times, as I want to compute the number of streamlines connecting all the 24 regions between them.

Use connectome2tck. But from my interpretation this command allow to select streamlines connecting seeds within the freesurfer parcellation, which is not my case.

Is there any other way to select streamlines between pairs of seeds nodes?

Thank you in advance!

I’d say tck2connectome is the way to go. It’s not dependent on the freesurfer parcellation, you just need to provide the nodes image in the right format. But this might be a bit tricky if you’ve got a whole bunch of separate mask images currently… @rsmith, do you have any convenience commands to help out with the process of generating a nodes image from a set of ROIs…?

Use tckedit. But from what I understand the -include option in this command would allow to compute the streamlines that connect a pair of ROIs only. In my case, I should do this an enormous number of times, as I want to compute the number of streamlines connecting all the 24 regions between them.

This is the way that many people had constructed connectomes in the past. But it’s far from ideal, and not just because of the computational expense of running tckedit multiple times. For instance: If a track passes through more than two ROIs, then it will contribute to more than one edge in the connectome. Additionally, if a streamline terminates just prior to entering a parcel, tckedit will fail to assign the streamline to that parcel.

Use connectome2tck. But from my interpretation this command allow to select streamlines connecting seeds within the freesurfer parcellation, which is not my case.

The goal of the labelconfig / tck2connectome design is that it should be possible to use parcellations from any source to estimate pairwise connectivity in a robust way. Indeed we demonstrated this year at ISMRM how the combination of ACT with the (relatively simple) mechanism used in tck2connectome for assigning streamlines to grey matter parcels is robust against differences in parcellation schemes.

@rsmith, do you have any convenience commands to help out with the process of generating a nodes image from a set of ROIs…?

I don’t; depending on the nature of those mask ROIs, it may be a relatively simple operation to perform, but it’s difficult to provide something that will perform as expected in all cases (and different users have different expectations of what it will do in certain circumstances).

@Marica_Padula: The main determining factor is whether or not the individual mask images contain any overlap, either in subject or template space:

  • If there’s no overlap between them in template space, then probably the best approach is to convert those individual mask images into a parcellation label image in template space, that can then be warped to each individual subject in a single step (as opposed to individually warping 24 masks for each subject).

  • If there is overlap between them, then generally my recommendation is actually to null any voxels containing more than one parcel in subject space. This allows the tck2connectome mechanism to make the decision regarding which parcel to assign a particular streamline to, rather than relying on heuristic mechanisms for resolving those voxel labelling ambiguities. But this is a decision you need to make yourself, and implement explicitly.

For the fundamental operation (combining 24 non-overlapping mask images into a single label image), you could try something like this (not guaranteed to work out of the box, just laying the idea down). Imagine you have files named as 1.mif … 24.mif.

for i in $(seq 2 24); do
  STRING=${STRING}" ${i}.mif ${i} -mult -add"
done
mrcalc 1.mif ${STRING} -datatype uint32 labels.mif

That produces a long call to mrcalc that, for each of the 24 images, multiplies by the integer corresponding to that label, and adds it to the label image. But as mentioned before, this breaks down if there’s any overlap between the input images.

Cheers
Rob

Hello @Marica_Padula
I was presenting the same trouble because I usually need to work with several regions of interest. I built my nodes_in (from tck2connectome) in Matlab using Marsbar toolbox from nifti images and exporting them as a “number labelled ROI images”. Later, I converted the output nifti to compressed FSL nifti. After that I converted the images to .mif and I could run tck2connectome without any issue.
Maybe it’s a little late because is an old post but it could be helpful to somebody else.
I hope that works for you too.
Cheers,
Daylin

1 Like