Skip to content

Commit

Permalink
Merge pull request #224 from nipreps/fix/dispfield-issue-219
Browse files Browse the repository at this point in the history
FIX: The calculated displacements field not exposed by unwarp workflow
  • Loading branch information
oesteban authored Aug 6, 2021
2 parents 794f036 + 4385b9c commit e6d33e6
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 e6d33e6

Please sign in to comment.