@@ -365,6 +365,9 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
365
365
tr = metadata .get ("RepetitionTime" )),
366
366
name = 'summary' , mem_gb = DEFAULT_MEMORY_MIN_GB , run_without_submitting = True )
367
367
368
+ # CIfTI output: currently, we only support fsaverage{5,6}
369
+ cifti_spaces = [s for s in surface_spaces if s in ('fsaverage5' , 'fsaverage6' )]
370
+ cifti_output = cifti_output and cifti_spaces
368
371
func_derivatives_wf = init_func_derivatives_wf (output_dir = output_dir ,
369
372
output_spaces = output_spaces ,
370
373
template = template ,
@@ -798,17 +801,15 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
798
801
(bold_surf_wf , outputnode , [('outputnode.surfaces' , 'surfaces' )]),
799
802
])
800
803
801
- # CIFTI output
802
- if cifti_output and surface_spaces :
804
+ if cifti_output :
803
805
bold_surf_wf .__desc__ += """\
804
806
*Grayordinates* files [@hcppipelines], which combine surface-sampled
805
807
data and volume-sampled data, were also generated.
806
808
"""
807
809
gen_cifti = pe .MapNode (GenerateCifti (), iterfield = ["surface_target" , "gifti_files" ],
808
810
name = "gen_cifti" )
809
811
gen_cifti .inputs .TR = metadata .get ("RepetitionTime" )
810
- gen_cifti .inputs .surface_target = [s for s in surface_spaces
811
- if s .startswith ('fsaverage' )]
812
+ gen_cifti .inputs .surface_target = cifti_spaces
812
813
813
814
workflow .connect ([
814
815
(bold_surf_wf , gen_cifti , [
0 commit comments