MRIQC
Checking Image Quality via MRIQC¶
The quality asssessment of the collected fMRI images is an important step in the preprocessing pipeline. It ensures that the data is reliable enough for further analyses. Without quality control the chances of false positives are higher.
One way to perform quality control using standardized protocol is by appling MRIQC. MRIQC is a pipeline for fMRI data that produces image quality metrices (IQMs) on quality control. It calculates these metices and generates a visual assessment panel. Via visual inspection the researcher can then decide whether to keep or dump the data.
How to run MRIQC¶
MRIQC runs under a docker image, which requires docker to be installed.
Note! The data have to be in BIDS format otherwise the MRIQC pipeline won't run.
MRIQC output¶
After running MRIQC visual reports are generated for each structural and functional image. Additionally a summary file across all participants is delivered, this way comparison within the sample are possible and outliers can easily be detected.
MRIQC reports 1. the noise in the data, 2. the spatial distribution of information in the data, 3. artifacts impacting the data, 4. tissue distributions, volume overlaps, blurriness, etc.
The visual reports of the structural and functional images are assessed and rated by the researcher. Hereby, experience can help.
A detailed description on the IQMs can be found below:
Measuring the Noise in the data¶
Data from the MRI scanner is always accompanied by random background noise that is measured alongside the actual signal, mainly coming from temperature fluctuations, coil resistance, etc. Noise is either randomly added or subtracted from the signal, resulting in a mean of zero and a standard deviation of variable size. A valuable property of the random noise is that when repeatedly summed over its standard deviation increases by the square root, while the actual signal gets added linearly. This means, that the Signal-to-Noise ratio (SNR) improves with each measurement by a factor of $\sqrt{1}$. After $N$ measurements the ratio improves by $\sqrt{N}$1.
In MRIQC the SNR is calculated as the mean gray matter signal divided by the noise measured as the standard deviation of the signal coming from outside the brain. The higher the SNR, the less noise impacts the measurement and the actual signal.
Similarly to the SNR, the contrast to noise ration (CNR) is the mean gray minus white matter signal divided by the noise.
Another noise-related measure it the coefficient of joint variation (CJV). It represents the combined grey and white matter variability (in terms of the standard deviation of their intensity) divided by the mean intensity of the white minus the grey matter tissue. When the difference between mean white and grey matter intensity is small (more bluriness) then the CJV is larger. Thus lower values are prefered.
FWHM stands for full-width at half maximum and measures the width of a (gaussian) curve. This way we can judge the spatial distribution of the signal intensity within the brain. If the signal intensity curve is wide, then the image appears blurrier, if it is narrower then the image is also sharper. Therefore lower FWHM values are prefered.
Measuring the Information in the data¶
Information is mainly measured by two criterions. Firstly, the Foreground to Background Energy Ration (fber) which divides the variance of signal from inside the brain by the variance of signal coming from outside of the brain. The signal variance in the brain should be larger as we expect different activations across voxels there, therefore higher fber indicate more information. Secondly, the Entropy Focus Criterion (efc) which is the proportion of signal intensity entropy to the maximum possible entropy. If the entropy is zero then all signal intensity is focussed on one voxel, the rest is dark. Then the contrast is high. Ghosting can change dark to lighter image intensities. Thus when the entropy is higher more ghosting can be expected. For the efc measure lower values are prefered.
However, if one is interested in the temporal information, when for example examining functional images, then other measures are used. The average change in mean signal intensities between fMRI images is the standardized DVARS. In other words it is the rate of change of the BOLD signal across each frame. The lower the values the less signal change between volumes takes place therefore indicating more stable image acquisition. Another possibility would be to calculate the correlation between single images. Whenever correlation is high, then changes are less abrupt as to when correlation is low. The global correlation (GCOR) measure indicates the average of all correlation values across all images.
Measuring artifact impact on the data¶
In order to measure the impact of the artifacts, they should be detected first. There are specific algorithms MRIQC uses to try to detect these. Afterwards they can then be quantified by assessing the proportion of voxels outside the brain with artifacts to the total number of voxels outside the brain. The lower this quality index (QI1), the smaller the artifact size.
Framewise Displacement (FD) is a measure for movement artifacts for functional MRI. It represents the absolut spatial difference between two timepoints. Any such difference above 0.2 mm gets reported.
The Ghost to Signal Ratio (gsr) measure needs two masks outside the brain. One, covering the frontal and back parts of the horizontal plane and the other matching either side of the cortex. The mean difference in signal intensities within these areas is then related to the signal intensities within the brain. When ghosting occurs then the signal intensities should differ largly between these two masks. If this difference is comparingly large to the mean signal intesities within the brain, then GSR is high and therefore ghosting might significantly distort the image.
Last updated: 02.04.24, Elina Stocker