@@ -209,6 +209,13 @@ def init_surface_recon_wf(*, omp_nthreads, hires, name="surface_recon_wf"):
209
209
"out_aseg" ,
210
210
"out_aparc" ,
211
211
"morphometrics" ,
212
+ "midthickness" ,
213
+ "pial" ,
214
+ "white" ,
215
+ "inflated" ,
216
+ "thickness" ,
217
+ "sulc" ,
218
+ "curv" ,
212
219
]
213
220
),
214
221
name = "outputnode" ,
@@ -294,7 +301,14 @@ def init_surface_recon_wf(*, omp_nthreads, hires, name="surface_recon_wf"):
294
301
(autorecon_resume_wf , outputnode , [('outputnode.subjects_dir' , 'subjects_dir' ),
295
302
('outputnode.subject_id' , 'subject_id' )]),
296
303
(gifti_surface_wf , outputnode , [('outputnode.surfaces' , 'surfaces' ),
297
- ('outputnode.morphometrics' , 'morphometrics' )]),
304
+ ('outputnode.morphometrics' , 'morphometrics' ),
305
+ ('outputnode.midthickness' , 'midthickness' ),
306
+ ('outputnode.pial' , 'pial' ),
307
+ ('outputnode.white' , 'white' ),
308
+ ('outputnode.inflated' , 'inflated' ),
309
+ ('outputnode.thickness' , 'thickness' ),
310
+ ('outputnode.sulc' , 'sulc' ),
311
+ ('outputnode.curv' , 'curv' )]),
298
312
(t1w2fsnative_xfm , outputnode , [('out_lta' , 't1w2fsnative_xfm' )]),
299
313
(fsnative2t1w_xfm , outputnode , [('out_reg_file' , 'fsnative2t1w_xfm' )]),
300
314
(refine , outputnode , [('out_file' , 'out_brainmask' )]),
@@ -574,23 +588,51 @@ def init_gifti_surface_wf(*, name="gifti_surface_wf"):
574
588
575
589
Outputs
576
590
-------
591
+ midthickness
592
+ Left and right midthickness (or graymid) surface GIFTIs
593
+ pial
594
+ Left and right pial surface GIFTIs
595
+ white
596
+ Left and right white surface GIFTIs
597
+ inflated
598
+ Left and right inflated surface GIFTIs
577
599
surfaces
578
600
GIFTI surfaces for gray/white matter boundary, pial surface,
579
601
midthickness (or graymid) surface, and inflated surfaces
602
+ thickness
603
+ Left and right cortical thickness GIFTIs
604
+ sulc
605
+ Left and right sulcal depth map GIFTIs
606
+ curv
607
+ Left and right curvature map GIFTIs
580
608
morphometrics
581
609
GIFTIs of cortical thickness, curvature, and sulcal depth
582
610
583
611
"""
584
612
from ..interfaces .freesurfer import MRIsConvertData
585
- from ..interfaces .surf import NormalizeSurf
613
+ from ..interfaces .surf import NormalizeSurf , AggregateSurfaces
586
614
587
615
workflow = Workflow (name = name )
588
616
589
617
inputnode = pe .Node (
590
618
niu .IdentityInterface (["subjects_dir" , "subject_id" , "fsnative2t1w_xfm" ]),
591
619
name = "inputnode" ,
592
620
)
593
- outputnode = pe .Node (niu .IdentityInterface (["surfaces" , "morphometrics" ]), name = "outputnode" )
621
+ outputnode = pe .Node (
622
+ niu .IdentityInterface ([
623
+ "pial" ,
624
+ "white" ,
625
+ "inflated" ,
626
+ "midthickness" ,
627
+ "thickness" ,
628
+ "sulc" ,
629
+ "curv" ,
630
+ # Preserve grouping
631
+ "surfaces" ,
632
+ "morphometrics" ,
633
+ ]),
634
+ name = "outputnode"
635
+ )
594
636
595
637
get_surfaces = pe .Node (nio .FreeSurferSource (), name = "get_surfaces" )
596
638
@@ -624,6 +666,8 @@ def init_gifti_surface_wf(*, name="gifti_surface_wf"):
624
666
name = "morphs2gii" ,
625
667
)
626
668
669
+ agg_surfaces = pe .Node (AggregateSurfaces (), name = "agg_surfaces" )
670
+
627
671
# fmt:off
628
672
workflow .connect ([
629
673
(inputnode , get_surfaces , [('subjects_dir' , 'subjects_dir' ),
@@ -648,6 +692,16 @@ def init_gifti_surface_wf(*, name="gifti_surface_wf"):
648
692
('curv' , 'in3' )]),
649
693
(surfmorph_list , morphs2gii , [('out' , 'scalarcurv_file' )]),
650
694
(morphs2gii , outputnode , [('converted' , 'morphometrics' )]),
695
+ # Output individual surfaces as well
696
+ (fix_surfs , agg_surfaces , [('out_file' , 'surfaces' )]),
697
+ (morphs2gii , agg_surfaces , [('converted' , 'morphometrics' )]),
698
+ (agg_surfaces , outputnode , [('pial' , 'pial' ),
699
+ ('white' , 'white' ),
700
+ ('inflated' , 'inflated' ),
701
+ ('midthickness' , 'midthickness' ),
702
+ ('thickness' , 'thickness' ),
703
+ ('sulc' , 'sulc' ),
704
+ ('curv' , 'curv' )]),
651
705
])
652
706
# fmt:on
653
707
return workflow
0 commit comments