@@ -338,7 +338,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
338
338
"""
339
339
340
340
inputnode = pe .Node (niu .IdentityInterface (
341
- fields = ['bold_file' , 'sbref_file' , ' subjects_dir' , 'subject_id' ,
341
+ fields = ['bold_file' , 'subjects_dir' , 'subject_id' ,
342
342
't1_preproc' , 't1_brain' , 't1_mask' , 't1_seg' , 't1_tpms' ,
343
343
't1_aseg' , 't1_aparc' ,
344
344
't1_2_mni_forward_transform' , 't1_2_mni_reverse_transform' ,
@@ -347,11 +347,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
347
347
inputnode .inputs .bold_file = bold_file
348
348
if sbref_file is not None :
349
349
from niworkflows .interfaces .images import ValidateImage
350
- val_sbref = pe .Node (ValidateImage (), name = 'val_sbref' )
351
- val_sbref .inputs .in_file = sbref_file
352
- workflow .connect ([
353
- (val_sbref , inputnode , [('out_file' , 'sbref_file' )]),
354
- ])
350
+ val_sbref = pe .Node (ValidateImage (in_file = sbref_file ), name = 'val_sbref' )
355
351
356
352
outputnode = pe .Node (niu .IdentityInterface (
357
353
fields = ['bold_t1' , 'bold_t1_ref' , 'bold_mask_t1' , 'bold_aseg_t1' , 'bold_aparc_t1' ,
@@ -420,6 +416,10 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
420
416
421
417
# Generate a tentative boldref
422
418
bold_reference_wf = init_bold_reference_wf (omp_nthreads = omp_nthreads )
419
+ if sbref_file is not None :
420
+ workflow .connect ([
421
+ (val_sbref , bold_reference_wf , [('out_file' , 'inputnode.sbref_file' )]),
422
+ ])
423
423
424
424
# Top-level BOLD splitter
425
425
bold_split = pe .Node (FSLSplit (dimension = 't' ), name = 'bold_split' ,
@@ -538,8 +538,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
538
538
# MAIN WORKFLOW STRUCTURE #######################################################
539
539
workflow .connect ([
540
540
# Generate early reference
541
- (inputnode , bold_reference_wf , [('bold_file' , 'inputnode.bold_file' ),
542
- ('sbref_file' , 'inputnode.sbref_file' )]),
541
+ (inputnode , bold_reference_wf , [('bold_file' , 'inputnode.bold_file' )]),
543
542
# BOLD buffer has slice-time corrected if it was run, original otherwise
544
543
(boldbuffer , bold_split , [('bold_file' , 'in_file' )]),
545
544
# HMC
0 commit comments