MRtrix3 / mrtrix3

MRtrix3 provides a set of tools to perform various advanced diffusion MRI analyses, including constrained spherical deconvolution (CSD), probabilistic tractography, track-density imaging, and apparent fibre density
http://www.mrtrix.org
Mozilla Public License 2.0
294 stars 181 forks source link

dwidenoise: Linear phase removal #3037

Open Lestropie opened 3 hours ago

Lestropie commented 3 hours ago

Pinging @dchristiaens, @jdtournier.

There is some concern that the complex data denoising may currently be sub-optimal due to the presence of strong phase cycles:

  1. Locally, in a project doing denoising of fMRI data (@bahmantahayori), the temporal SNR seems to be better for magnitude-denoised data than complex-denoised data.

  2. Lucilo's work included a method for estimating and removing a linear phase term from the data prior to denoising. Presumably this was deemed necessary for a reason.

  3. Donald noted here that the absence of phase correction could be a problem. I'm a little sceptical of the method proposed there though---it feels like double-dipping---and apparently it wasn't enough to resolve the performance of complex fMRI denoising relative to magnitude denoising for our data.

  4. In this article, they have seemingly made a similar observation about poor performance of dwidenoise complex data denoising. There they do something different:

    MPPCA applied to complex data (rotated along the real axis), denoted as MPPCA*. We applied the MrTrix3 implementation of the magnitude MPPCA to the complex data rotated to the real axis (we found that this approach was more stable in terms of handling phase images and achieved better denoising, compared to the MrTrix3 complex MPPCA implementation).

    My best reading of this is that they have split the complex domain into two domains on either side of the imaginary axis. For complex values with a negative real part, they "rotate onto the (negative part of the) real axis", ie. take the negative of the magnitude; for complex values with a positive real part, they "rotate onto the (positive part of the) real axis", ie. take the magnitude. They then just run "real-valued" MPPCA. If this is the correct interpretation, and it does better than complex denoising, that's disconcerting.

  5. For data from the CMRR sequence prior to version R017, with SENSE1+ reconstruction, the complex reconstruction of each slice stack is independent of all other slice stacks. This means that the phase can be totally incoherent between adjacent slices, even in the absence of motion-induced phase ramps (below is b=0):

    Screenshot from 2024-11-19 15-51-36

    This is going to increase the rank of the signal. In pre-release version R017 of that sequence they estimate the multi-coil reconstruction differently so that it is smooth along the slice encoding direction (below is b=0 with new sequence, though different scanner):

    Screenshot from 2024-11-19 15-53-38


Putting all of this together, it seems to me that we are in need of some kind of mechanism internal to dwidenoise for regressing out uninformative phase differences. My intuition is that it would not be too difficult to use the same method as Lucilo used, on a slice-by-slice basis. However that would not resolve the issue specific to the CMRR sequence of having substantial phase differences between adjacent slices. I can imagine an exceptionally crude algorithm that leaves the central slice unmodified, and for the slice above and below, computes the optimal slice-wise phase offset to minimise the phase difference between it and the adjacent slice, then repeats until the whole FoV is processed. Alternatively, according to:

By assuming stationarity and employing the Fourier shift theorem, the linear phase ramp and offset are respectively estimated as the harmonic corresponding to the position of the maximum of the Fourier transform of the complex image and the phase at this maximum.

, would this tend to yield a close-to-zero phase for most of the image, and therefore intrinsically handle inter-slice phase offsets?

BahmanTahayori commented 2 hours ago

Thanks @Lestropie for opening this issue. About this paper the code is available . It seems rotation along/to the real axis is a simplified explanation of what is done in lines 255-285, removing static and dynamic phase components. This is done by multiplying the complex data with the complex conjugate of the mean phase and the filtered phase. I am not familiar with Tukey window but it seems that it is used for apodization. Perhaps, it is doing the linear phase removal!

As discussed previously, I tried this two-pass MPPCA approach approach, however, the magnitude-only result showed a higher tSNR and the detected activation volume/mean t-score within the language ROI after all processings (fmriprep+TEDANA+ibt) were higher for the magnitude-only approach.