@@ -401,9 +401,7 @@ def init_single_run_wf(bold_file):
401
401
'boldref2anat_xfm' ,
402
402
'anat2std_xfm' ,
403
403
'bold_ref_file' ,
404
- 'fmap_ref' ,
405
- 'fmap_coeff' ,
406
- 'fmap_id' ,
404
+ 'fmap' ,
407
405
'bold_mask_native' ,
408
406
],
409
407
),
@@ -419,9 +417,7 @@ def init_single_run_wf(bold_file):
419
417
inputnode .inputs .boldref2anat = functional_cache ['boldref2anat' ]
420
418
inputnode .inputs .anat2mni152nlin6asym = functional_cache ['anat2mni152nlin6asym' ]
421
419
# Field maps
422
- inputnode .inputs .fmap_ref = functional_cache ['fmap_ref' ]
423
- inputnode .inputs .fmap_coeff = functional_cache ['fmap_coeff' ]
424
- inputnode .inputs .fmap_id = functional_cache ['fmap_id' ]
420
+ inputnode .inputs .fmap = functional_cache ['fmap' ]
425
421
426
422
# Run ICA-AROMA
427
423
ica_aroma_wf = init_ica_aroma_wf (bold_file = bold_file , metadata = bold_metadata , mem_gb = mem_gb )
@@ -490,6 +486,21 @@ def init_single_run_wf(bold_file):
490
486
bold_MNI6_wf .inputs .inputnode .target_mask = mni6_mask
491
487
bold_MNI6_wf .inputs .inputnode .target_ref_file = mni6_mask
492
488
489
+ # Warp desc-preproc_fieldmap to boldref space
490
+ # Warp the mask as well
491
+ fieldmap_to_boldref = pe .Node (
492
+ ApplyTransforms (),
493
+ name = 'fieldmap_to_boldref' ,
494
+ )
495
+ workflow .connect ([
496
+ (inputnode , fieldmap_to_boldref , [
497
+ ('fmap' , 'input_image' ), # XXX: not right
498
+ ('fmap2boldref' , 'transforms' ),
499
+ ('bold_mask_native' , 'reference_image' ),
500
+ ]),
501
+ ]) # fmt:skip
502
+
503
+ # Pass transforms and warped fieldmap to bold_MNI6_wf
493
504
workflow .connect ([
494
505
(inputnode , bold_MNI6_wf , [
495
506
('bold_hmc' , 'inputnode.motion_xfm' ),
@@ -498,11 +509,8 @@ def init_single_run_wf(bold_file):
498
509
('anat2mni152nlin6asym' , 'inputnode.anat2std_xfm' ),
499
510
# use mask as boldref?
500
511
('bold_mask_native' , 'inputnode.bold_ref_file' ),
501
- # field map information
502
- ('fmap_ref' , 'inputnode.fmap_ref' ),
503
- ('fmap_coeff' , 'inputnode.fmap_coeff' ),
504
- ('fmap_id' , 'inputnode.fmap_id' ),
505
512
]),
513
+ (fieldmap_to_boldref , bold_MNI6_wf , [('output_image' , 'fmap' )]),
506
514
# Resample BOLD to MNI152NLin6Asym, may duplicate bold_std_wf above
507
515
(stc_buffer , bold_MNI6_wf , [('bold_file' , 'inputnode.bold_file' )]),
508
516
(bold_MNI6_wf , mni6_buffer , [('outputnode.bold_file' , 'bold' )]),
0 commit comments