Skip to content

Commit abe1f54

Browse files
committed
fix: eddy connections
1 parent d5b085c commit abe1f54

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

dmriprep/workflows/dwi/base.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,11 @@ def _bold_reg_suffix(fallback):
215215
# fmt: on
216216

217217
if "eddy" not in config.workflow.ignore:
218+
from sdcflows.workflows.ancillary import init_brainextraction_wf
219+
220+
# Brain extraction not run just yet
221+
brainextraction_wf = init_brainextraction_wf()
222+
218223
# Eddy distortion correction
219224
eddy_wf = init_eddy_wf(debug=config.execution.debug)
220225
eddy_wf.inputs.inputnode.metadata = layout.get_metadata(str(dwi_file))
@@ -240,17 +245,17 @@ def _bold_reg_suffix(fallback):
240245

241246
# fmt:off
242247
workflow.connect([
243-
(dwi_reference_wf, eddy_wf, [
244-
("outputnode.dwi_file", "inputnode.dwi_file"),
245-
("outputnode.dwi_mask", "inputnode.dwi_mask"),
246-
]),
247-
(inputnode, eddy_wf, [
248-
("in_bvec", "inputnode.in_bvec"),
249-
("in_bval", "inputnode.in_bval")
248+
(inputnode, eddy_wf, [("dwi_file", "inputnode.dwi_file"),
249+
("in_bvec", "inputnode.in_bvec"),
250+
("in_bval", "inputnode.in_bval")]),
251+
(inputnode, ds_report_eddy, [("dwi_file", "source_file")]),
252+
(dwi_reference_wf, brainextraction_wf, [
253+
("outputnode.epi_ref_file", "inputnode.in_file")]),
254+
(brainextraction_wf, eddy_wf, [
255+
("outputnode.out_mask", "inputnode.dwi_mask"),
250256
]),
251-
(dwi_reference_wf, eddy_report, [("outputnode.epi_ref_file", "before")]),
257+
(brainextraction_wf, eddy_report, [("outputnode.out_file", "before")]),
252258
(eddy_wf, eddy_report, [('outputnode.eddy_ref_image', 'after')]),
253-
(dwi_reference_wf, ds_report_eddy, [("outputnode.dwi_file", "source_file")]),
254259
(eddy_report, ds_report_eddy, [("out_report", "in_file")]),
255260
])
256261
# fmt:on

0 commit comments

Comments
 (0)