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.Optionally, it also calculates qi2, the distance between the distribution of noise voxel (nonartifact background voxels) intensities, and a Rician distribution.
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 [Friedman2008]. Lower values are better
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.
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. 
mriqc.qc.anatomical module¶

mriqc.qc.anatomical.
art_qi1
(airmask, artmask)[source]¶ Detect artifacts in the image using the method described in [Mortamet2009]. Caculates q1, as the proportion of voxels with intensity corrupted by artifacts normalized by the number of voxels in the background. 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=u'qi2_fitting.txt', min_voxels=1000.0)[source]¶ Calculates qi2, the distance between the distribution of noise voxel (nonartifact background voxels) intensities, and a centered Chi distribution.
Parameters:  img (numpy.ndarray) – input data
 airmask (numpy.ndarray) – input air mask without artifacts

mriqc.qc.anatomical.
cjv
(img, seg=None, wmmask=None, gmmask=None, wmlabel=u'wm', gmlabel=u'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
(img, seg, lbl=None)[source]¶ Calculate the CNR [Magnota2006]. Higher values are better.
\[\text{CNR} = \frac{\mu_\text{GM}  \mu_\text{WM} }{\sigma_B},\]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)[source]¶ Calculate 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.
Parameters: img (numpy.ndarray) – input data

mriqc.qc.anatomical.
fber
(img, air)[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.
snr
(img, smask, erode=True, fglabel=1)[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},\]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
(img, smask, airmask, erode=True, fglabel=1)[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, bgdata=None)[source]¶ Estimates the mean, the standard deviation, the 95% and the 5% percentiles of each tissue distribution.