From 336a2e650f5a4d3b1e58a08a7a6fd387e6c7b714 Mon Sep 17 00:00:00 2001 From: "birajstha:construction_worker::penguin" Date: Tue, 1 Oct 2024 10:13:10 -0400 Subject: [PATCH] fix a typo in orientation flag for resample --- CPAC/anat_preproc/anat_preproc.py | 17 +++-------------- CPAC/utils/datasource.py | 2 +- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/CPAC/anat_preproc/anat_preproc.py b/CPAC/anat_preproc/anat_preproc.py index 7d2c7db76..300eb6b87 100644 --- a/CPAC/anat_preproc/anat_preproc.py +++ b/CPAC/anat_preproc/anat_preproc.py @@ -2251,21 +2251,10 @@ def anatomical_init_T2(wf, cfg, strat_pool, pipe_num, opt=None): node, out = strat_pool.get_data("T2w") wf.connect(node, out, T2_deoblique, "in_file") - T2_reorient = pe.Node( - interface=afni.Resample(), - name=f"T2_reorient_{pipe_num}", - mem_gb=0, - mem_x=(0.0115, "in_file", "t"), - ) - T2_reorient.inputs.orientation = "RPI" - T2_reorient.inputs.outputtype = "NIFTI_GZ" - - wf.connect(T2_deoblique, "out_file", T2_reorient, "in_file") - outputs = { - "desc-preproc_T2w": (T2_reorient, "out_file"), - "desc-reorient_T2w": (T2_reorient, "out_file"), - "desc-head_T2w": (T2_reorient, "out_file"), + "desc-preproc_T2w": (T2_deoblique, "out_file"), + "desc-reorient_T2w": (T2_deoblique, "out_file"), + "desc-head_T2w": (T2_deoblique, "out_file"), } return (wf, outputs) diff --git a/CPAC/utils/datasource.py b/CPAC/utils/datasource.py index eedc17156..25adb1eec 100644 --- a/CPAC/utils/datasource.py +++ b/CPAC/utils/datasource.py @@ -1203,7 +1203,7 @@ def resolve_resolution(orientation, resolution, template, template_name, tag=Non resample.inputs.resample_mode = "Cu" resample.inputs.in_file = local_path resample.base_dir = "." - resample.orientation = orientation + resample.inputs.orientation = orientation resampled_template = resample.run() local_path = resampled_template.outputs.out_file