@@ -78,6 +78,8 @@ def init_infant_anat_wf(
78
78
from nipype .interfaces .ants .base import Info as ANTsInfo
79
79
from niworkflows .engine .workflows import LiterateWorkflow as Workflow
80
80
81
+ from sdcflows .workflows .ancillary import init_brainextraction_wf as init_sdc_brain_extraction_wf
82
+
81
83
from ...utils .misc import fix_multi_source_name
82
84
from .brain_extraction import (
83
85
init_infant_brain_extraction_wf ,
@@ -214,8 +216,9 @@ def init_infant_anat_wf(
214
216
if precomp_mask :
215
217
precomp_mask_wf = init_precomputed_mask_wf (omp_nthreads = omp_nthreads )
216
218
precomp_mask_wf .inputs .inputnode .t1w_mask = precomp_mask
217
-
218
- # else: brain_extraction_wf = ...
219
+ sdc_brain_extraction_wf = init_sdc_brain_extraction_wf (
220
+ name = "sdc_brain_extraction_wf" ,
221
+ )
219
222
brain_extraction_wf = init_infant_brain_extraction_wf (
220
223
age_months = age_months ,
221
224
ants_affine_init = ants_affine_init ,
@@ -307,22 +310,31 @@ def init_infant_anat_wf(
307
310
(t1w_template_wf , precomp_mask_wf , [
308
311
("outputnode.out_file" , "inputnode.t1w" ),
309
312
]),
313
+ (t2w_template_wf , sdc_brain_extraction_wf , [
314
+ ("outputnode.out_file" , "inputnode.in_file" ),
315
+ ]),
316
+ (sdc_brain_extraction_wf , coregistration_wf , [
317
+ ("outputnode.out_file" , "inputnode.in_t2w_preproc" ),
318
+ ("outputnode.out_mask" , "inputnode.in_mask" ),
319
+ ("outputnode.out_probseg" , "inputnode.in_probmap" ),
320
+ ]),
321
+ ])
322
+ else :
323
+ wf .connect ([
324
+ (t2w_template_wf , brain_extraction_wf , [
325
+ ("outputnode.out_file" , "inputnode.in_t2w" ),
326
+ ]),
327
+ (brain_extraction_wf , coregistration_wf , [
328
+ ("outputnode.t2w_preproc" , "inputnode.in_t2w_preproc" ),
329
+ ("outputnode.out_mask" , "inputnode.in_mask" ),
330
+ ("outputnode.out_probmap" , "inputnode.in_probmap" ),
331
+ ]),
310
332
])
311
-
312
- wf .connect ([
313
- (t2w_template_wf , brain_extraction_wf , [
314
- ("outputnode.out_file" , "inputnode.in_t2w" ),
315
- ]),
316
- ])
317
333
wf .connect ([
318
334
(t1w_template_wf , coregistration_wf , [
319
335
("outputnode.out_file" , "inputnode.in_t1w" ),
320
336
]),
321
- (brain_extraction_wf , coregistration_wf , [
322
- ("outputnode.t2w_preproc" , "inputnode.in_t2w_preproc" ),
323
- ("outputnode.out_mask" , "inputnode.in_mask" ),
324
- ("outputnode.out_probmap" , "inputnode.in_probmap" ),
325
- ]),
337
+
326
338
(inputnode , coreg_report_wf , [
327
339
("t1w" , "inputnode.source_file" ),
328
340
]),
0 commit comments