SNR definition in MRIQC

Hello everyone,
I have a question about SNR definition in MRIQC.

According to MRIQC documentation, under the tab “mriqc.qc.anatomical.snr(mu_fg, sigma_fg, n)”, SNR is calculated as ratio between the mean of the foreground and the standard deviation of the same region. Tracula, a software to analyze DWI, provides SNR as the ratio between the mean of the white matter and the standard deviation of the same white matter. So the definition is in line with the formula in MRIQC summary.

However, at the same link of MRI documentation, in the formulas from the article “Magnotta et al, 2006” and from Table 2 in the article “Esteban et al, 2017” (used as reference articles), SNR is mentioned as ratio between the mean of the foreground and the standard deviation of air (=background). Also QAP documentation (it is written that MRIQC is based on that) said that “The mean intensity within gray matter divided by the standard deviation of the values outside the brain”

Which definition is the correct one?

Thank you in advance for the discussion / answers

Hi @cbaronio, welcome to Neurostars!

Actually as you have noticed, there are 2 SNR definitions used in MRIQC:

  • the one noted “SNR” is calculated as ratio between the mean of the foreground and the standard deviation of the same region.
  • the second one noted SNRd (for Dietrich), is mentioned as ratio between the mean of the foreground and the standard deviation of air (=background).

Here is an example below, from a T1w group HTML report:

But there are even more definitions out there! You can look at this literature if you want to know more:

(1) Goerner, F. L.; Clarke, G. D. Measuring Signal-to-Noise Ratio in Partially Parallel Imaging MRI: Signal-to-Noise Ratio in Parallel Imaging MRI. Medical Physics 2011, 38 (9), 5049–5057. https://doi.org/10.1118/1.3618730.

(2) Kellman, P.; McVeigh, E. R. Image Reconstruction in SNR Units: A General Method for SNR Measurement. Magnetic Resonance in Medicine 2005, 54 (6), 1439–1447. https://doi.org/10.1002/mrm.20713.

(3) Dietrich, O.; Raya, J. G.; Reeder, S. B.; Reiser, M. F.; Schoenberg, S. O. Measurement of Signal-to-Noise Ratios in MR Images: Influence of Multichannel Coils, Parallel Imaging, and Reconstruction Filters. Journal of Magnetic Resonance Imaging 2007, 26 (2), 375–385. https://doi.org/10.1002/jmri.20969.

The situation gets even more complicated for fMRI:

(1) Welvaert, M.; Rosseel, Y. On the Definition of Signal-To-Noise Ratio and Contrast-To-Noise Ratio for FMRI Data. PLoS ONE 2013, 8 (11), e77089. On the Definition of Signal-To-Noise Ratio and Contrast-To-Noise Ratio for fMRI Data.

Depending on your acquisition settings and your image type, one definition might be more relevant than the other. Obviously it is important to stick to the same definition if you want to compare images.

I hope this helps!

Thank you for your answer (and your welcome!)

Yes, I wasn’t sure about the correspondence between SNR calculation in MRIQC and MRIQC reference papers. I will keep the formulas as the “real” definition.
Even because this also happens for CNR: in Magnotta 2006 the denomitator is stdev of air, whereas in the formula the denominator is sqrt(stdev background^2+stdev white matter^2+stdev grey matter^2)

Surely, having the same definition is what is needed, this is why I asked :wink: I have to study a way to retrieve stdev of air and I will be ready to check my parameters

Are you calculating the SNR on T1w images?

Be aware of the following statement for parallel imaging (if parallel acceleration is used for image acquisition , such as GRAPPA or SENSE):

Alternative methods that rely on measurement of noise from regions of interest in the signal-free background (1,2) are not appropriate for parallel imaging where the noise level is highly variable across the field-of-view. The variation in noise across the FOV, the so-called g-factor (5), arises due to the ill-condition of the inverse solution used in parallel imaging.

And from Dietrich (2007):

The conventionally determined SNR based on separate signal and noise regions in a single image will in general not agree with the true SNR measured in images after the application of certain reconstruction filters, multichannel reconstruction, or parallel imaging.

I have read it, thank you. I am indeed checking SNR on T1W images (and DTI images, too).
I am still a bit concerned about SNR in MRIQC, because I cannot understand completely which “foreground” is considered in the program. White matter, grey matter, or an average of both?

Which mriqc version are you running and which metric are you looking at?

snr_total or snrd_total seem to be calculated in the union of WM, GM and CSF masks:

It is what I understand from this code: mriqc/anatomical.py at master · nipreps/mriqc · GitHub

        # SNR
        snrvals = []
        self._results["snr"] = {}
        for tlabel in ["csf", "wm", "gm"]:
            snrvals.append(
                snr(
                    stats[tlabel]["median"],
                    stats[tlabel]["stdv"],
                    stats[tlabel]["n"],
                )
            )
            self._results["snr"][tlabel] = snrvals[-1]
        self._results["snr"]["total"] = float(np.mean(snrvals))

        snrvals = []
        self._results["snrd"] = {
            tlabel: snr_dietrich(
                stats[tlabel]["median"],
                mad_air=stats["bg"]["mad"],
                sigma_air=stats["bg"]["stdv"],
            )
            for tlabel in ["csf", "wm", "gm"]
        }
        self._results["snrd"]["total"] = float(
            np.mean([val for _, val in list(self._results["snrd"].items())])
        )