34
34
from .hmc import init_bold_hmc_wf
35
35
from .stc import init_bold_stc_wf
36
36
from .t2s import init_bold_t2s_wf
37
- from .registration import init_bold_reg_wf
37
+ from .registration import init_bold_apply_reg_wf , init_bold_calc_reg_wf
38
38
from .resampling import (
39
39
init_bold_surf_wf ,
40
40
init_bold_mni_trans_wf ,
@@ -211,7 +211,8 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
211
211
* :py:func:`~fmriprep.workflows.bold.stc.init_bold_stc_wf`
212
212
* :py:func:`~fmriprep.workflows.bold.hmc.init_bold_hmc_wf`
213
213
* :py:func:`~fmriprep.workflows.bold.t2s.init_bold_t2s_wf`
214
- * :py:func:`~fmriprep.workflows.bold.registration.init_bold_reg_wf`
214
+ * :py:func:`~fmriprep.workflows.bold.registration.init_bold_apply_reg_wf`
215
+ * :py:func:`~fmriprep.workflows.bold.registration.init_bold_calc_reg_wf`
215
216
* :py:func:`~fmriprep.workflows.bold.confounds.init_bold_confounds_wf`
216
217
* :py:func:`~fmriprep.workflows.bold.confounds.init_ica_aroma_wf`
217
218
* :py:func:`~fmriprep.workflows.bold.resampling.init_bold_mni_trans_wf`
@@ -380,14 +381,20 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
380
381
omp_nthreads = omp_nthreads )
381
382
382
383
# mean BOLD registration to T1w
383
- bold_reg_wf = init_bold_reg_wf (name = 'bold_reg_wf' ,
384
- freesurfer = freesurfer ,
385
- use_bbr = use_bbr ,
386
- bold2t1w_dof = bold2t1w_dof ,
387
- mem_gb = mem_gb ['resampled' ],
388
- omp_nthreads = omp_nthreads ,
389
- use_compression = False ,
390
- use_fieldwarp = (fmaps is not None or use_syn ))
384
+ bold_calc_reg_wf = init_bold_calc_reg_wf (name = 'bold_calc_reg_wf' ,
385
+ freesurfer = freesurfer ,
386
+ use_bbr = use_bbr ,
387
+ bold2t1w_dof = bold2t1w_dof ,
388
+ mem_gb = mem_gb ['resampled' ],
389
+ omp_nthreads = omp_nthreads ,
390
+ use_compression = False )
391
+
392
+ # mean BOLD registration to T1w
393
+ bold_apply_reg_wf = init_bold_apply_reg_wf (name = 'bold_apply_reg_wf' ,
394
+ mem_gb = mem_gb ['resampled' ],
395
+ omp_nthreads = omp_nthreads ,
396
+ use_compression = False ,
397
+ use_fieldwarp = (fmaps is not None or use_syn ))
391
398
392
399
# get confounds
393
400
bold_confounds_wf = init_bold_confs_wf (
@@ -449,7 +456,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
449
456
('outputnode.raw_ref_image' , 'inputnode.raw_ref_image' ),
450
457
('outputnode.bold_file' , 'inputnode.bold_file' )]),
451
458
# EPI-T1 registration workflow
452
- (inputnode , bold_reg_wf , [
459
+ (inputnode , bold_calc_reg_wf , [
453
460
('bold_file' , 'inputnode.name_source' ),
454
461
('t1_preproc' , 'inputnode.t1_preproc' ),
455
462
('t1_brain' , 'inputnode.t1_brain' ),
@@ -461,12 +468,15 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
461
468
('subjects_dir' , 'inputnode.subjects_dir' ),
462
469
('subject_id' , 'inputnode.subject_id' ),
463
470
('t1_2_fsnative_reverse_transform' , 'inputnode.t1_2_fsnative_reverse_transform' )]),
464
- (bold_split , bold_reg_wf , [('out_files' , 'inputnode.bold_split' )]),
465
- (bold_hmc_wf , bold_reg_wf , [('outputnode.xforms' , 'inputnode.hmc_xforms' )]),
466
- (bold_reg_wf , outputnode , [('outputnode.bold_t1' , 'bold_t1' ),
467
- ('outputnode.bold_aseg_t1' , 'bold_aseg_t1' ),
468
- ('outputnode.bold_aparc_t1' , 'bold_aparc_t1' )]),
469
- (bold_reg_wf , summary , [('outputnode.fallback' , 'fallback' )]),
471
+ (bold_split , bold_calc_reg_wf , [('out_files' , 'inputnode.bold_split' )]),
472
+ (bold_hmc_wf , bold_apply_reg_wf , [('outputnode.xforms' , 'inputnode.hmc_xforms' )]),
473
+ (bold_calc_reg_wf , outputnode , [('outputnode.bold_aseg_t1' , 'bold_aseg_t1' ),
474
+ ('outputnode.bold_aparc_t1' , 'bold_aparc_t1' )]),
475
+ (bold_calc_reg_wf , bold_apply_reg_wf , [
476
+ ('outputnode.reference_image' , 'inputnode.reference_grid' ),
477
+ ('outputnode.itk_bold_to_t1' , 'inputnode.itk_bold_to_t1' )]),
478
+ (bold_apply_reg_wf , outputnode , [('outputnode.bold_t1' , 'bold_t1' )]),
479
+ (bold_calc_reg_wf , summary , [('outputnode.fallback' , 'fallback' )]),
470
480
# SDC (or pass-through workflow)
471
481
(inputnode , bold_sdc_wf , [
472
482
('t1_brain' , 'inputnode.t1_brain' ),
@@ -475,9 +485,10 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
475
485
('outputnode.ref_image' , 'inputnode.bold_ref' ),
476
486
('outputnode.ref_image_brain' , 'inputnode.bold_ref_brain' ),
477
487
('outputnode.bold_mask' , 'inputnode.bold_mask' )]),
478
- (bold_sdc_wf , bold_reg_wf , [
488
+ (bold_sdc_wf , bold_calc_reg_wf , [
479
489
('outputnode.bold_ref_brain' , 'inputnode.ref_bold_brain' ),
480
- ('outputnode.bold_mask' , 'inputnode.ref_bold_mask' ),
490
+ ('outputnode.bold_mask' , 'inputnode.ref_bold_mask' )]),
491
+ (bold_sdc_wf , bold_apply_reg_wf , [
481
492
('outputnode.out_warp' , 'inputnode.fieldwarp' )]),
482
493
(bold_sdc_wf , bold_bold_trans_wf , [
483
494
('outputnode.out_warp' , 'inputnode.fieldwarp' ),
@@ -488,7 +499,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
488
499
('t1_mask' , 'inputnode.t1_mask' )]),
489
500
(bold_hmc_wf , bold_confounds_wf , [
490
501
('outputnode.movpar_file' , 'inputnode.movpar_file' )]),
491
- (bold_reg_wf , bold_confounds_wf , [
502
+ (bold_calc_reg_wf , bold_confounds_wf , [
492
503
('outputnode.itk_t1_to_bold' , 'inputnode.t1_bold_xform' )]),
493
504
(bold_confounds_wf , outputnode , [
494
505
('outputnode.confounds_file' , 'confounds' ),
@@ -519,7 +530,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
519
530
('t1_seg' , 'inputnode.in_seg' )]),
520
531
(bold_reference_wf , fmap_unwarp_report_wf , [
521
532
('outputnode.ref_image' , 'inputnode.in_pre' )]),
522
- (bold_reg_wf , fmap_unwarp_report_wf , [
533
+ (bold_calc_reg_wf , fmap_unwarp_report_wf , [
523
534
('outputnode.itk_t1_to_bold' , 'inputnode.in_xfm' )]),
524
535
(bold_sdc_wf , fmap_unwarp_report_wf , [
525
536
('outputnode.bold_ref' , 'inputnode.in_post' )]),
@@ -533,7 +544,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
533
544
('t1_seg' , 'inputnode.in_seg' )]),
534
545
(bold_reference_wf , syn_unwarp_report_wf , [
535
546
('outputnode.ref_image' , 'inputnode.in_pre' )]),
536
- (bold_reg_wf , syn_unwarp_report_wf , [
547
+ (bold_calc_reg_wf , syn_unwarp_report_wf , [
537
548
('outputnode.itk_t1_to_bold' , 'inputnode.in_xfm' )]),
538
549
(bold_sdc_wf , syn_unwarp_report_wf , [
539
550
('outputnode.syn_bold_ref' , 'inputnode.in_post' )]),
@@ -571,14 +582,14 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
571
582
572
583
# Replace EPI-to-T1w registration inputs
573
584
workflow .disconnect ([
574
- (bold_sdc_wf , bold_reg_wf , [
585
+ (bold_sdc_wf , bold_calc_reg_wf , [
575
586
('outputnode.bold_ref_brain' , 'inputnode.ref_bold_brain' ),
576
587
('outputnode.bold_mask' , 'inputnode.ref_bold_mask' )]),
577
588
])
578
589
workflow .connect ([
579
590
(bold_hmc_wf , bold_t2s_wf , [
580
591
('outputnode.xforms' , 'inputnode.hmc_xforms' )]),
581
- (bold_t2s_wf , bold_reg_wf , [
592
+ (bold_t2s_wf , bold_calc_reg_wf , [
582
593
('outputnode.t2s_map' , 'inputnode.ref_bold_brain' ),
583
594
('outputnode.oc_mask' , 'inputnode.ref_bold_mask' )]),
584
595
])
@@ -596,7 +607,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
596
607
workflow .connect ([
597
608
(bold_bold_trans_wf , boldmask_to_t1w , [
598
609
('outputnode.bold_mask' , 'input_image' )]),
599
- (bold_reg_wf , boldmask_to_t1w , [
610
+ (bold_calc_reg_wf , boldmask_to_t1w , [
600
611
('outputnode.bold_mask_t1' , 'reference_image' ),
601
612
('outputnode.itk_bold_to_t1' , 'transforms' )]),
602
613
(boldmask_to_t1w , outputnode , [
@@ -628,7 +639,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
628
639
('out_files' , 'inputnode.bold_split' )]),
629
640
(bold_hmc_wf , bold_mni_trans_wf , [
630
641
('outputnode.xforms' , 'inputnode.hmc_xforms' )]),
631
- (bold_reg_wf , bold_mni_trans_wf , [
642
+ (bold_calc_reg_wf , bold_mni_trans_wf , [
632
643
('outputnode.itk_bold_to_t1' , 'inputnode.itk_bold_to_t1' )]),
633
644
(bold_bold_trans_wf , bold_mni_trans_wf , [
634
645
('outputnode.bold_mask' , 'inputnode.bold_mask' )]),
@@ -641,7 +652,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
641
652
('outputnode.bold_mask' , 'inputnode.bold_mask' )]),
642
653
(inputnode , carpetplot_wf , [
643
654
('t1_2_mni_reverse_transform' , 'inputnode.t1_2_mni_reverse_transform' )]),
644
- (bold_reg_wf , carpetplot_wf , [
655
+ (bold_calc_reg_wf , carpetplot_wf , [
645
656
('outputnode.itk_t1_to_bold' , 'inputnode.t1_bold_xform' )]),
646
657
(bold_confounds_wf , carpetplot_wf , [
647
658
('outputnode.confounds_file' , 'inputnode.confounds_file' )]),
@@ -679,7 +690,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
679
690
(bold_hmc_wf , ica_aroma_wf , [
680
691
('outputnode.movpar_file' , 'inputnode.movpar_file' ),
681
692
('outputnode.xforms' , 'inputnode.hmc_xforms' )]),
682
- (bold_reg_wf , ica_aroma_wf , [
693
+ (bold_calc_reg_wf , ica_aroma_wf , [
683
694
('outputnode.itk_bold_to_t1' , 'inputnode.itk_bold_to_t1' )]),
684
695
(bold_bold_trans_wf , ica_aroma_wf , [
685
696
('outputnode.bold_mask' , 'inputnode.bold_mask' )]),
@@ -709,7 +720,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
709
720
('subjects_dir' , 'inputnode.subjects_dir' ),
710
721
('subject_id' , 'inputnode.subject_id' ),
711
722
('t1_2_fsnative_forward_transform' , 'inputnode.t1_2_fsnative_forward_transform' )]),
712
- (bold_reg_wf , bold_surf_wf , [('outputnode.bold_t1' , 'inputnode.source_file' )]),
723
+ (bold_apply_reg_wf , bold_surf_wf , [('outputnode.bold_t1' , 'inputnode.source_file' )]),
713
724
(bold_surf_wf , outputnode , [('outputnode.surfaces' , 'surfaces' )]),
714
725
])
715
726
0 commit comments