@@ -15,17 +15,19 @@ def init_infant_surface_recon_wf(*, age_months, use_aseg=False, name="infant_sur
15
15
16
16
from nibabies .interfaces .freesurfer import InfantReconAll
17
17
18
+ # Synchronized inputs to smriprep.workflows.surfaces.init_surface_recon_wf
18
19
wf = LiterateWorkflow (name = name )
19
20
inputnode = pe .Node (
20
21
niu .IdentityInterface (
21
22
fields = [
22
23
"subjects_dir" ,
23
24
"subject_id" ,
24
- "anat_orig" ,
25
- "anat_skullstripped" ,
26
- "anat_preproc" ,
27
- "anat_aseg" ,
25
+ "t1w" ,
28
26
"t2w" ,
27
+ "flair" ,
28
+ "skullstripped_t1" ,
29
+ "corrected_t1" ,
30
+ "ants_segs" ,
29
31
],
30
32
),
31
33
name = "inputnode" ,
@@ -35,11 +37,11 @@ def init_infant_surface_recon_wf(*, age_months, use_aseg=False, name="infant_sur
35
37
fields = [
36
38
"subjects_dir" ,
37
39
"subject_id" ,
38
- "anat2fsnative_xfm " ,
39
- "fsnative2anat_xfm " ,
40
+ "t1w2fsnative_xfm " ,
41
+ "fsnative2t1w_xfm " ,
40
42
"surfaces" ,
41
- "anat_aseg " ,
42
- "anat_aparc " ,
43
+ "out_aseg " ,
44
+ "out_aparc " ,
43
45
]
44
46
),
45
47
name = "outputnode" ,
@@ -57,14 +59,14 @@ def init_infant_surface_recon_wf(*, age_months, use_aseg=False, name="infant_sur
57
59
recon = pe .Node (InfantReconAll (age = age_months ), name = "reconall" )
58
60
fssource = pe .Node (nio .FreeSurferSource (), name = 'fssource' , run_without_submitting = True )
59
61
60
- fsnative2anat_xfm = pe .Node (
62
+ fsnative2t1w_xfm = pe .Node (
61
63
RobustRegister (auto_sens = True , est_int_scale = True ),
62
- name = 'fsnative2anat_xfm ' ,
64
+ name = 'fsnative2t1w_xfm ' ,
63
65
)
64
66
65
- anat2fsnative_xfm = pe .Node (
67
+ t1w2fsnative_xfm = pe .Node (
66
68
LTAConvert (out_lta = True , invert = True ),
67
- name = "anat2fsnative_xfm " ,
69
+ name = "t1w2fsnative_xfm " ,
68
70
)
69
71
70
72
# convert generated surfaces to GIFTIs
@@ -73,7 +75,7 @@ def init_infant_surface_recon_wf(*, age_months, use_aseg=False, name="infant_sur
73
75
aparc2nii = pe .Node (fs .MRIConvert (out_type = "niigz" ), name = "aparc2nii" )
74
76
75
77
if use_aseg :
76
- wf .connect (inputnode , "anat_aseg " , recon , "aseg_file" )
78
+ wf .connect (inputnode , "ants_segs " , recon , "aseg_file" )
77
79
78
80
# fmt: off
79
81
wf .connect ([
@@ -82,7 +84,7 @@ def init_infant_surface_recon_wf(*, age_months, use_aseg=False, name="infant_sur
82
84
('subject_id' , 'subject_id' ),
83
85
]),
84
86
(inputnode , recon , [
85
- ('anat_skullstripped ' , 'mask_file' ),
87
+ ('skullstripped_t1 ' , 'mask_file' ),
86
88
('subject_id' , 'subject_id' ),
87
89
]),
88
90
(gen_recon_outdir , recon , [
@@ -103,24 +105,27 @@ def init_infant_surface_recon_wf(*, age_months, use_aseg=False, name="infant_sur
103
105
(fssource , outputnode , [
104
106
(('aseg' , _replace_mgz ), 'anat_aseg' ),
105
107
]),
106
- (inputnode , fsnative2anat_xfm , [('anat_skullstripped ' , 'target_file' )]),
107
- (fssource , fsnative2anat_xfm , [
108
+ (inputnode , fsnative2t1w_xfm , [('skullstripped_t1 ' , 'target_file' )]),
109
+ (fssource , fsnative2t1w_xfm , [
108
110
(('norm' , _replace_mgz ), 'source_file' ),
109
111
]),
110
- (fsnative2anat_xfm , anat2fsnative_xfm , [('out_reg_file' , 'in_lta' )]),
112
+ (fsnative2t1w_xfm , t1w2fsnative_xfm , [('out_reg_file' , 'in_lta' )]),
111
113
(fssource , aparc2nii , [
112
114
('aparc_aseg' , 'in_file' ),
113
115
]),
114
116
(aparc2nii , outputnode , [
115
- ('out_file' , 'anat_aparc ' ),
117
+ ('out_file' , 'out_aparc ' ),
116
118
]),
117
- (fsnative2anat_xfm , outputnode , [
118
- ('out_reg_file' , 'fsnative2anat_xfm' ),
119
+ (fssource , outputnode , [
120
+ (('aseg' , _replace_mgz ), 'out_aseg' ),
121
+ ]),
122
+ (fsnative2t1w_xfm , outputnode , [
123
+ ('out_reg_file' , 'fsnative2t1w_xfm' ),
119
124
]),
120
- (anat2fsnative_xfm , outputnode , [
121
- ('out_lta' , 'anat2fsnative_xfm ' ),
125
+ (t1w2fsnative_xfm , outputnode , [
126
+ ('out_lta' , 't1w2fsnative_xfm ' ),
122
127
]),
123
- (fsnative2anat_xfm , gifti_surface_wf , [
128
+ (fsnative2t1w_xfm , gifti_surface_wf , [
124
129
('out_reg_file' , 'inputnode.fsnative2t1w_xfm' )]),
125
130
(gifti_surface_wf , outputnode , [
126
131
('outputnode.surfaces' , 'surfaces' ),
0 commit comments