Coffee Chat Brewing AI Knowledge

eng kor

[MRIQC 4] MRIQC Report and Image Quality Metrics (IQMs)

MRIQC Results

ex1 ex2 ex3

Using MRIQC to analyze magnetic resonance imaging (MRI) images yields a report in HTML format. The report is divided into two main sections:

  1. Basic visual report: View of the background of the anatomical image, Zoomed-in mosaic view of the brain
  2. About: Errors, Reproducibility and provenance information


View of the background of the anatomical image

The extent of artifacts in the background surrounding the brain region on MRI scans is visualized. Here, the background outside the brain is referred to as air. Typically, there is no signal in the air surrounding the head. Any signal detected in this air mask can be considered noise or unusual patterns, known as artifacts, generated during the imaging process. Let’s compare an MRIQC report of a well-acquired T1 weighted image (T1WI) with that of a T1WI with artificially added noise. The noise was introduced using the torchio library to create a ghosting effect.

mosaic_bg_normal1 mosaic_bg_normal2

mosaic_bg_abnormal1 mosaic_bg_abnormal2

The top result is from the well-acquired image (1), and the bottom is from the noise-added image (2). Signal intensity within the slices is indicated by brightness; the stronger the signal, the darker the color. In the first image, the head mask is generally dark, and the air mask is bright, making a clear distinction. In contrast, the second image shows less difference in brightness between the head and air masks, and some head regions appear weaker than the air. A closer look reveals wave-like patterns, indicating the artificially induced ghosting effect. Through this background artifact check, it is possible to qualitatively assess whether the brain region was well-captured without noise interference, ensuring the background is excluded.


Zoomed-in mosaic view of brain

The MRI slices are arranged in order and displayed in a mosaic view. To examine the brain area in detail, the background is mostly excluded, and the images are zoomed in to fit the size of the head mask. Using the mosaic view, we can assess the quality by checking for head motion during the MRI scan, uniformity of image intensity (intensity inhomogeneities), and the presence of global or local noise. Let’s compare the MRIQC report results of the two images used earlier.

mosaic_bg_normal1 mosaic_bg_normal2

mosaic_bg_abnormal1 mosaic_bg_abnormal2

The top result is from image 1, and the bottom is from image 2. Overall, image 1 appears sharper based on the image quality and the distinction between different structures. Regarding head motion, neither image shows significant related issues when reviewing all slices in the mosaic view. However, in image 2, the artificially added ghosting noise is observed within the slices. Wave patterns within the head mask degrade the image quality. By directly examining the images through the mosaic view, we can identify and assess such issues.


Reproducibility and provenance information

To ensure the reproducibility and transparency of the MRIQC report results, provenance information related to quality checks is provided.

Provenance Information

Provenance and reproducibility metadata are provided. This includes information such as the analysis environment (Execution environment), the path of the data used (Input filename), the versions of the packages used (Versions), and the MD5 checksum for file integrity verification (MD5sum).

prov_info

  • Execution environment: The analysis environment. Here, it means that the execution was done in a ‘singularity’ container environment.
  • Input filename: The path of the data used.
  • Versions: The versions of the packages used, such as MRIQC, NiPype, and TemplateFlow.
  • MD5sum: The MD5 checksum for verifying the integrity of the input file.
  • Warnings: ‘large_rot_frame’ indicates whether there were large rotation frames in the image, and ‘small_air_mask’ indicates whether there were small air masks. Both factors can affect the accuracy of image analysis.

Dataset Information

Metadata related to the data used in the analysis is provided.

data_info

  • AcquisitionMatrixPE: The size of the matrix in the encoding direction. In this example, it is 256 x 256.
  • AcquisitionTime: The time the image scan was performed.
  • ConversionSoftware: The software used to convert DICOM to NIfTI. Here, ‘dcm2niix’ was used.
  • ConversionSoftwareVersion: The version of the above conversion software.
  • HeudiconvVersion: The version of Heudiconv used to convert files to BIDS format.
  • ImageOrientationPatientDICOM: Vector information related to the orientation of the patient’s body.
  • ImageType: The type of image, which here means it is a ‘derivative’ image.
  • InstitutionName: The name of the institution where the data originated.
  • Modality: The imaging method. Here, ‘Magnetic Resonance (MR)’ imaging was used.
  • ProtocolName: The name of the protocol used.
  • RawImage: Indicates whether it is a raw image or not.
  • ReconMatrixPE: The size of the reconstructed matrix in the encoding direction. Here, it is 256 x 256.
  • ScanningSequence: The scanning sequence used.
  • SeriesNumber: The series number, used to identify the series to which the dataset belongs.
  • SliceThickness: The thickness of the slices.
  • SpacingBetweenSlice: The spacing between each slice.

Image Quality Metrics

Various Image Quality Metrics (IQMs) scores are reported to quantitatively evaluate the image quality. The metric items vary depending on the image modality.

  • IQMs for structural images: Such as T1WI, T2WI, etc.
  • IQMs for functional images: Such as fMRI-related images, etc.
  • IQMs for diffusion images: Such as DWI, etc.

IQM score results can also be found in the JSON files generated in the MRIQC output directory for each image.

iqm


IQMs for Structural Images

In this example, let’s explore IQMs for structural images, considering the use of T1-weighted imaging (T1WI).

Measures based on noise measurements

  • cjv Coefficient of joint variation (CJV)
    • A measure of relative variation considering two or more variables simultaneously, indicating how much variation of several variables is compared to their mean.
    • It is useful when dealing with datasets that include multiple variables and helps understand overall variability
    • It is calculated as the ratio of the standard deviation of multiple variables to their mean:
    \[CJV={(Standard \ Deviation \ of \ Combined \ Variables)\over(Mean \ of \ Combined \ Variables)}\times100\%\]
    • MRIQC calculates CJV between gray matter (GM) and white matter (WM) of the brain. The CJV of GM and WM serves as the objective function for optimizing the Intensity Non-Uniformity (INU) correction algorithm, as proposed by Ganzetti et al..
      • INU refers to the unevenness in brightness observed across different regions in MRI, often caused by non-uniformity in the magnetic field, especially by variations in radiofrequency (RF) transmission intensity.
      • INU can degrade image accuracy, making interpretation difficult, hence it’s advisable to correct INU for improving MRI quality.
    • A higher CJV implies stronger head motion or larger INU defects, indicating poorer image quality. Therefore, lower CJV values are indicative of better image quality.
  • snr Signal-to-noise ratio (SNR)
    • A measure of the relationship between the strength of the measured signal and the level of surrounding noise, indicating the quality and accuracy of the measured signal. Signal represents the signal observed in the tissue of interest, while noise refers to signals arising from patient motion or electronic interference, among others. SNR is used to distinguish between the two.
    • A higher SNR indicates that the signal of interest is larger compared to the noise, signifying better data quality.
    \[SNR={Signal \ Strength\over Stnadard \ Deviation \ of \ Noise}\]
  • snrd Dietrich’s SNR (SNRd)
    • Calculates SNR with reference to the surrounding air background in MRI, serving as a vital metric for assessing MRI quality. Proposed by Dietrich et al..
    • Since air typically exhibits uniform signal, referencing it allows for a more precise differentiation between signal and noise, thereby enhancing diagnostic accuracy.
    \[SNRd={Signal \ Strength\over Stnadard \ Deviation \ of \ Air Background}\]
  • cnr Contrast-to-noise ratio (CNR)
    • Extends the concept of SNR, representing the relationship between contrast and noise levels in an image. Contrast refers to the brightness difference between structures or objects in an image, while noise refers to irregular or random signals.
    • A Higher CNR indicates lower noise when achieving the desired image contrast, signifying a clearer representation of objects or structures with minimal noise. This facilitates easier interpretation and improves image quality.
    • MRIQC employs CNR to evaluate how well GM and WM are delineated and how easily the image can be interpreted.
    \[CNR={|\mu_{GM}-\mu_{WM}|\over \sqrt{\sigma^2_{GM}+\sigma^2_{wM}}}\]
  • qi_2 Mortamet’s Quality index 2 (QI2)
    • Evaluates the appropriateness of data distribution within the air mask after the removal of artificial intensities. The suitability of data distribution within the air mask region can affect the reliability of image processing and interpretation.
    • Lower values indicate better quality.

Measures based on information theory

  • efc Entropy-focus criterion (EFC)
    • Uses the Shannon entropy of voxel intensities to measure ghosting and blurring caused by head movements. Proposed by Atkinson et al..
    • As ghosting and blurring increase, voxels lose information, causing the Shannon entropy of the voxels to increase. Thus, EFC has higher values with more ghosting and blurring, meaning that lower values indicate better image quality.
    • The formula is normalized by maximum entropy, allowing comparison across images of different dimensions. $p_i$ represents the probability of each voxel, and $N$ represents the number of pixels.
    \[EFC={-\sum^N_i=1 p_i\log_2(p_i) \over \log_2(N)}\]
  • fber Fraction of brain explained by resting-state data (FBER)
    • Compares the mean energy of brain tissue within the image to the mean air value outside the brain, measuring how much brain tissue is included in the image to assess image quality. Proposed by Shehzad et al.
    • It is one of the Quality Assurance Protocol (QAP) metrics.
    \[FBER ={Mean \ energy \ of image \ value \ within \ the \ head \over Mean \ energy \ of image \ value \ outside \ the \ head}\]

Measures targeting specific artifacts

  • inu : Summary statistics of the INU bias field extracted by N4ITK (max, min, median)
    • The N4ITK algorithm is an advanced technique that improves MRI image quality by correcting RF field inhomogeneity.
    • The INU field, or bias field, refers to the field filtered through N4ITK. The quality of an image can be assessed through the statistics of the INU field. Values closer to 0 indicate greater RF field inhomogeneity, while values closer to 1 indicate better correction and higher quality images.
  • qi_1 Mortamet’s Quality index 1 (QI1)
    • An index used to detect artificial intensities on air masks. It is used to properly analyze air masks by removing artificial intensities.
    • It is generally considered an important metric in preprocessing stages of image data, such as MRI, to enhance image quality.
  • wm2max White-matter to maximum intensity ratio
    • The ratio of the median intensity within the WM to the 95th percentile of the overall intensity distribution. This measures the proportion of significant intensities within the WM region.
    • This ratio can reveal when the tail of the intensity distribution is extended, which often occurs due to the intensities from arterial blood vessels or fatty tissue.
    • If the ratio falls outside the range of 0.6 to 0.8, the WM region of the image is considered non-uniform, indicating lower quality.

Other measures

  • fwhm Full width ad half maximum (FWHM)
    • Represents the full width at half maximum of the intensity values’ spatial distribution in an image, used to measure the image’s resolution and sharpness.
    • Determined by the full width value at half the maximum point of the spatial distribution.
    • Lower FWHM values indicate sharper, higher-resolution images.
    • In MRIQC, FWHM is calculated using the Gaussian width estimator filter implemented in AFNI’s 3dWHMx.
  • icvs_* Intracranial volume scaling (ICVS)
    • Intracranial volume (ICV) refers to the total volume of fluid within the cranial membrane surrounding the brain and intracranial fluid. ICVS represents the relative proportion of a specific tissue based on ICV in MRI.
    • In MRIQC, the volume_fraction() function is used to calculate the ICVS for cerebrospinal fluid (CSF), GM, and WM
    • The state of the brain can be assessed by determining whether each ICVS fluctuates within the normal range and whether they maintain ideal ratios to one another.
  • summary_*_*
    • MRIQC’s summary_stats() function provides various statistics related to the pixel distribution in the background, CSF, GM, and WM regions of an MRI. These statistics can be used to evaluate image quality.
    • Includes mean, median, median absolute deviation (MAD), standard deviation, kurtosis, 5th percentile, 95th percentile, and number of voxels.
  • tpm Tissue probability map (TPM)
    • Refers to the probability distribution of brain tissue types (e.g., GM, WM). In MRIQC, it measures the overlap between the estimated TPM from the image and the map of the ICBM nonlinear-asymmetric 2009c template.
    • ICBM nonlinear-asymmetric 2009c template: One of the standard brain maps provided by the International Consortium for Brain Mapping (ICBM).

      A number of unbiased non-linear averages of the MNI152 database have been generated that combines the attractions of both high-spatial resolution and signal-to-noise while not being subject to the vagaries of any single brain (Fonov et al., 2011). … We present an unbiased standard magnetic resonance imaging template brain volume for normal population. These volumes were created using data from ICBM project.

      6 different templates are available: …

      ICBM 2009c Nonlinear Asymmetric template – 1×1x1mm template which includes T1w,T2w,PDw modalities, and tissue probabilities maps. Intensity inhomogeneity was performed using N3 version 1.11 Also included brain mask, eye mask and face mask.Sampling is different from 2009a template. … [Reference]


References