Deterministic algorithm after SD

Dear Community,

I have just downloaded Mrtrix3 to run some tractography analyses.

Reviewers of my data have suggested me to compare the performace of Mrtrix3 using spherical deconvolution (SD) and a “simply” deterministic algorithm for reconstruction of cortico-spinal tract with the probabilistic analysis I run (using bedpostx). I use a clinical scanner (bvalue=900 s/mm2, 25 diffusion gradient directions).

I run dwi2response on nifti data, then dwi2FOD obtaining my SH image which seems ok, since I then performed the tckgen reconstruction with the default algorithm option iFOD2 and the tracts look ok.

Trying tckgen -algorithm tensor_det -fslgrad bvecs bvals with all ROIs option and giving as input the SH.nii.gz file, returns to me an error: "error importing diffusion gradient table for image “SH.nii.gz” ".

Is it possible to perform determinist reconstruction of the tract using a processing line like that I thought?

Thank you for your help


OK, that is indeed not the most helpful error message. The problem is that when performing tensor tracking (which the -tensor_det algorithm implies), tckgen expects the input data to be the raw DWI, not the FOD/CSD data. The reason for the error message is that your bvecs/bvals won’t match with the CSD data (number of volumes not equal to number of entries in bvecs/bvals).

In any case, all you need to do is to pass the DWI data as the first argument to tckgen instead of your SH.nii.gz file.


thanks a lot. I tried and it works.

In this way tckgen does not “use” the CSD data. Am I anyway performing spherical deconvolution and determinitstic tracking?
Thanks again,


No, if you were intending using the CSD deterministic tracking, the algorithm for that is sd_stream - and it does expect the SH.nii.gz as input.

Thanks a lot,