feat: Allen atlas improvements and RAS alignment#101
Open
FIrgolitsch wants to merge 5 commits intopr-g-diagnostics-analysisfrom
Open
feat: Allen atlas improvements and RAS alignment#101FIrgolitsch wants to merge 5 commits intopr-g-diagnostics-analysisfrom
FIrgolitsch wants to merge 5 commits intopr-g-diagnostics-analysisfrom
Conversation
This was referenced Apr 1, 2026
6152f39 to
3350e25
Compare
3350e25 to
be216a4
Compare
e4c127f to
a48129d
Compare
be216a4 to
b5e36be
Compare
82b44be to
ce8e35d
Compare
b5e36be to
646b563
Compare
Made-with: Cursor
vol_original is in linumpy (S,R,A) after orientation transform but the aligned and Allen volumes are in standard RAS (S,A,R). The shared plane_names list only labels one convention correctly, so the Original column had Coronal and Sagittal swapped. Permute vol_original to (S,A,R) so a single label set is valid for all three columns. Also restore the orientation-preview labels (axes[1]=Sagittal, axes[2]=Coronal) which match the (S,R,A) volume there. Drop the now-confirmed znorm memory instrumentation.
ce8e35d to
cc75fc8
Compare
646b563 to
a3a7b86
Compare
This was referenced Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #101 — Allen Atlas & RAS Alignment
Two commits: initial Allen/RAS work, then a fix for the RAS orientation logic plus a full test suite.
Changes
scripts/linum_align_to_ras.py(new, then refined) — align a reconstructed OME-Zarr volume to RAS orientation. Second commit fixes the orientation-code mapping (some axis flips were inverted) and tightens the auto-crop bounding box so background padding is removed consistently.linumpy/io/allen.py— improved Allen atlas download / caching; addsnumpy_to_sitk_image()andsitk_image_to_numpy()helpers used by the align-to-RAS pipeline and by PR feat: diagnostic and analysis scripts #100's diagnostics.scripts/linum_download_allen.py— cache location made consistent withlinumpy/io/allen.py; retries on transient HTTP errors.Tests
linumpy/tests/test_io_allen.py— full unit coverage forlinumpy/io/allen.pyincluding the new SimpleITK helpersscripts/tests/test_align_to_ras.py— regression tests covering the orientation-code mapping and the auto-crop bbox fixesCommits
feat: Allen atlas improvements and RAS alignment scriptfix(align_to_ras): correct RAS orientation, crop bbox, add testsDependencies
linumpy/utils/orientation.pyfrom PR feat: utility modules, preprocessing improvements, galvo correction #97