sdcflows.workflows.apply.correction module#

Applying a fieldmap given its B-Spline coefficients in Hz.

sdcflows.workflows.apply.correction.init_unwarp_wf(*, free_mem=None, omp_nthreads=1, debug=False, name='unwarp_wf')[source]#

Set up a workflow that unwarps the input EPI dataset.

Workflow Graph
../_images/sdcflows-workflows-apply-correction-1.png

(Source code, png, svg, pdf)

Parameters:
  • omp_nthreads (int) – Maximum number of threads an individual process may use.

  • name (str) – Unique name of this workflow.

  • debug (bool) – Whether to run in sloppy mode.

Inputs:
  • distorted – the target EPI image.

  • metadata – dictionary of metadata corresponding to the target EPI image

  • fmap_coeff – fieldmap coefficients in distorted EPI space.

  • hmc_xforms – list of head-motion correction matrices (in ITK format)

Outputs:
  • fieldmap – the actual B0 inhomogeneity map (also called fieldmap) interpolated from the B-Spline coefficients into the target EPI’s grid, given in Hz units.

  • fieldwarp – the displacements field interpolated from the B-Spline coefficients and scaled by the appropriate parameters (readout time of the EPI target and voxel size along PE).

  • corrected – the target EPI reference image, after applying unwarping.

  • corrected_mask – a fast mask calculated from the corrected EPI reference.