The MRIQC workflows

The anatomical workflow


The anatomical workflow follows the following steps:

  1. Conform (reorientations, revise data types) input data and read associated metadata.
  2. Skull-stripping (AFNI).
  3. Calculate head mask – headmsk_wf().
  4. Spatial Normalization to MNI (ANTs)
  5. Calculate air mask above the nasial-cerebelum plane – airmsk_wf().
  6. Brain tissue segmentation (FAST).
  7. Extraction of IQMs – compute_iqms().
  8. Individual-reports generation – individual_reports().

This workflow is orchestrated by anat_qc_workflow().

For the skull-stripping, we use afni_wf from niworkflows.anat.skullstrip:

(Source code)


Implements the Step 1 of [Mortamet2009].

(Source code)

mriqc.workflows.anatomical.anat_qc_workflow(dataset, settings, mod='T1w', name='anatMRIQC')[source]

One-subject-one-session-one-run pipeline to extract the NR-IQMs from anatomical images

(Source code)

mriqc.workflows.anatomical.compute_iqms(settings, modality='T1w', name='ComputeIQMs')[source]

Workflow that actually computes the IQMs

(Source code)

mriqc.workflows.anatomical.gradient_threshold(in_file, in_segm, thresh=1.0, out_file=None)[source]

Compute a threshold from the histogram of the magnitude gradient image

mriqc.workflows.anatomical.headmsk_wf(name='HeadMaskWorkflow', use_bet=True)[source]

Computes a head mask as in [Mortamet2009].

(Source code)

mriqc.workflows.anatomical.image_gradient(in_file, snr, out_file=None)[source]

Computes the magnitude gradient of an image using numpy

mriqc.workflows.anatomical.individual_reports(settings, name='ReportsWorkflow')[source]

Encapsulates nodes writing plots


(Source code, png, svg, pdf)

mriqc.workflows.anatomical.spatial_normalization(settings, mod='T1w', name='SpatialNormalization', resolution=2.0)[source]

A simple workflow to perform spatial normalization

The functional workflow


The functional workflow follows the following steps:

  1. Sanitize (revise data types and xforms) input data, read associated metadata and discard non-steady state frames.
  2. HMC based on 3dvolreg from AFNI – hmc_afni().
  3. Skull-stripping of the time-series (AFNI) – fmri_bmsk_workflow().
  4. Calculate mean time-series, and tSNR.
  5. Spatial Normalization to MNI (ANTs) – epi_mni_align()
  6. Extraction of IQMs – compute_iqms().
  7. Individual-reports generation – individual_reports().

This workflow is orchestrated by fmri_qc_workflow().

mriqc.workflows.functional.compute_iqms(settings, name='ComputeIQMs')[source]

Workflow that actually computes the IQMs

(Source code)

mriqc.workflows.functional.epi_mni_align(settings, name='SpatialNormalization')[source]

Uses FSL FLIRT with the BBR cost function to find the transform that maps the EPI space into the MNI152-nonlinear-symmetric atlas.

The input epi_mean is the averaged and brain-masked EPI timeseries

Returns the EPI mean resampled in MNI space (for checking out registration) and the associated “lobe” parcellation in EPI space.

(Source code)

mriqc.workflows.functional.fmri_bmsk_workflow(name='fMRIBrainMask', use_bet=False)[source]

Computes a brain mask for the input fMRI dataset

(Source code)

mriqc.workflows.functional.fmri_qc_workflow(dataset, settings, name='funcMRIQC')[source]

The fMRI qc workflow

(Source code)

mriqc.workflows.functional.hmc_afni(settings, name='fMRI_HMC_afni', st_correct=False, despike=False, deoblique=False, start_idx=None, stop_idx=None)[source]

A HMC workflow for functional scans

(Source code)

mriqc.workflows.functional.hmc_mcflirt(settings, name='fMRI_HMC_mcflirt')[source]

An HMC for functional scans using FSL MCFLIRT

(Source code)

mriqc.workflows.functional.individual_reports(settings, name='ReportsWorkflow')[source]

Encapsulates nodes writing plots

(Source code)

mriqc.workflows.functional.spikes_mask(in_file, in_mask=None, out_file=None)[source]

Utility function to calculate a mask in which check for EM spikes.