Skip to content

Commit

Permalink
FIX: The calculated displacements field not exposed by unwarp workflow
Browse files Browse the repository at this point in the history
This PR addresses the SDCFlows' side of the problem holding up
nipreps/fmriprep#2392.

Resolves: #219.
  • Loading branch information
oesteban committed Aug 6, 2021
1 parent 794f036 commit 4385b9c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions sdcflows/workflows/apply/correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@


def init_unwarp_wf(omp_nthreads=1, debug=False, name="unwarp_wf"):
"""
r"""
Set up a workflow that unwarps the input :abbr:`EPI (echo-planar imaging)` dataset.
Workflow Graph
Expand Down Expand Up @@ -59,6 +59,10 @@ def init_unwarp_wf(omp_nthreads=1, debug=False, name="unwarp_wf"):
Outputs
-------
fieldmap
the actual B\ :sub:`0` 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).
Expand All @@ -78,7 +82,9 @@ def init_unwarp_wf(omp_nthreads=1, debug=False, name="unwarp_wf"):
name="inputnode",
)
outputnode = pe.Node(
niu.IdentityInterface(fields=["corrected", "fieldmap", "corrected_mask"]),
niu.IdentityInterface(
fields=["fieldmap", "fieldwarp", "corrected", "corrected_mask"]
),
name="outputnode",
)

Expand All @@ -97,7 +103,7 @@ def init_unwarp_wf(omp_nthreads=1, debug=False, name="unwarp_wf"):
(rotime, resample, [("readout_time", "ro_time"),
("pe_direction", "pe_dir")]),
(resample, outputnode, [("out_field", "fieldmap"),
("out_warp", "transforms")]),
("out_warp", "fieldwarp")]),
(resample, brainextraction_wf, [("out_corrected", "inputnode.in_file")]),
(brainextraction_wf, outputnode, [
("outputnode.out_file", "corrected"),
Expand Down

0 comments on commit 4385b9c

Please sign in to comment.