@@ -156,13 +156,14 @@ def init_single_subject_wf(subject_id: str):
156156 from smriprep .workflows .outputs import (
157157 init_ds_anat_volumes_wf ,
158158 init_ds_grayord_metrics_wf ,
159+ init_ds_surfaces_wf ,
159160 init_template_iterator_wf ,
160161 )
161162 from smriprep .workflows .surfaces import (
162163 init_gifti_morphometrics_wf ,
163164 init_hcp_morphometrics_wf ,
164165 init_morph_grayords_wf ,
165- init_resample_midthickness_wf ,
166+ init_resample_surfaces_wf ,
166167 )
167168
168169 from fmriprep .workflows .bold .base import init_bold_wf
@@ -449,7 +450,8 @@ def init_single_subject_wf(subject_id: str):
449450 grayord_density = config .workflow .cifti_output ,
450451 omp_nthreads = omp_nthreads ,
451452 )
452- resample_midthickness_wf = init_resample_midthickness_wf (
453+ resample_surfaces_wf = init_resample_surfaces_wf (
454+ surfaces = ['white' , 'pial' , 'midthickness' ],
453455 grayord_density = config .workflow .cifti_output ,
454456 )
455457 ds_grayord_metrics_wf = init_ds_grayord_metrics_wf (
@@ -458,6 +460,15 @@ def init_single_subject_wf(subject_id: str):
458460 metrics = ['curv' , 'thickness' , 'sulc' ],
459461 cifti_output = config .workflow .cifti_output ,
460462 )
463+ ds_fsLR_surfaces_wf = init_ds_surfaces_wf (
464+ output_dir = fmriprep_dir ,
465+ surfaces = ['white' , 'pial' , 'midthickness' ],
466+ entities = {
467+ 'space' : 'fsLR' ,
468+ 'density' : '32k' if config .workflow .cifti_output == '91k' else '59k' ,
469+ },
470+ name = 'ds_fsLR_surfaces_wf' ,
471+ )
461472
462473 workflow .connect ([
463474 (anat_fit_wf , curv_wf , [
@@ -473,7 +484,9 @@ def init_single_subject_wf(subject_id: str):
473484 (curv_wf , hcp_morphometrics_wf , [
474485 ('outputnode.curv' , 'inputnode.curv' ),
475486 ]),
476- (anat_fit_wf , resample_midthickness_wf , [
487+ (anat_fit_wf , resample_surfaces_wf , [
488+ ('outputnode.white' , 'inputnode.white' ),
489+ ('outputnode.pial' , 'inputnode.pial' ),
477490 ('outputnode.midthickness' , 'inputnode.midthickness' ),
478491 (
479492 f"outputnode.sphere_reg_{ 'msm' if msm_sulc else 'fsLR' } " ,
@@ -493,12 +506,15 @@ def init_single_subject_wf(subject_id: str):
493506 ('outputnode.sulc' , 'inputnode.sulc' ),
494507 ('outputnode.roi' , 'inputnode.roi' ),
495508 ]),
496- (resample_midthickness_wf , morph_grayords_wf , [
509+ (resample_surfaces_wf , morph_grayords_wf , [
497510 ('outputnode.midthickness_fsLR' , 'inputnode.midthickness_fsLR' ),
498511 ]),
499512 (anat_fit_wf , ds_grayord_metrics_wf , [
500513 ('outputnode.t1w_valid_list' , 'inputnode.source_files' ),
501514 ]),
515+ (anat_fit_wf , ds_fsLR_surfaces_wf , [
516+ ('outputnode.t1w_valid_list' , 'inputnode.source_files' ),
517+ ]),
502518 (morph_grayords_wf , ds_grayord_metrics_wf , [
503519 ('outputnode.curv_fsLR' , 'inputnode.curv' ),
504520 ('outputnode.curv_metadata' , 'inputnode.curv_metadata' ),
@@ -507,6 +523,11 @@ def init_single_subject_wf(subject_id: str):
507523 ('outputnode.sulc_fsLR' , 'inputnode.sulc' ),
508524 ('outputnode.sulc_metadata' , 'inputnode.sulc_metadata' ),
509525 ]),
526+ (resample_surfaces_wf , ds_fsLR_surfaces_wf , [
527+ ('outputnode.white_fsLR' , 'inputnode.white' ),
528+ ('outputnode.pial_fsLR' , 'inputnode.pial' ),
529+ ('outputnode.midthickness_fsLR' , 'inputnode.midthickness' ),
530+ ]),
510531 ]) # fmt:skip
511532
512533 if config .workflow .anat_only :
@@ -740,7 +761,7 @@ def init_single_subject_wf(subject_id: str):
740761 (hcp_morphometrics_wf , bold_wf , [
741762 ('outputnode.roi' , 'inputnode.cortex_mask' ),
742763 ]),
743- (resample_midthickness_wf , bold_wf , [
764+ (resample_surfaces_wf , bold_wf , [
744765 ('outputnode.midthickness_fsLR' , 'inputnode.midthickness_fsLR' ),
745766 ]),
746767 ]) # fmt:skip
0 commit comments