Preprocessing advice before eddy correction

Hello,

I’m new to MRtrix and I have a few questions about preprocessing before eddy correction.

1- I’m aware that dwidenoise should be the initial preprocessing step before anything else. But how should my dwi data be organized? Currently my dwi.nii.gz consists of an image with no diffusion every 8 images with diffusion. Can I simply feed dwi.nii.gz to dwidenoise? Shouldn’t I specify bvals somewhere?

2- I assume that B1 field inhomogeneity and Gibbs artifact are not corrected with dwidenoise. Can I still apply dwibiascorrect and mrdegibbs after dwidenoise (but before eddy correction)?

3- are there any other preprocessing steps you would recommend before running eddy?

Thank you!

Hi,

From my experience, you don’t need to specify bvals and bvecs for dwidenoise, however if you convert your data to .mif as a first step, you don’t need to worry for that anymore (I always use nifti because an old habit).

The ordet in which I apply the commands are (and is the recommended):

  • dwdenoise
  • topup + eddy
  • dwibiascorrect

I don’t use mrdegibbs, I was not sure when I started to process the data because I have partial fourier acquisition, but now I would probably run it after dwidenoise.

I hope this helps.

Best regards,

Manuel

1 Like

dwidenoise does not use the gradient infomation so you don’t need to provide it. That said, the easiest and most foolproof way of processing your diffusion weighted images is to use .mif files instead of .nii. .mif files can include the gradient info inside the image header, which means you can pass it to any mrtrix command without having to worry about the gradients. The gradients will even be updated automatically, e.g. if you rotate your images. See https://mrtrix.readthedocs.io/en/latest/concepts/dw_scheme.html for details on gradient handling.

The recommended order is:

  • dwidenoise
  • mrdegibbs
  • dwipreproc
  • dwibiascorrect

Thank you for your answers!
I’m using a previous script that runs FSL’s eddy, but I’d like to remove confounds with MRtrix3 before passing the data over to eddy. I suppose I can use mif during the dwidenoise and mrdegibbs calls and then convert it back to nii, right?

However eddy also rotates my bvecs - if dwidenoise updates the gradients, can I still use the standard eddy function? Won’t the bvecs be rotated twice then?

Hi,

dwidenoise or mrdegibbs don’t use the gradient information, so you can use nifti to both steps. and let eddy alone take carr for the rotations.

Best regards,

Manuel

Just in case there’s any confusion here: dwipreproc will run FSL’s eddy for you (and optionally topup), and take care of all these issues. You can inspect the exact commands it runs in the background, and the contents of the temporary folder it creates if you want to verify that it does what you expect. I would recommend you use that script unless you have exotic data that it can’t handle – @rsmith had devoted quite a bit of time and effort to making sure that it works correctly in as many use cases as possible. The advantage is that you can pass .mif files to it and get the output in that format too, which means the DW information is kept within the image headers and maintained consistently throughout the pipeline.