@@ -567,19 +567,11 @@ def init_infant_anat_fit_wf(
567
567
568
568
if not t1w_preproc :
569
569
LOGGER .info ('ANAT Skipping skull-strip, INU-correction only' )
570
- t1w_n4_only_wf = init_n4_only_wf (
571
- omp_nthreads = omp_nthreads ,
572
- atropos_use_random_seed = not skull_strip_fixed_seed ,
573
- bids_suffix = 'T1w' ,
574
- name = 't1w_n4_only_wf' ,
575
- )
570
+ t1w_n4_wf = init_anat_preproc_wf (name = 't1w_n4_wf' )
576
571
workflow .connect ([
577
- (t1w_validate , t1w_n4_only_wf , [('out_file' , 'inputnode.in_files' )]),
578
- (t1w_n4_only_wf , t1w_buffer , [
579
- (('outputnode.bias_corrected' , pop_file ), 't1w_preproc' ),
580
- ]),
581
- (t1w_n4_only_wf , apply_t1w_mask , [
582
- (('outputnode.out_file' , pop_file ), 'in_file' )]),
572
+ (t1w_validate , t1w_n4_wf , [('out_file' , 'inputnode.in_anat' )]),
573
+ (t1w_n4_wf , t1w_buffer , [('outputnode.anat_preproc' , 't1w_preproc' )]),
574
+ (t1w_n4_wf , apply_t1w_mask , [('outputnode.anat_preproc' , 'in_file' )]),
583
575
]) # fmt:skip
584
576
else :
585
577
LOGGER .info ('ANAT Skipping T1w masking' )
@@ -719,19 +711,11 @@ def init_infant_anat_fit_wf(
719
711
720
712
if not t2w_preproc :
721
713
LOGGER .info ('ANAT Skipping skull-strip, INU-correction only' )
722
- t2w_n4_only_wf = init_n4_only_wf (
723
- omp_nthreads = omp_nthreads ,
724
- atropos_use_random_seed = not skull_strip_fixed_seed ,
725
- bids_suffix = 'T2w' ,
726
- name = 't2w_n4_only_wf' ,
727
- )
714
+ t2w_n4_wf = init_anat_preproc_wf (name = 't2w_n4_wf' )
728
715
workflow .connect ([
729
- (t2w_validate , t2w_n4_only_wf , [('out_file' , 'inputnode.in_files' )]),
730
- (t2w_n4_only_wf , t2w_buffer , [
731
- (('outputnode.bias_corrected' , pop_file ), 't2w_preproc' ),
732
- ]),
733
- (t2w_n4_only_wf , apply_t2w_mask , [
734
- (('outputnode.out_file' , pop_file ), 'in_file' )]),
716
+ (t2w_validate , t2w_n4_wf , [('out_file' , 'inputnode.in_anat' )]),
717
+ (t2w_n4_wf , t2w_buffer , [('outputnode.anat_preproc' , 't2w_preproc' )]),
718
+ (t2w_n4_wf , apply_t2w_mask , [('outputnode.anat_preproc' , 'in_file' )]),
735
719
]) # fmt:skip
736
720
else :
737
721
LOGGER .info ('ANAT Skipping T2w masking' )
@@ -1647,18 +1631,11 @@ def init_infant_single_anat_fit_wf(
1647
1631
1648
1632
if not anat_preproc :
1649
1633
LOGGER .info ('ANAT Skipping skull-strip, INU-correction only' )
1650
- n4_only_wf = init_n4_only_wf (
1651
- omp_nthreads = omp_nthreads ,
1652
- atropos_use_random_seed = not skull_strip_fixed_seed ,
1653
- bids_suffix = reference_anat ,
1654
- name = 'n4_only_wf' ,
1655
- )
1634
+ anat_n4_wf = init_anat_preproc_wf (name = 'anat_n4_wf' )
1656
1635
workflow .connect ([
1657
- (anat_validate , n4_only_wf , [('out_file' , 'inputnode.in_files' )]),
1658
- (n4_only_wf , anat_buffer , [
1659
- (('outputnode.bias_corrected' , pop_file ), 'anat_preproc' ),
1660
- ]),
1661
- (n4_only_wf , apply_mask , [(('outputnode.out_file' , pop_file ), 'in_file' )]),
1636
+ (anat_validate , anat_n4_wf , [('out_file' , 'inputnode.in_anat' )]),
1637
+ (anat_n4_wf , anat_buffer , [('outputnode.anat_preproc' , 'anat_preproc' )]),
1638
+ (anat_n4_wf , apply_mask , [('outputnode.anat_preproc' , 'in_file' )]),
1662
1639
]) # fmt:skip
1663
1640
else :
1664
1641
LOGGER .info (f'ANAT Skipping { reference_anat } masking' )
0 commit comments