@@ -233,6 +233,8 @@ def init_sdc_estimate_wf(fmaps, epi_meta, omp_nthreads=1, debug=False):
233
233
('epi_brain' , 'inputnode.in_reference_brain' ),
234
234
('t1w_brain' , 'inputnode.t1w_brain' ),
235
235
('std2anat_xfm' , 'inputnode.std2anat_xfm' )]),
236
+ (syn_sdc_wf , outputnode , [
237
+ ('outputnode.out_reference' , 'syn_ref' )]),
236
238
])
237
239
238
240
# XXX Eliminate branch when forcing isn't an option
@@ -241,10 +243,6 @@ def init_sdc_estimate_wf(fmaps, epi_meta, omp_nthreads=1, debug=False):
241
243
sdc_unwarp_wf = syn_sdc_wf
242
244
else : # --force-syn was called when other fieldmap was present
243
245
sdc_unwarp_wf .__desc__ = None
244
- workflow .connect ([
245
- (syn_sdc_wf , outputnode , [
246
- ('outputnode.out_reference' , 'syn_ref' )]),
247
- ])
248
246
249
247
workflow .connect ([
250
248
(sdc_unwarp_wf , outputnode , [
@@ -287,6 +285,10 @@ def fieldmap_wrangler(layout, target_image, use_syn=False, force_syn=False):
287
285
for k in sorted (fmap .keys ()) if k .startswith ('phase' )],
288
286
})
289
287
290
- if force_syn is True or (not fieldmaps and use_syn is True ):
291
- fieldmaps ['syn' ] = force_syn
288
+ if fieldmaps and force_syn :
289
+ # syn: True -> Run SyN in addition to fieldmap-based SDC
290
+ fieldmaps ['syn' ] = True
291
+ elif not fieldmaps and (force_syn or use_syn ):
292
+ # syn: False -> Run SyN as only SDC
293
+ fieldmaps ['syn' ] = False
292
294
return fieldmaps
0 commit comments