Skip to content

Commit

Permalink
sending only orientation not all cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
birajstha committed Oct 3, 2024
1 parent 9095825 commit 022f036
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CPAC/anat_preproc/lesion_preproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def inverse_lesion(lesion_path):
return lesion_out


def create_lesion_preproc(wf_name="lesion_preproc", cfg="RPI"):
def create_lesion_preproc(wf_name="lesion_preproc", orientation="RPI"):
"""Process lesions masks.
Lesion mask file is deobliqued and reoriented in the same way as the T1 in
Expand Down Expand Up @@ -133,7 +133,7 @@ def create_lesion_preproc(wf_name="lesion_preproc", cfg="RPI"):
mem_x=(0.0115, "in_file", "t"),
)

lesion_reorient.inputs.orientation = cfg.pipeline_setup["desired_orientation"]
lesion_reorient.inputs.orientation = orientation
lesion_reorient.inputs.outputtype = "NIFTI_GZ"

preproc.connect(lesion_deoblique, "out_file", lesion_reorient, "in_file")
Expand Down
2 changes: 1 addition & 1 deletion CPAC/registration/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1736,7 +1736,7 @@ def ANTs_registration_connector(
"ANTs"
]["use_lesion_mask"]:
# Create lesion preproc node to apply afni Refit and Resample
lesion_preproc = create_lesion_preproc(wf_name=f"lesion_preproc{symm}")
lesion_preproc = create_lesion_preproc(wf_name=f"lesion_preproc{symm}", cfg.pipeline_setup["desired_orientation"])
wf.connect(inputNode, "lesion_mask", lesion_preproc, "inputspec.lesion")
wf.connect(
lesion_preproc,
Expand Down

0 comments on commit 022f036

Please sign in to comment.