dwidenoise applied to complex data


I have phase and magnitude data acquired with a Siemens PRISMA scanner at a reasonably low SNR. I tried applying dwidenoise in the complex data but I am not sure it is performing better. For instance, I can see the noise floor reduced in some parts and maybe less blurriness when denoising the complex data, but it also returns lower SNR/CNR and visually looks noisier than denoising the magnitude data. I wonder whether this is the behaviour expected or I am doing something wrong. So far, I followed similar steps commented on in previous forum entries (Unwrapping before dwidenoise on complex-valued data) or your guidelines (https://readthedocs.org/projects/mrtrix/downloads/pdf/latest/):

  1. Rescale phase from (-4096:4096) to (0,2pi).
  2. mrcalc Mag.nii.gz Ph_rad.nii.gz -polar complex.nii.gz
  3. dwidenoise complex.nii.gz denoised.nii.gz -noise noisemap.nii.gz
  4. mrcalc denoised.nii.gz -abs abs_denoised.nii.gz

Attached is a screenshot of what I get when applied to magnitude vs complex data.

Thank you so much for your help!

1 Like

Hi @josepman,

OK, that’s clearly not what we would have expected… My guess is that the initial conversion of the phase is not quite right, but I have to admit there may be more going on. I’ve looked into this a bit yesterday as we are also in the process of setting up a protocol here, here are my findings so far (I’ll need to dig deeper in due course, but that’ll have to wait till after the Easter break).

I’ve tested 3 cases, all on the same 1.3mm isotropic, b = 0, 1000, 2500 s/mm², 131 volume 7T dataset:

  • magnitude data only
  • complex with phase correctly converted. This rescales the data from [ -4096 4096 ) to [ -π π ) (should be equivalent to [ 0 2π )). This was done using this command:
    mrcalc DICOM_DWI_mag/ DICOM_DWI_phase/ pi 4096 -div -mult -polar dwi_complex_correct.nii
  • complex with the incorrect phase conversion. This rescales the data from [ 0 4096 ) to [ 0 2π ) – which is likely correct for some datasets, but as it happens, not for this one… This was done using this command:
    mrcalc DICOM_DWI_mag/ DICOM_DWI_phase/ 2 pi -mult 4096 -div -mult -polar dwi_complex.nii

The results look like this:

DW volumes

two examples – all on the same intensity scale:

Noise maps:

All on the same intensity scale:

What does this tell us?

Main take-home points:

  • if the phase is not converted correctly, the estimated noise level is higher, and the images produced appear somewhat noisier (compared to magnitude or correctly-converted complex), and it looks like the intensity itself is lower than expected in places.

  • if the phase is correctly converted, the estimated noise level is similar to that estimated from the magnitude data – if anything, very slightly higher. But the images produced appear significantly noisier than those from the magnitude data.

  • the Rician / magnitude noise bias is considerably lower using complex data – as expected.

So all in all, it looks like the initial phase conversion could be an issue (hard to tell from what you show without knowing the intensity scale on the noise map), but even with the correct phase, the denoised complex images do indeed appear slightly noisier than I would have expected, based on my experiences a while back when we were initially tinkering with these concepts (quite a few years ago now…). So I will be looking into this more closely when I next get the chance…

Any thoughts about this, @dchristiaens…?


1 Like

Quick update on this topic while I have a minute…

It looks like the essential step missing for complex denoising to work well is the phase correction. There are different ways of implementing this step, but the simplest is probably just to run a first pass MP-PCA on the complex DWI, then use the phase of this output to correct the phase of the raw DWI, then run MP-PCA again on that (steps to reproduce below).

With this, I get these outputs:

These correspond to the (top to bottom):

  • original magnitude data
  • magnitude data, denoised using regular MP-PCA
  • complex data, denoised as-is using complex MP-PCA, followed by magnitude transform
  • complex data, phase-corrected from first-pass complex MP-PCA, then denoised again using complex MP-PCA, followed by magnitude transform

You can see that the phase correction really seems to help here, and provides outputs that are visually at least as clean as magnitude MP-PCA, but with better rectification of the noise floor.

For reference, these are the corresponding noise maps produced:


Steps to reproduce:

  1. convert DICOM data to complex
  2. run first-pass complex MP-PCA
  3. correct phase of original data based on phase of first-pass MP-PCA run
  4. run second-pass MP-PCA on phase-corrected data
  5. perform final magnitude transform

These are implemented below assuming magnitude & phase DICOM data stored in the DICOM_DWI_mag and DICOM_DWI_phase folders respectively:

mrcalc DICOM_DWI_mag/ DICOM_DWI_phase/ pi 4096 -div -mult -polar complex.mif
dwidenoise complex.mif complex_dn.mif -noise noisemap.mif
mrcalc complex.mif complex_dn.mif complex_dn.mif -abs -div -conj -mult complex_pc.mif
dwidenoise complex_pc.mif denoised_pc_dn.mif -noise noisemap_pc.mif
mrcalc denoised_pc_dn.mif -abs denoised_pc_dn_mag.mif