Skip to content

feat: Allen atlas improvements and RAS alignment#101

Open
FIrgolitsch wants to merge 5 commits intopr-g-diagnostics-analysisfrom
pr-h-allen-atlas-ras
Open

feat: Allen atlas improvements and RAS alignment#101
FIrgolitsch wants to merge 5 commits intopr-g-diagnostics-analysisfrom
pr-h-allen-atlas-ras

Conversation

@FIrgolitsch
Copy link
Copy Markdown
Contributor

@FIrgolitsch FIrgolitsch commented Apr 1, 2026

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; adds numpy_to_sitk_image() and sitk_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 with linumpy/io/allen.py; retries on transient HTTP errors.

Tests

  • linumpy/tests/test_io_allen.py — full unit coverage for linumpy/io/allen.py including the new SimpleITK helpers
  • scripts/tests/test_align_to_ras.py — regression tests covering the orientation-code mapping and the auto-crop bbox fixes

Commits

  1. feat: Allen atlas improvements and RAS alignment script
  2. fix(align_to_ras): correct RAS orientation, crop bbox, add tests

Dependencies

@FIrgolitsch FIrgolitsch force-pushed the pr-h-allen-atlas-ras branch 3 times, most recently from 6152f39 to 3350e25 Compare April 17, 2026 22:15
@FIrgolitsch FIrgolitsch changed the base branch from main to pr-c-utility-preprocessing April 17, 2026 22:22
@FIrgolitsch FIrgolitsch force-pushed the pr-h-allen-atlas-ras branch from 3350e25 to be216a4 Compare April 23, 2026 19:43
@FIrgolitsch FIrgolitsch changed the base branch from pr-c-utility-preprocessing to pr-a-build-tooling April 23, 2026 19:57
@FIrgolitsch FIrgolitsch force-pushed the pr-h-allen-atlas-ras branch from be216a4 to b5e36be Compare April 23, 2026 21:09
@FIrgolitsch FIrgolitsch force-pushed the pr-a-build-tooling branch 2 times, most recently from 82b44be to ce8e35d Compare April 23, 2026 21:23
@FIrgolitsch FIrgolitsch force-pushed the pr-h-allen-atlas-ras branch from b5e36be to 646b563 Compare April 23, 2026 21:23
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.
@FIrgolitsch FIrgolitsch force-pushed the pr-h-allen-atlas-ras branch from 646b563 to a3a7b86 Compare April 23, 2026 21:28
@FIrgolitsch FIrgolitsch changed the base branch from pr-a-build-tooling to pr-g-diagnostics-analysis April 27, 2026 23:36
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.

1 participant