Skip to content

BUG: Add test for ImageSeriesReader direction from slice order - #2822

Merged
blowekamp merged 1 commit into
SimpleITK:mainfrom
eliem08:fix/dicom-series-direction-test-v3
Nov 24, 2026
Merged

blowekamp merged 1 commit into
SimpleITK:mainfrom
eliem08:fix/dicom-series-direction-test-v3

Conversation

@eliem08

@eliem08 eliem08 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Replaces #2821 — same test, comments trimmed, commit subject shortened, clang-format applied.

Fixes #2292.

The direction bug was fixed upstream in ITK (#5357, backported in #6930, shipped in SimpleITK 2.5.7). This adds TEST(IO, ImageSeriesReader_DirectionFromSliceOrder): it synthesizes the 3-slice axial series from the issue, reads it top-to-bottom and bottom-to-top in three SpacingBetweenSlices variants (absent / 1 / -1), and checks origin, direction, z-spacing, and the physical z of the first and last planes.

Test evidence: the C++ test was not compiled here (no SuperBuild on this machine — please let CI run it). An exact Python mirror of the same assertions passes on SimpleITK 2.5.7 and fails 6/6 on 2.5.6.

Regression test for SimpleITK#2292. The direction bug was fixed upstream in
ITK#5357 (backported in ITK#6930, shipped in SimpleITK 2.5.7); this
test pins the corrected behavior at the SimpleITK level. Comments
trimmed and clang-format applied per review.

Signed-off-by: Ilyass Emssaad <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified in the test-only change adding slice-order direction regression coverage.

No open issues 🎉

Review effort: Balanced

@blowekamp
blowekamp merged commit 9ad16cf into SimpleITK:main Nov 24, 2026
18 of 19 checks passed
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.

ImageSeriesReader create an incorrect direction matrix

5 participants