Skip to content

Commit b151e6d

Browse files
slimnsouroesteban
authored andcommitted
Fixed some connections for eddy outputs
1 parent 25cd09d commit b151e6d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

dmriprep/workflows/dwi/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ def _bold_reg_suffix(fallback):
233233
("in_bvec", "inputnode.in_bvec"),
234234
("in_bval", "inputnode.in_bval")
235235
]),
236-
(dwi_reference_wf, eddy_report, [("outputnode.dwi_file", "before")]),
237-
(eddy_wf, eddy_report, [('outputnode.out_eddy', 'after')]),
236+
(dwi_reference_wf, eddy_report, [("outputnode.ref_image", "before")]),
237+
(eddy_wf, eddy_report, [('outputnode.eddy_ref_image', 'after')]),
238238
(dwi_reference_wf, ds_report_eddy, [("outputnode.dwi_file", "source_file")]),
239239
(eddy_report, ds_report_eddy, [("out_report", "in_file")]),
240240
])

dmriprep/workflows/dwi/eddy.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def init_eddy_wf(debug=False, name="eddy_wf"):
7777
The eddy corrected diffusion image..
7878
7979
"""
80-
from nipype.interfaces.fsl import Eddy
80+
from nipype.interfaces.fsl import Eddy, ExtractROI
8181

8282
inputnode = pe.Node(
8383
niu.IdentityInterface(
@@ -96,6 +96,7 @@ def init_eddy_wf(debug=False, name="eddy_wf"):
9696
niu.IdentityInterface(
9797
fields=[
9898
"out_rotated_bvecs",
99+
"eddy_ref_image",
99100
"out_eddy"
100101
]
101102
),
@@ -127,6 +128,8 @@ def init_eddy_wf(debug=False, name="eddy_wf"):
127128
name="gen_eddy_files",
128129
)
129130

131+
eddy_ref_img = pe.Node(ExtractROI(t_min=0, t_size=1), name="eddy_roi")
132+
130133
# fmt:off
131134
workflow.connect([
132135
(inputnode, eddy, [
@@ -147,6 +150,8 @@ def init_eddy_wf(debug=False, name="eddy_wf"):
147150
("out_corrected", "out_eddy"),
148151
("out_rotated_bvecs", "out_rotated_bvecs")
149152
]),
153+
(eddy, eddy_ref_img, [("out_corrected", "in_file")]),
154+
(eddy_ref_img, outputnode, [("roi_file", "eddy_ref_image")]),
150155
])
151156
# fmt:on
152157
return workflow

0 commit comments

Comments
 (0)