Skip to content

Fix NameError in undo_canonical_nifti()#559

Merged
wasserth merged 1 commit intowasserth:masterfrom
mhalle:fix/undo-canonical-nifti-nameerror
Mar 30, 2026
Merged

Fix NameError in undo_canonical_nifti()#559
wasserth merged 1 commit intowasserth:masterfrom
mhalle:fix/undo-canonical-nifti-nameerror

Conversation

@mhalle
Copy link
Copy Markdown
Contributor

@mhalle mhalle commented Mar 24, 2026

Summary

  • undo_canonical_nifti() in alignment.py loads the canonical image into a variable named e, but the next line references img_can, which is undefined. This causes a NameError on every call.
  • Fix: rename e to img_can to match the variable name used in the undo_canonical() call.

Test plan

  • Call undo_canonical_nifti() with valid canonical and original nifti paths and verify it completes without error
  • Verify the output image has the expected orientation matching the original

The loaded canonical image was assigned to `e` but referenced as
`img_can` on the next line, causing a NameError on every call.
Rename the variable to `img_can` to match its usage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wasserth wasserth merged commit 1e867d8 into wasserth:master Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants