fsqc.checkSNR

This module provides a function to check the SNR of the white and gray matter

fsqc.checkSNR.checkSNR(subjects_dir, subject, nb_erode=3, ref_image='norm.mgz', aparc_image='aparc+aseg.mgz')[source]

A function to check the SNR of the white and gray matter.

This function checks the SNR of the white and the gray matter. The white matter segmentation is taken from the aparc+aseg image, and the gray matter from the aseg image. The white matter is eroded by three voxels to ignore partial volumes. For the gray matter, this is not possible because the layer is already very thin. An erosion would eliminate nearly the whole signal.

Parameters:
subjects_dirstr

The directory containing subject data.

subjectstr

The name of the subject.

nb_erodeint, optional

The number of erosions, default is 3.

ref_imagestr, optional

The reference image, default is “norm.mgz”, can be changed to “orig.mgz”.

aparc_imagestr, optional

The aparc+aseg image, default is “aparc+aseg.mgz”, can be changed to “aparc+aseg.orig.mgz” for FastSurfer output.

Returns:
wm_snrfloat

The signal-to-noise ratio of the white matter.

gm_snrfloat

The signal-to-noise ratio of the gray matter.

Notes

It requires valid mri/norm.mgz, mri/aseg.mgz, and mri/aparc+aseg.mgz files for FreeSurfer output, and valid mri/norm.mgz, mri/aseg.mgz, and mri/aparc+aseg.orig.mgz files for FastSurfer output. If not found, NaNs will be returned.