qsiprep.interfaces.template_qc module

Quality metrics for a subject-level template built from several images.

Numbers rather than figures: an outlying input sorts to the top of a table, where a montage relies on someone noticing it.

class qsiprep.interfaces.template_qc.TemplateQC(from_file=None, resource_monitor=None, **inputs)[source]

Bases: SimpleInterface

Per-input agreement with the template, plus a voxelwise agreement map.

Notes

The output table has the following columns for each input:

corr_to_template

Correlation with the template inside the template’s brain mask. The single most useful number: it is what identifies a session that does not belong.

resid_cv

SD/mean of the input relative to the template, over the same mask.

translation_mm, rotation_deg

How far this image had to move to reach the template. Large values mean unusual head placement, which is worth knowing even when the registration succeeded.

The agreement map is voxelwise SD/mean across the aligned inputs. Note this is NOT a pure noise measure – it mixes scan-to-scan noise with residual misregistration and genuine change. High values ringing the cortex indicate alignment error; a hot spot in one region usually means one input differs.

Mandatory Inputs:
  • aligned_images (a list of items which are a pathlike object or string representing an existing file)

  • template (a pathlike object or string representing an existing file)

Optional Inputs:
  • agreement_map (a pathlike object or string representing a file) – (Nipype default value: template_agreement.nii.gz)

  • labels (a list of items which are a string)

  • out_file (a pathlike object or string representing a file) – (Nipype default value: template_qc.tsv)

  • transforms (a list of items which are a pathlike object or string representing an existing file)

Outputs:
  • agreement_map (a pathlike object or string representing an existing file)

  • out_file (a pathlike object or string representing an existing file)