Tckgen -algorithm Tensor_Prob not selecting any streamlines

Hi MRTrix Experts,

I am trying to update my old processing protocol and have run the following command but I’m not sure why it is not selecting any steamlines. Here is the command, followed by the output from my terminal:

tckgen dwi.nii.gz -fslgrad bvecs bvals -algorithm Tensor_Prob -mask b0_brain_mask.nii.gz -seed_image anat2diff_wm-mask.nii.gz -number 120000 S01_wholebrain_prob_120k.tck
tckgen: [100%] uncompressing image "b0_brain_mask.nii.gz"
tckgen: [100%] uncompressing image "b0_brain_mask.nii.gz"
tckgen: [100%] uncompressing image "anat2diff_wm-mask.nii.gz"
tckgen: [100%] uncompressing image "dwi.nii.gz"
tckgen: [100%] preloading data for "dwi.nii.gz"
tckgen: [ 0%] 11999831 generated, 0 selected
tckgen: [WARNING] less than desired streamline number due to implicit maximum number of attempts; set -maxnum 0 to override
tckgen: [100%] 12000000 generated, 0 selected

I feel like I am just missing something so basic and obvious that I cannot see it. Any help greatly appreciated!

I’m not sure what the problem might be, but the first thing to check is that your seed image (anat2diff_wm-mask.nii.gz) genuinely contains ones where you expect it to, and that it aligns properly with the dwi.nii.gz when displayed in MRView - the latter is important, other viewers may not show the images in scanner coordinates, you might not see any misalignment. The same goes for your brain_mask.nii.gz.

Other than that, the next question is whether there’s anything wrong with your dwi.nii.gz, but assuming you can derive a decent-looking FA map from it, I can’t see this being the problem…

Just tested, I’m actually experiencing the same issue when using Tensor_Prob. Using the same parameters (just a brainmask for masking as well as seeding) and same dataset, but with the Tensor_Det algorithm, gives me the normal expected results…

Thanks for the report. Looks like the tensor_prob algorithm bootstrapping code was not updated to reflect changes to how the image tri-linear interpolation is done. This was preventing the algorithm from reading the correct image values.

I have one more small thing with respect to this algorithm that I want to check; once I’m done, and it shows on this page that the fix has been merged into the master branch, you should be able to update your code, re-compile, and tracking should then work as expected.

Cheers
Rob