Repository navigation
BUG: Add test for ImageSeriesReader direction from slice order - #2822
Merged
blowekamp merged 1 commit intoNov 24, 2026
Merged
Conversation
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]>
dave3d
approved these changes
Nov 24, 2026
zivy
approved these changes
Nov 24, 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.
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.