Whole brain tractography : Incorrect Fiber directions

Hi MRtrix3 Team,

Recently I did tckgen to generate whole brain tractogram using single shell CSD technique. My diffusion data has single b-value of 800 and 15 directions. I used ‘Tournier’ method for RF and ‘CSD’ method for single shell single tissue FOD computations. I also generated 5TT image using T1 image registered to Diffusion space. Whole brain tractogram was generated using tckgen with ACT, dynamic seeding from WM FOD and 5M streamlines. The tractogram that I obtained showed wrong fiber directions. For eg, the corpus callosum shows blue colored whereas it is expected to be in red for fibers connecting right-left. I would like to have your suggestions on what could be the mistake in my approach. Does it involve changing x/y/z sign in generating mif files?
PFA attached few screenshots showing DTI FA map, CSD FOD image, WB tractogram.

That will most likely be a mismatch between the DWI image and the bvecs file. Where did you get these data from? We generally try very hard to get the DICOM import right, but we can’t provide the same guarantees when provided with NIfTI data with associated bvecs/bvals, and it’s very easy for them to become inconsistent…

Hi Tournier,

This data was acquired few years back as part of our study. Do you have any suggestions on how to check the compatibility between bvecs and the DWI image or how to check the correctness of bvecs?
For testing, I tried fiber tracking with GQI reconstruction in DSI Studio and the fibers look correctly oriented. PFA the WB tck from DSI Studio tracking.


I would recommend trying the dwigradcheck utility for this. It should pick up any discrepancies and correct them for you. :crossed_fingers:

Thank you for the suggestion. Will try it out and let you know.


Hi @rajikha,

If I remember correctly, DSI Studio internally does a gradient check. So, as @jdtournier suggested, running dwigradcheck should give you the correct orientation.

Best regards,


Hi Tournier and Manuel,
Thanks for the suggestions.

I think the dwigradcheck solved the problem. Could you please check the attached figures showing WM tracts and WM FOD and let me know if this looks fine?


Well it certainly looks a lot more anatomically plausible – if a little noisy, which is not unexpected given your acquisition parameters (low b with very few directions). But the gradient directions mismatch certainly seems to have been fixed.

I would recommend going through the steps that led to the mismatch in the first place, and trying to sort this out at source if possible. While dwigradcheck does a very good job of fixing the issue, it’s not infallible. If you have a lot of these data to process, I would invest the time to fix this properly.

Thank you for the timely help on fixing the issue and the heads up for correcting the root cause.


Hi @rajikha

The space in DSIstudio is fine but importing MRtrix will cause coordinate problems

Your DWI can be perfectly aligned with TCK, what should I do?
Thank you very much