@@ -350,7 +350,10 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
350
350
351
351
# BOLD buffer: an identity used as a pointer to either the original BOLD
352
352
# or the STC'ed one for further use.
353
- boldbuffer = pe .Node (niu .IdentityInterface (fields = ["bold_file" ]), name = "boldbuffer" )
353
+ boldbuffer = pe .Node (niu .IdentityInterface (fields = ["bold_file" , "name_source" ]),
354
+ name = "boldbuffer" )
355
+ if multiecho :
356
+ boldbuffer .synchronize = True
354
357
355
358
summary = pe .Node (
356
359
FunctionalSummary (
@@ -482,10 +485,14 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
482
485
# fmt:on
483
486
else : # for meepi, iterate through stc_wf for all workflows
484
487
meepi_echos = boldbuffer .clone (name = "meepi_echos" )
485
- meepi_echos .iterables = ("bold_file" , bold_file )
488
+ meepi_echos .iterables = [
489
+ ("bold_file" , bold_file ),
490
+ ("name_source" , bold_file ),
491
+ ]
486
492
# fmt:off
487
493
workflow .connect ([
488
494
(meepi_echos , bold_stc_wf , [("bold_file" , "inputnode.bold_file" )]),
495
+ (meepi_echos , boldbuffer , [("name_source" , "name_source" )]),
489
496
])
490
497
# fmt:on
491
498
@@ -498,7 +505,10 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
498
505
# fmt:on
499
506
else : # ME and skip-STC
500
507
# for meepi, iterate over all meepi echos to boldbuffer
501
- boldbuffer .iterables = ("bold_file" , bold_file )
508
+ boldbuffer .iterables = [
509
+ ("bold_file" , bold_file ),
510
+ ("name_source" , bold_file ),
511
+ ]
502
512
503
513
# MULTI-ECHO EPI DATA #############################################
504
514
if multiecho : # instantiate relevant interfaces, imports
@@ -976,9 +986,11 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
976
986
use_fieldwarp = False ,
977
987
name = "bold_bold_trans_wf" ,
978
988
)
979
- bold_bold_trans_wf .inputs .inputnode .name_source = ref_file
980
989
bold_bold_trans_wf .inputs .inputnode .fieldwarp = "identity"
981
990
991
+ if not multiecho :
992
+ bold_bold_trans_wf .inputs .inputnode .name_source = ref_file
993
+
982
994
# fmt:off
983
995
workflow .connect ([
984
996
# Connect bold_bold_trans_wf
@@ -987,9 +999,7 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
987
999
("outputnode.xforms" , "inputnode.hmc_xforms" ),
988
1000
]),
989
1001
])
990
- # fmt:on
991
1002
992
- # fmt:off
993
1003
workflow .connect ([
994
1004
(bold_bold_trans_wf , bold_final , [("outputnode.bold" , "bold" )]),
995
1005
(bold_bold_trans_wf , final_boldref_wf , [
@@ -999,6 +1009,9 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
999
1009
(initial_boldref_wf , bold_t2s_wf , [
1000
1010
("outputnode.bold_mask" , "inputnode.bold_mask" ),
1001
1011
]),
1012
+ (boldbuffer , bold_bold_trans_wf , [
1013
+ ("name_source" , "inputnode.name_source" ),
1014
+ ]),
1002
1015
(bold_bold_trans_wf , join_echos , [
1003
1016
("outputnode.bold" , "bold_files" ),
1004
1017
]),
0 commit comments