Tckstats with and without SIFT2 : no streamline count change?

Hello dear MRtrix community ! :wave: :grinning:

I’ve been starting to use SIFT following this paragraph from MRtrix :

Use of SIFT for quantifying pathways of interest

In some circumstances, researchers may be interested in the connection density of one or two specific pathways of interest, rather than that of the whole brain. SIFT is still applicable in this scenario; however the SIFT algorithm itself is only applicable to whole-brain fibre-tracking data. Therefore, the workflow in this scenario should be: * Generate a whole-brain tractogram; * Apply SIFT; * Extract the pathway(s) of interest using tckedit. * Get the streamline count using tckinfo.

Yet I’ve switched to SIFT2 instead of SIFT1 as it was faster, described by posts here and SIFT2 paper as computationally efficient version of SIFT1 and thus requiring less data storage but I’ve encountered some issue (or maybe it’s normal?) while using it :
(My pipeline is as follows : )

  1. I generate tractograms using tckgen command with several options like seeds per voxel, algorithm (Tensor_Det and iFOD2), FA cutoff, …
  2. Then I use tcksift2 whole-brain.tck wmfod.mif sift2weights.txt on the whole-brain tractograms to obtain streamlines weights scalar file
  3. I follow with tckedit -include ROI.mif -include ROI2.mif whole-brain.tck ROI.tck -tck_weights_in sift2weights.txt -tck_weights_out ROIsift2weights.txt , for ROIs of let’s say left and right of corpus callosum. I understand that I generate from that the sift2 streamlines weights for said ROI.
  4. I compute statistics of ROI.tck with said sift2 streamlines weights as input too in tckstats such as : tckstats -output count -output median -output mean -output std -ouput min -output max ROI.tck -tck_weights_in ROIsift2weights.txt

I thus retrieve the computed statistics to compare with and without SIFT2 cases and I obtained the exact same numbers in streamlines count for both cases but slightly different values in other metrics such as mean or median…

My question stands : is it normal to obtain such behaviour from SIFT2 when SIFT1 was filtering ROI.tck into smaller amount of streamlines, leading to smaller streamlines count ? And if so why is it the case ?

Or is it from the way I handle SIFT2 ? I listed some possibilities I could think of there :
-Is tckstats supposed to receive instead sift2weights.txt of the whole-brain tractogram rather than ROIsift2weights.txt ?
-Is it a matter of order in options used in the MRtrix command ? (Let’s say every options should be before the input/output such as tckstats [options] in.tck ?)
-Is SIFT2 not relevant when looking at streamlines count ?
-I’ve seen in a post (SIFT2 with no ACT) that it was recommended to use ACT with SIFT2 but it’s not the case, could it be the root cause of this ?
-Should I rely on tckinfo instead for streamlines count ?
-… ?

I’m eager to get your answers on this issue (and hoping that this can help some future users later on too) !

Arno.

Supplement Update :
I tried switching my SIFT2 weights files to .csv format when they are produced and used after seeing the MRtrix example for tck2connectome :

tck2connectome tracks.tck nodes.mif connectome.csv -tck_weights_in weights.csv -out_assignments assignments.txt

But to no avail as I encountered the same phenomenon :


First lines of both are :
Count Mean Median Std Min Max
2596 |7.14447546 | 6.8471508 | 3.69905853 | 0.349859953 | 23.3301945

2596 |5.88046265 | 5.38786221 | 3.3851223 | 0.349859953 | 23.3301945 (SIFT2)
Hence a difference in Mean Median and Std yet none on Count,Min and Max…

Arno.