IQMs for structural images¶
Measures based on noise measurements¶
cjv()
– coefficient of joint variation (CJV): Thecjv
of GM and WM was proposed as objective function by [Ganzetti2016] for the optimization of INU correction algorithms. Higher values are related to the presence of heavy head motion and large INU artifacts. Lower values are better.
cnr()
– contrasttonoise ratio (CNR): Thecnr
[Magnota2006], is an extension of the SNR calculation to evaluate how separated the tissue distributions of GM and WM are. Higher values indicate better quality.
snr()
– signaltonoise ratio (SNR): calculated within the tissue mask.
snr_dietrich()
: Dietrich’s SNR (SNRd) as proposed by [Dietrich2007], using the air background as reference.
art_qi2()
: Mortamet’s quality index 2 (QI2) is a calculation of the goodnessoffit of a \(\chi^2\) distribution on the air mask, once the artifactual intensities detected for computing the QI1 index have been removed [Mortamet2009].
Measures based on information theory¶
efc()
: The EFC [Atkinson1997] uses the Shannon entropy of voxel intensities as an indication of ghosting and blurring induced by head motion. Lower values are better.The original equation is normalized by the maximum entropy, so that the EFC can be compared across images with different dimensions.
fber()
: The FBER [Shehzad2015], defined as the mean energy of image values within the head relative to outside the head [QAPmeasures]. Higher values are better.
Measures targeting specific artifacts¶
inu_* (nipype interface to N4ITK): summary statistics (max, min and median) of the INU field as extracted by the N4ITK algorithm [Tustison2010]. Values closer to 1.0 are better.
art_qi1()
: Detect artifacts in the image using the method described in [Mortamet2009]. The QI1 is the proportion of voxels with intensity corrupted by artifacts normalized by the number of voxels in the background. Lower values are better.wm2max()
: The whitematter to maximum intensity ratio is the median intensity within the WM mask over the 95% percentile of the full intensity distribution, that captures the existence of long tails due to hyperintensity of the carotid vessels and fat. Values should be around the interval [0.6, 0.8]
Other measures¶
fwhm (nipype interface to AFNI): The FWHM of the spatial distribution of the image intensity values in units of voxels [Forman1995]. Lower values are better. Uses the gaussian width estimator filter implemented in AFNI’s
3dFWHMx
:\[\text{FWHM} = \sqrt{{\left[4 \ln{(1\frac{\sigma^2_{X^m_{i+1,j}X^m_{i,j}}}{2\sigma^2_{X^m_{i,j}}}})\right]}^{1}}\]volume_fractions()
(icvs_*): the ICV fractions of CSF, GM and WM. They should move within a normative range.rpve()
(rpve_*): the rPVe of CSF, GM and WM. Lower values are better.summary_stats()
(summary_*_*): Mean, standard deviation, 5% percentile and 95% percentile of the distribution of background, CSF, GM and WM.overlap_*_*: The overlap of the TPMs estimated from the image and the corresponding maps from the ICBM nonlinearasymmetric 2009c template.
\[\text{JI}^k = \frac{\sum_i \min{(\text{TPM}^k_i, \text{MNI}^k_i)}}{\sum_i \max{(\text{TPM}^k_i, \text{MNI}^k_i)}}\]
References
[Dietrich2007]  (1, 2) Dietrich et al., Measurement of SNRs in MR images: influence of multichannel coils, parallel imaging and reconstruction filters, JMRI 26(2):375–385. 2007. doi:10.1002/jmri.20969. 
[Ganzetti2016]  (1, 2) Ganzetti et al., Intensity inhomogeneity correction of structural MR images: a datadriven approach to define input algorithm parameters. Front Neuroinform 10:10. 2016. doi:10.3389/finf.201600010. 
[Magnota2006]  (1, 2) Magnotta, VA., & Friedman, L., Measurement of signaltonoise and contrasttonoise in the fBIRN multicenter imaging study. J Dig Imag 19(2):140147, 2006. doi:10.1007/s102780060264x. 
[Mortamet2009]  (1, 2, 3, 4) Mortamet B et al., Automatic quality assessment in structural brain magnetic resonance imaging, Mag Res Med 62(2):365372, 2009. doi:10.1002/mrm.21992. 
[Tustison2010]  Tustison NJ et al., N4ITK: improved N3 bias correction, IEEE Trans Med Imag, 29(6):131020, 2010. doi:10.1109/TMI.2010.2046908. 
[Shehzad2015]  (1, 2) Shehzad Z et al., The Preprocessed Connectomes Project Quality Assessment Protocol  a resource for measuring the quality of MRI data, Front. Neurosci. Conference Abstract: Neuroinformatics 2015. doi: 10.3389/conf.fnins.2015.91.00047. 
[Forman1995]  Forman SD et a., Improved assessment of significant activation in functional magnetic resonance imaging (fMRI): use of a clustersize threshold, Magn. Reson. Med. 33 (5), 636–647, 1995. doi:10.1016/j.neuroimage.2006.03.062. 
mriqc.qc.anatomical module¶

mriqc.qc.anatomical.
art_qi1
(airmask, artmask)[source]¶ Detect artifacts in the image using the method described in [Mortamet2009]. Caculates \(\text{QI}_1\), as the proportion of voxels with intensity corrupted by artifacts normalized by the number of voxels in the background:
\[\text{QI}_1 = \frac{1}{N} \sum\limits_{x\in X_\text{art}} 1\]Lower values are better.
Parameters:  airmask (numpy.ndarray) – input air mask, without artifacts
 artmask (numpy.ndarray) – input artifacts mask

mriqc.qc.anatomical.
art_qi2
(img, airmask, ncoils=12, erodemask=True, out_file='qi2_fitting.txt', min_voxels=1000.0)[source]¶ Calculates \(\text{QI}_2\), based on the goodnessoffit of a centered \(\chi^2\) distribution onto the intensity distribution of nonartifactual background (within the “hat” mask):
\[\chi^2_n = \frac{2}{(\sigma \sqrt{2})^{2n} \, (n  1)!}x^{2n  1}\, e^{\frac{x}{2}}\]where \(n\) is the number of coil elements.
Parameters:  img (numpy.ndarray) – input data
 airmask (numpy.ndarray) – input air mask without artifacts

mriqc.qc.anatomical.
cjv
(mu_wm, mu_gm, sigma_wm, sigma_gm)[source]¶ Calculate the CJV, a measure related to SNR and CNR that is presented as a proxy for the INU artifact [Ganzetti2016]. Lower is better.
\[\text{CJV} = \frac{\sigma_\text{WM} + \sigma_\text{GM}}{\mu_\text{WM}  \mu_\text{GM}}.\]Parameters:  img (numpy.ndarray) – the input data
 wmmask (numpy.ndarray) – the white matter mask
 gmmask (numpy.ndarray) – the gray matter mask
Returns: the computed CJV

mriqc.qc.anatomical.
cnr
(mu_wm, mu_gm, sigma_air)[source]¶ Calculate the CNR [Magnota2006]. Higher values are better.
\[\text{CNR} = \frac{\mu_\text{GM}  \mu_\text{WM} }{\sqrt{\sigma_B^2 + \sigma_\text{WM}^2 + \sigma_\text{GM}^2}},\]where \(\sigma_B\) is the standard deviation of the noise distribution within the air (background) mask.
Parameters:  img (numpy.ndarray) – input data
 seg (numpy.ndarray) – input segmentation
Returns: the computed CNR

mriqc.qc.anatomical.
efc
(img, framemask=None)[source]¶ Calculate the EFC [Atkinson1997]. Uses the Shannon entropy of voxel intensities as an indication of ghosting and blurring induced by head motion. A range of low values is better, with EFC = 0 for all the energy concentrated in one pixel.
\[\text{E} =  \sum_{j=1}^N \frac{x_j}{x_\text{max}} \ln \left[\frac{x_j}{x_\text{max}}\right]\]with \(x_\text{max} = \sqrt{\sum_{j=1}^N x^2_j}\).
The original equation is normalized by the maximum entropy, so that the EFC can be compared across images with different dimensions:
\[\text{EFC} = \left( \frac{N}{\sqrt{N}} \, \log{\sqrt{N}^{1}} \right) \text{E}\]Parameters: img (numpy.ndarray) – input data

mriqc.qc.anatomical.
fber
(img, headmask, rotmask=None)[source]¶ Calculate the FBER [Shehzad2015], defined as the mean energy of image values within the head relative to outside the head. Higher values are better.
\[\text{FBER} = \frac{E[F^2]}{E[B^2]}\]Parameters:  img (numpy.ndarray) – input data
 seg (numpy.ndarray) – input segmentation

mriqc.qc.anatomical.
rpve
(pvms, seg)[source]¶ Computes the rPVe of each tissue class.
\[\text{rPVE}^k = \frac{1}{N} \left[ \sum\limits_{p^k_i \in [0.5, P_{98}]} p^k_i + \sum\limits_{p^k_i \in [P_{2}, 0.5)} 1  p^k_i \right]\]

mriqc.qc.anatomical.
snr
(mu_fg, sigma_fg, n)[source]¶ Calculate the SNR. The estimation may be provided with only one foreground region in which the noise is computed as follows:
\[\text{SNR} = \frac{\mu_F}{\sigma_F\sqrt{n/(n1)}},\]where \(\mu_F\) is the mean intensity of the foreground and \(\sigma_F\) is the standard deviation of the same region.
Parameters: Returns: the computed SNR for the foreground segmentation

mriqc.qc.anatomical.
snr_dietrich
(mu_fg, sigma_air)[source]¶ Calculate the SNR.
This must be an air mask around the head, and it should not contain artifacts. The computation is done following the eq. A.12 of [Dietrich2007], which includes a correction factor in the estimation of the standard deviation of air and its Rayleigh distribution:
\[\text{SNR} = \frac{\mu_F}{\sqrt{\frac{2}{4\pi}}\,\sigma_\text{air}}.\]Parameters: Returns: the computed SNR for the foreground segmentation

mriqc.qc.anatomical.
summary_stats
(img, pvms, airmask=None, erode=True)[source]¶ Estimates the mean, the standard deviation, the 95% and the 5% percentiles of each tissue distribution.