@@ -574,23 +574,51 @@ def init_gifti_surface_wf(*, name="gifti_surface_wf"):
574
574
575
575
Outputs
576
576
-------
577
+ midthickness
578
+ Left and right midthickness (or graymid) surface GIFTIs
579
+ pial
580
+ Left and right pial surface GIFTIs
581
+ white
582
+ Left and right white surface GIFTIs
583
+ inflated
584
+ Left and right inflated surface GIFTIs
577
585
surfaces
578
586
GIFTI surfaces for gray/white matter boundary, pial surface,
579
587
midthickness (or graymid) surface, and inflated surfaces
588
+ thickness
589
+ Left and right cortical thickness GIFTIs
590
+ sulc
591
+ Left and right sulcal depth map GIFTIs
592
+ curv
593
+ Left and right curvature map GIFTIs
580
594
morphometrics
581
595
GIFTIs of cortical thickness, curvature, and sulcal depth
582
596
583
597
"""
584
598
from ..interfaces .freesurfer import MRIsConvertData
585
- from ..interfaces .surf import NormalizeSurf
599
+ from ..interfaces .surf import NormalizeSurf , AggregateSurfaces
586
600
587
601
workflow = Workflow (name = name )
588
602
589
603
inputnode = pe .Node (
590
604
niu .IdentityInterface (["subjects_dir" , "subject_id" , "fsnative2t1w_xfm" ]),
591
605
name = "inputnode" ,
592
606
)
593
- outputnode = pe .Node (niu .IdentityInterface (["surfaces" , "morphometrics" ]), name = "outputnode" )
607
+ outputnode = pe .Node (
608
+ niu .IdentityInterface ([
609
+ "pial" ,
610
+ "white" ,
611
+ "inflated" ,
612
+ "midthickness" ,
613
+ "thickness" ,
614
+ "sulc" ,
615
+ "curv" ,
616
+ # Preserve grouping
617
+ "surfaces" ,
618
+ "morphometrics" ,
619
+ ]),
620
+ name = "outputnode"
621
+ )
594
622
595
623
get_surfaces = pe .Node (nio .FreeSurferSource (), name = "get_surfaces" )
596
624
@@ -624,6 +652,8 @@ def init_gifti_surface_wf(*, name="gifti_surface_wf"):
624
652
name = "morphs2gii" ,
625
653
)
626
654
655
+ agg_surfaces = pe .Node (AggregateSurfaces (), name = "agg_surfaces" )
656
+
627
657
# fmt:off
628
658
workflow .connect ([
629
659
(inputnode , get_surfaces , [('subjects_dir' , 'subjects_dir' ),
@@ -648,6 +678,16 @@ def init_gifti_surface_wf(*, name="gifti_surface_wf"):
648
678
('curv' , 'in3' )]),
649
679
(surfmorph_list , morphs2gii , [('out' , 'scalarcurv_file' )]),
650
680
(morphs2gii , outputnode , [('converted' , 'morphometrics' )]),
681
+ # Output individual surfaces as well
682
+ (fix_surfs , agg_surfaces , [('out_file' , 'surfaces' )]),
683
+ (morphs2gii , agg_surfaces , [('converted' , 'morphometrics' )]),
684
+ (agg_surfaces , outputnode , [('pial' , 'pial' ),
685
+ ('white' , 'white' ),
686
+ ('inflated' , 'inflated' ),
687
+ ('midthickness' , 'midthickness' ),
688
+ ('thickness' , 'thickness' ),
689
+ ('sulc' , 'sulc' ),
690
+ ('curv' , 'curv' )]),
651
691
])
652
692
# fmt:on
653
693
return workflow
0 commit comments