@@ -3662,10 +3662,63 @@ def warp_timeseries_to_T1template_dcan_nhp(wf, cfg, strat_pool, pipe_num, opt=No
36623662
36633663 return (wf , outputs )
36643664
3665+ def warp_denoiseNofilt_to_T1template (wf , cfg , strat_pool , pipe_num , opt = None ):
3666+ '''
3667+ Node Block:
3668+ {"name": "transform_denoisedNofilt_to_T1template",
3669+ "config": ["amplitude_low_frequency_fluctuation"],
3670+ "switch": ["run"],
3671+ "option_key": ["target_space"],
3672+ "option_val": "Template",
3673+ "inputs": [(["desc-denoisedNofilt_bold"],
3674+ "from-bold_to-template_mode-image_xfm"),
3675+ "T1w-brain-template-funcreg"],
3676+ "outputs": ["space-template_desc-denoisedNofilt_bold"]}
3677+ '''
3678+
3679+ xfm_prov = strat_pool .get_cpac_provenance (
3680+ 'from-bold_to-template_mode-image_xfm' )
3681+ reg_tool = check_prov_for_regtool (xfm_prov )
3682+
3683+ num_cpus = cfg .pipeline_setup ['system_config' ][
3684+ 'max_cores_per_participant' ]
3685+
3686+ num_ants_cores = cfg .pipeline_setup ['system_config' ]['num_ants_threads' ]
3687+
3688+ apply_xfm = apply_transform (f'warp_denoisedNofilt_to_T1template_{ pipe_num } ' , reg_tool ,
3689+ time_series = True , num_cpus = num_cpus ,
3690+ num_ants_cores = num_ants_cores )
3691+
3692+ if reg_tool == 'ants' :
3693+ apply_xfm .inputs .inputspec .interpolation = cfg .registration_workflows [
3694+ 'functional_registration' ]['func_registration_to_template' ][
3695+ 'ANTs_pipelines' ]['interpolation' ]
3696+ elif reg_tool == 'fsl' :
3697+ apply_xfm .inputs .inputspec .interpolation = cfg .registration_workflows [
3698+ 'functional_registration' ]['func_registration_to_template' ][
3699+ 'FNIRT_pipelines' ]['interpolation' ]
3700+
3701+ connect , resource = strat_pool .get_data (["desc-denoisedNofilt_bold" ],
3702+ report_fetched = True )
3703+ node , out = connect
3704+ wf .connect (node , out , apply_xfm , 'inputspec.input_image' )
3705+
3706+ node , out = strat_pool .get_data ("T1w-brain-template-funcreg" )
3707+ wf .connect (node , out , apply_xfm , 'inputspec.reference' )
3708+
3709+ node , out = strat_pool .get_data ("from-bold_to-template_mode-image_xfm" )
3710+ wf .connect (node , out , apply_xfm , 'inputspec.transform' )
3711+
3712+ outputs = {
3713+ f'space-template_{ resource } ' : (apply_xfm , 'outputspec.output_image' )
3714+ }
3715+
3716+ return (wf , outputs )
3717+
36653718
36663719def single_step_resample_timeseries_to_T1template (wf , cfg , strat_pool ,
36673720 pipe_num , opt = None ):
3668- """
3721+ '''
36693722 Apply motion correction, coreg, anat-to-template transforms on
36703723 slice-time corrected functional timeseries based on fMRIPrep
36713724 pipeline
@@ -3724,7 +3777,7 @@ def single_step_resample_timeseries_to_T1template(wf, cfg, strat_pool,
37243777 "outputs": ["space-template_desc-preproc_bold",
37253778 "space-template_desc-brain_bold",
37263779 "space-template_desc-bold_mask"]}
3727- """ # noqa: 501
3780+ ''' # noqa: 501
37283781 bbr2itk = pe .Node (util .Function (input_names = ['reference_file' ,
37293782 'source_file' ,
37303783 'transform_file' ],
0 commit comments