From c1025dd913daa1391db75a6ee725bacb860af8fc Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Sat, 1 Mar 2025 15:19:05 -0500 Subject: [PATCH] fix(brain_extraction_wf): Pass inu_n4 to atropos_wf antsBrainExtraction.sh passes the original N4 corrected image to Atropos, where we have been running a masked N4 before Atropos. We have examples where this difference leads to failures that do not occur in the original ANTs workflow. Further, if we do run Atropos, then this result is discarded and N4 is run using a white-matter mask. This patch therefore simply passes the original N4 image to the Atropos workflow, but otherwise leaves the workflow unchanged. --- niworkflows/anat/ants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/niworkflows/anat/ants.py b/niworkflows/anat/ants.py index 5854f7c9d64..899979275ff 100644 --- a/niworkflows/anat/ants.py +++ b/niworkflows/anat/ants.py @@ -476,7 +476,7 @@ def init_brain_extraction_wf( ]) wf.connect([ (inputnode, atropos_wf, [("in_files", "inputnode.in_files")]), - (inu_n4_final, atropos_wf, [("output_image", "inputnode.in_corrected")]), + (inu_n4, atropos_wf, [("output_image", "inputnode.in_corrected")]), (thr_brainmask, atropos_wf, [("output_image", "inputnode.in_mask")]), (atropos_wf, outputnode, [ ("outputnode.out_file", "out_file"),