Unwrapping before dwidenoise on complex-valued data

In cases where both magnitude and phase data are available, should dwidenoise be run before or after phase unwrapping? I know that the documentation says that “image denoising must be performed as the first step of the image processing pipeline,” but I’m not sure how that works with complex-valued data.

My planned workflow is:

  1. Rescale phase data from Siemens scale (-4096:4094) to 0:2pi.
  2. Phase unwrapping.
  3. Combine magnitude and phase data.
  4. dwidenoise.
  5. Separate denoised complex data into magnitude and phase.

One possibly major caveat is that I would like to apply this to fMRI data instead of DWI data, as is done in Adhikari et al. (2019). I am not very familiar with DWI data, unfortunately, so I apologize if the workflow doesn’t make sense for DWI data (e.g., if DWI phase data don’t have the same units or are already unwrapped or something).

Hi – nice to hear you’re using dwidenoise on complex data.

Phase unwrapping does not affect complex numbers in any way. Rather, it serves to avoid spatial discontinuities that arise when converting complex images to phase images at the bounds of the 0-2pi domain. Specifically, phase unwrapping will determine an integer number of 2pi rotations to apply in each voxel in order to make the phase maps look smooth without changing the complex number itself. Therefore, whether you apply phase unwrapping before denoising or not makes no difference to the output.

Therefore, if you like to inspect phase images, or if you need it for some other purpose, you can use phase unwrapping. Otherwise, I would not bother and leave out Step 2.

As a small side-note, some works that use dMRI denoising in the complex domain include a phase demodulation step, which removes the linear (or low-order) phase component. This is because subject motion during the diffusion preparation destroys the phase, leading to phase incoherence across the different volumes in the scan. Since you are working with fMRI data, this point does not apply: the phase is generally coherent throughout the sequence (roughly the B0 field) and there is no need for demodulation.

Finally, the improvement of denoising the complex data over denoising the magnitude images will be largest in low SNR data. Since fMRI data is typically of much higher SNR, I’m curious to see if denoising in the complex domain will produce a clear difference compared to magnitude-domain denoising in your data.

Cheers
Daan

1 Like

Thank you, that’s very helpful. Most of the papers I’ve seen that apply local MPPCA don’t use complex data or don’t mention much about handling of the phase data, and I never realized that unwrapping doesn’t actually affect the complex number.

When I applied to dwidenoise to some of my fMRI data, the results were pretty much the same whether I used magnitude or complex denoising. I’m glad that that wasn’t because I was doing something wrong.