Skip to content

Commit

Permalink
fix a typo in orientation flag for resample
Browse files Browse the repository at this point in the history
  • Loading branch information
birajstha committed Oct 1, 2024
1 parent cf600c1 commit 336a2e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
17 changes: 3 additions & 14 deletions CPAC/anat_preproc/anat_preproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion CPAC/utils/datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 336a2e6

Please sign in to comment.