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_apply_reg_wf , init_bold_calc_reg_wf
37
+ from .registration import init_bold_t1_trans_wf , init_bold_reg_wf
38
38
from .resampling import (
39
39
init_bold_surf_wf ,
40
40
init_bold_mni_trans_wf ,
@@ -211,8 +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_apply_reg_wf `
215
- * :py:func:`~fmriprep.workflows.bold.registration.init_bold_calc_reg_wf `
214
+ * :py:func:`~fmriprep.workflows.bold.registration.init_bold_t1_trans_wf `
215
+ * :py:func:`~fmriprep.workflows.bold.registration.init_bold_reg_wf `
216
216
* :py:func:`~fmriprep.workflows.bold.confounds.init_bold_confounds_wf`
217
217
* :py:func:`~fmriprep.workflows.bold.confounds.init_ica_aroma_wf`
218
218
* :py:func:`~fmriprep.workflows.bold.resampling.init_bold_mni_trans_wf`
@@ -380,22 +380,23 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
380
380
mem_gb = mem_gb ['filesize' ],
381
381
omp_nthreads = omp_nthreads )
382
382
383
- # mean BOLD registration to T1w
384
- bold_calc_reg_wf = init_bold_calc_reg_wf (name = 'bold_calc_reg_wf' ,
383
+ # calculate BOLD registration to T1w
384
+ bold_reg_wf = init_bold_reg_wf (name = 'bold_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
+ # apply BOLD registration to T1w
393
+ bold_t1_trans_wf = init_bold_t1_trans_wf (name = 'bold_t1_trans_wf' ,
385
394
freesurfer = freesurfer ,
386
- use_bbr = use_bbr ,
387
- bold2t1w_dof = bold2t1w_dof ,
395
+ use_fieldwarp = (fmaps is not None or use_syn ),
388
396
mem_gb = mem_gb ['resampled' ],
389
397
omp_nthreads = omp_nthreads ,
390
398
use_compression = False )
391
399
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 ))
398
-
399
400
# get confounds
400
401
bold_confounds_wf = init_bold_confs_wf (
401
402
mem_gb = mem_gb ['largemem' ],
@@ -456,27 +457,27 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
456
457
('outputnode.raw_ref_image' , 'inputnode.raw_ref_image' ),
457
458
('outputnode.bold_file' , 'inputnode.bold_file' )]),
458
459
# EPI-T1 registration workflow
459
- (inputnode , bold_calc_reg_wf , [
460
- ('t1_preproc' , 'inputnode.t1_preproc' ),
460
+ (inputnode , bold_reg_wf , [
461
461
('t1_brain' , 'inputnode.t1_brain' ),
462
- ('t1_mask' , 'inputnode.t1_mask' ),
463
462
('t1_seg' , 'inputnode.t1_seg' ),
464
- ('t1_aseg' , 'inputnode.t1_aseg' ),
465
- ('t1_aparc' , 'inputnode.t1_aparc' ),
466
463
# Undefined if --no-freesurfer, but this is safe
467
464
('subjects_dir' , 'inputnode.subjects_dir' ),
468
465
('subject_id' , 'inputnode.subject_id' ),
469
466
('t1_2_fsnative_reverse_transform' , 'inputnode.t1_2_fsnative_reverse_transform' )]),
470
- (inputnode , bold_apply_reg_wf , [('bold_file' , 'inputnode.name_source' )]),
471
- (bold_split , bold_apply_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' ),
467
+ (inputnode , bold_t1_trans_wf , [
468
+ ('t1_brain' , 'inputnode.t1_brain' ),
469
+ ('t1_mask' , 'inputnode.t1_mask' ),
470
+ ('t1_aseg' , 'inputnode.t1_aseg' ),
471
+ ('t1_aparc' , 'inputnode.t1_aparc' )]),
472
+ (inputnode , bold_t1_trans_wf , [('bold_file' , 'inputnode.name_source' )]),
473
+ (bold_split , bold_t1_trans_wf , [('out_files' , 'inputnode.bold_split' )]),
474
+ (bold_hmc_wf , bold_t1_trans_wf , [('outputnode.xforms' , 'inputnode.hmc_xforms' )]),
475
+ (bold_t1_trans_wf , outputnode , [('outputnode.bold_aseg_t1' , 'bold_aseg_t1' ),
474
476
('outputnode.bold_aparc_t1' , 'bold_aparc_t1' )]),
475
- (bold_calc_reg_wf , bold_apply_reg_wf , [
476
- ('outputnode.reference_image' , 'inputnode.reference_grid' ),
477
+ (bold_reg_wf , bold_t1_trans_wf , [
477
478
('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' )]),
479
+ (bold_t1_trans_wf , outputnode , [('outputnode.bold_t1' , 'bold_t1' )]),
480
+ (bold_reg_wf , summary , [('outputnode.fallback' , 'fallback' )]),
480
481
# SDC (or pass-through workflow)
481
482
(inputnode , bold_sdc_wf , [
482
483
('t1_brain' , 'inputnode.t1_brain' ),
@@ -485,10 +486,11 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
485
486
('outputnode.ref_image' , 'inputnode.bold_ref' ),
486
487
('outputnode.ref_image_brain' , 'inputnode.bold_ref_brain' ),
487
488
('outputnode.bold_mask' , 'inputnode.bold_mask' )]),
488
- (bold_sdc_wf , bold_calc_reg_wf , [
489
+ (bold_sdc_wf , bold_reg_wf , [
490
+ ('outputnode.bold_ref_brain' , 'inputnode.ref_bold_brain' )]),
491
+ (bold_sdc_wf , bold_t1_trans_wf , [
489
492
('outputnode.bold_ref_brain' , 'inputnode.ref_bold_brain' ),
490
- ('outputnode.bold_mask' , 'inputnode.ref_bold_mask' )]),
491
- (bold_sdc_wf , bold_apply_reg_wf , [
493
+ ('outputnode.bold_mask' , 'inputnode.ref_bold_mask' ),
492
494
('outputnode.out_warp' , 'inputnode.fieldwarp' )]),
493
495
(bold_sdc_wf , bold_bold_trans_wf , [
494
496
('outputnode.out_warp' , 'inputnode.fieldwarp' ),
@@ -499,7 +501,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
499
501
('t1_mask' , 'inputnode.t1_mask' )]),
500
502
(bold_hmc_wf , bold_confounds_wf , [
501
503
('outputnode.movpar_file' , 'inputnode.movpar_file' )]),
502
- (bold_calc_reg_wf , bold_confounds_wf , [
504
+ (bold_reg_wf , bold_confounds_wf , [
503
505
('outputnode.itk_t1_to_bold' , 'inputnode.t1_bold_xform' )]),
504
506
(bold_confounds_wf , outputnode , [
505
507
('outputnode.confounds_file' , 'confounds' ),
@@ -530,7 +532,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
530
532
('t1_seg' , 'inputnode.in_seg' )]),
531
533
(bold_reference_wf , fmap_unwarp_report_wf , [
532
534
('outputnode.ref_image' , 'inputnode.in_pre' )]),
533
- (bold_calc_reg_wf , fmap_unwarp_report_wf , [
535
+ (bold_reg_wf , fmap_unwarp_report_wf , [
534
536
('outputnode.itk_t1_to_bold' , 'inputnode.in_xfm' )]),
535
537
(bold_sdc_wf , fmap_unwarp_report_wf , [
536
538
('outputnode.bold_ref' , 'inputnode.in_post' )]),
@@ -544,7 +546,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
544
546
('t1_seg' , 'inputnode.in_seg' )]),
545
547
(bold_reference_wf , syn_unwarp_report_wf , [
546
548
('outputnode.ref_image' , 'inputnode.in_pre' )]),
547
- (bold_calc_reg_wf , syn_unwarp_report_wf , [
549
+ (bold_reg_wf , syn_unwarp_report_wf , [
548
550
('outputnode.itk_t1_to_bold' , 'inputnode.in_xfm' )]),
549
551
(bold_sdc_wf , syn_unwarp_report_wf , [
550
552
('outputnode.syn_bold_ref' , 'inputnode.in_post' )]),
@@ -582,14 +584,14 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
582
584
583
585
# Replace EPI-to-T1w registration inputs
584
586
workflow .disconnect ([
585
- (bold_sdc_wf , bold_calc_reg_wf , [
587
+ (bold_sdc_wf , bold_t1_trans_wf , [
586
588
('outputnode.bold_ref_brain' , 'inputnode.ref_bold_brain' ),
587
589
('outputnode.bold_mask' , 'inputnode.ref_bold_mask' )]),
588
590
])
589
591
workflow .connect ([
590
592
(bold_hmc_wf , bold_t2s_wf , [
591
593
('outputnode.xforms' , 'inputnode.hmc_xforms' )]),
592
- (bold_t2s_wf , bold_calc_reg_wf , [
594
+ (bold_t2s_wf , bold_t1_trans_wf , [
593
595
('outputnode.t2s_map' , 'inputnode.ref_bold_brain' ),
594
596
('outputnode.oc_mask' , 'inputnode.ref_bold_mask' )]),
595
597
])
@@ -607,9 +609,10 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
607
609
workflow .connect ([
608
610
(bold_bold_trans_wf , boldmask_to_t1w , [
609
611
('outputnode.bold_mask' , 'input_image' )]),
610
- (bold_calc_reg_wf , boldmask_to_t1w , [
611
- ('outputnode.bold_mask_t1' , 'reference_image' ),
612
+ (bold_reg_wf , boldmask_to_t1w , [
612
613
('outputnode.itk_bold_to_t1' , 'transforms' )]),
614
+ (bold_t1_trans_wf , boldmask_to_t1w , [
615
+ ('outputnode.bold_mask_t1' , 'reference_image' )]),
613
616
(boldmask_to_t1w , outputnode , [
614
617
('output_image' , 'bold_mask_t1' )]),
615
618
])
@@ -639,7 +642,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
639
642
('out_files' , 'inputnode.bold_split' )]),
640
643
(bold_hmc_wf , bold_mni_trans_wf , [
641
644
('outputnode.xforms' , 'inputnode.hmc_xforms' )]),
642
- (bold_calc_reg_wf , bold_mni_trans_wf , [
645
+ (bold_reg_wf , bold_mni_trans_wf , [
643
646
('outputnode.itk_bold_to_t1' , 'inputnode.itk_bold_to_t1' )]),
644
647
(bold_bold_trans_wf , bold_mni_trans_wf , [
645
648
('outputnode.bold_mask' , 'inputnode.bold_mask' )]),
@@ -652,7 +655,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
652
655
('outputnode.bold_mask' , 'inputnode.bold_mask' )]),
653
656
(inputnode , carpetplot_wf , [
654
657
('t1_2_mni_reverse_transform' , 'inputnode.t1_2_mni_reverse_transform' )]),
655
- (bold_calc_reg_wf , carpetplot_wf , [
658
+ (bold_reg_wf , carpetplot_wf , [
656
659
('outputnode.itk_t1_to_bold' , 'inputnode.t1_bold_xform' )]),
657
660
(bold_confounds_wf , carpetplot_wf , [
658
661
('outputnode.confounds_file' , 'inputnode.confounds_file' )]),
@@ -690,7 +693,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
690
693
(bold_hmc_wf , ica_aroma_wf , [
691
694
('outputnode.movpar_file' , 'inputnode.movpar_file' ),
692
695
('outputnode.xforms' , 'inputnode.hmc_xforms' )]),
693
- (bold_calc_reg_wf , ica_aroma_wf , [
696
+ (bold_reg_wf , ica_aroma_wf , [
694
697
('outputnode.itk_bold_to_t1' , 'inputnode.itk_bold_to_t1' )]),
695
698
(bold_bold_trans_wf , ica_aroma_wf , [
696
699
('outputnode.bold_mask' , 'inputnode.bold_mask' )]),
@@ -720,7 +723,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
720
723
('subjects_dir' , 'inputnode.subjects_dir' ),
721
724
('subject_id' , 'inputnode.subject_id' ),
722
725
('t1_2_fsnative_forward_transform' , 'inputnode.t1_2_fsnative_forward_transform' )]),
723
- (bold_apply_reg_wf , bold_surf_wf , [('outputnode.bold_t1' , 'inputnode.source_file' )]),
726
+ (bold_t1_trans_wf , bold_surf_wf , [('outputnode.bold_t1' , 'inputnode.source_file' )]),
724
727
(bold_surf_wf , outputnode , [('outputnode.surfaces' , 'surfaces' )]),
725
728
])
726
729
0 commit comments