@@ -3651,10 +3651,63 @@ def warp_timeseries_to_T1template_dcan_nhp(wf, cfg, strat_pool, pipe_num, opt=No
36513651
36523652 return (wf , outputs )
36533653
3654+ def warp_denoiseNofilt_to_T1template (wf , cfg , strat_pool , pipe_num , opt = None ):
3655+ '''
3656+ Node Block:
3657+ {"name": "transform_denoisedNofilt_to_T1template",
3658+ "config": ["amplitude_low_frequency_fluctuation"],
3659+ "switch": ["run"],
3660+ "option_key": ["target_space"],
3661+ "option_val": "Template",
3662+ "inputs": [(["desc-denoisedNofilt_bold"],
3663+ "from-bold_to-template_mode-image_xfm"),
3664+ "T1w-brain-template-funcreg"],
3665+ "outputs": ["space-template_desc-denoisedNofilt_bold"]}
3666+ '''
3667+
3668+ xfm_prov = strat_pool .get_cpac_provenance (
3669+ 'from-bold_to-template_mode-image_xfm' )
3670+ reg_tool = check_prov_for_regtool (xfm_prov )
3671+
3672+ num_cpus = cfg .pipeline_setup ['system_config' ][
3673+ 'max_cores_per_participant' ]
3674+
3675+ num_ants_cores = cfg .pipeline_setup ['system_config' ]['num_ants_threads' ]
3676+
3677+ apply_xfm = apply_transform (f'warp_denoisedNofilt_to_T1template_{ pipe_num } ' , reg_tool ,
3678+ time_series = True , num_cpus = num_cpus ,
3679+ num_ants_cores = num_ants_cores )
3680+
3681+ if reg_tool == 'ants' :
3682+ apply_xfm .inputs .inputspec .interpolation = cfg .registration_workflows [
3683+ 'functional_registration' ]['func_registration_to_template' ][
3684+ 'ANTs_pipelines' ]['interpolation' ]
3685+ elif reg_tool == 'fsl' :
3686+ apply_xfm .inputs .inputspec .interpolation = cfg .registration_workflows [
3687+ 'functional_registration' ]['func_registration_to_template' ][
3688+ 'FNIRT_pipelines' ]['interpolation' ]
3689+
3690+ connect , resource = strat_pool .get_data (["desc-denoisedNofilt_bold" ],
3691+ report_fetched = True )
3692+ node , out = connect
3693+ wf .connect (node , out , apply_xfm , 'inputspec.input_image' )
3694+
3695+ node , out = strat_pool .get_data ("T1w-brain-template-funcreg" )
3696+ wf .connect (node , out , apply_xfm , 'inputspec.reference' )
3697+
3698+ node , out = strat_pool .get_data ("from-bold_to-template_mode-image_xfm" )
3699+ wf .connect (node , out , apply_xfm , 'inputspec.transform' )
3700+
3701+ outputs = {
3702+ f'space-template_{ resource } ' : (apply_xfm , 'outputspec.output_image' )
3703+ }
3704+
3705+ return (wf , outputs )
3706+
36543707
36553708def single_step_resample_timeseries_to_T1template (wf , cfg , strat_pool ,
36563709 pipe_num , opt = None ):
3657- """
3710+ '''
36583711 Apply motion correction, coreg, anat-to-template transforms on
36593712 slice-time corrected functional timeseries based on fMRIPrep
36603713 pipeline
@@ -3713,7 +3766,7 @@ def single_step_resample_timeseries_to_T1template(wf, cfg, strat_pool,
37133766 "outputs": ["space-template_desc-preproc_bold",
37143767 "space-template_desc-brain_bold",
37153768 "space-template_desc-bold_mask"]}
3716- """ # noqa: 501
3769+ ''' # noqa: 501
37173770 bbr2itk = pe .Node (util .Function (input_names = ['reference_file' ,
37183771 'source_file' ,
37193772 'transform_file' ],
0 commit comments