@@ -1932,17 +1932,7 @@ def ingress_raw_anat_data(wf, rpool, cfg, data_paths, unique_id, part_id, ses_id
19321932 dl_dir = cfg .pipeline_setup ["working_directory" ]["path" ],
19331933 img_type = "anat" ,
19341934 )
1935- reorient = pe .Node (
1936- interface = afni .Resample (),
1937- name = f"reorient_T1w_{ part_id } _{ ses_id } " ,
1938- )
1939-
1940- reorient .inputs .orientation = desired_orientation
1941- reorient .inputs .outputtype = "NIFTI_GZ"
1942-
1943- wf .connect (anat_flow , "outputspec.anat" , reorient , "in_file" )
1944-
1945- rpool .set_data ("T1w" , reorient , "out_file" , {}, "" , "anat_ingress" )
1935+ rpool .set_data ("T1w" , anat_flow , "outputspec.anat" , {}, "" , "anat_ingress" )
19461936
19471937 if "T2w" in data_paths ["anat" ]:
19481938 anat_flow_T2 = create_anat_datasource (f"anat_T2w_gather_{ part_id } _{ ses_id } " )
@@ -1953,17 +1943,7 @@ def ingress_raw_anat_data(wf, rpool, cfg, data_paths, unique_id, part_id, ses_id
19531943 dl_dir = cfg .pipeline_setup ["working_directory" ]["path" ],
19541944 img_type = "anat" ,
19551945 )
1956- reorient = pe .Node (
1957- interface = afni .Resample (),
1958- name = f"reorient_T1w_{ part_id } _{ ses_id } " ,
1959- )
1960-
1961- reorient .inputs .orientation = desired_orientation
1962- reorient .inputs .outputtype = "NIFTI_GZ"
1963-
1964- wf .connect (anat_flow_T2 , "outputspec.anat" , reorient , "in_file" )
1965-
1966- rpool .set_data ("T2w" , reorient , "out_file" , {}, "" , "anat_ingress" )
1946+ rpool .set_data ("T2w" , anat_flow_T2 , "outputspec.anat" , {}, "" , "anat_ingress" )
19671947
19681948 if cfg .surface_analysis ["freesurfer" ]["ingress_reconall" ]:
19691949 rpool = ingress_freesurfer (
@@ -2010,28 +1990,13 @@ def ingress_freesurfer(wf, rpool, cfg, data_paths, unique_id, part_id, ses_id):
20101990 creds_path = data_paths ["creds_path" ],
20111991 dl_dir = cfg .pipeline_setup ["working_directory" ]["path" ],
20121992 )
2013- node = fs_ingress
2014- out = "outputspec.data"
2015- node_name = "freesurfer_config_ingress"
2016-
2017- if fs_path .endswith (".nii.gz" or ".nii" ):
2018- reorient = pe .Node (
2019- interface = afni .Resample (),
2020- name = f"reorient_fs_{ part_id } _{ ses_id } " ,
2021- )
2022- reorient .inputs .orientation = cfg .pipeline_setup ["desired_orientation" ]
2023- reorient .inputs .outputtype = "NIFTI_GZ"
2024- wf .connect (fs_ingress , "outputspec.data" , reorient , "in_file" )
2025- node = reorient
2026- out = "out_file"
2027- node_name = "reorient_fs"
20281993 rpool .set_data (
20291994 "freesurfer-subject-dir" ,
2030- node ,
2031- out ,
1995+ fs_ingress ,
1996+ "outputspec.data" ,
20321997 {},
20331998 "" ,
2034- node_name ,
1999+ "freesurfer_config_ingress" ,
20352000 )
20362001
20372002 recon_outs = {
@@ -2094,15 +2059,8 @@ def ingress_raw_func_data(wf, rpool, cfg, data_paths, unique_id, part_id, ses_id
20942059 func_wf .get_node ("inputnode" ).iterables = ("scan" , list (func_paths_dct .keys ()))
20952060
20962061 rpool .set_data ("subject" , func_wf , "outputspec.subject" , {}, "" , "func_ingress" )
2097- reorient = pe .Node (
2098- interface = afni .Resample (),
2099- name = f"reorient_func_{ part_id } _{ ses_id } " ,
2100- )
2101- reorient .inputs .orientation = cfg .pipeline_setup ["desired_orientation" ]
2102- reorient .inputs .outputtype = "NIFTI_GZ"
2103- wf .connect (func_wf , "outputspec.rest" , reorient , "in_file" )
2104- rpool .set_data ("bold" , reorient , "out_file" , {}, "" , "func_ingress" )
2105- # rpool.set_data("bold", func_wf, "outputspec.rest", {}, "", "func_ingress")
2062+
2063+ rpool .set_data ("bold" , func_wf , "outputspec.rest" , {}, "" , "func_ingress" )
21062064
21072065 rpool .set_data ("scan" , func_wf , "outputspec.scan" , {}, "" , "func_ingress" )
21082066
0 commit comments