fix(dicom): keep series with same orientation separate#874
Merged
PaulHax merged 1 commit intoKitware:mainfrom May 8, 2026
Merged
fix(dicom): keep series with same orientation separate#874PaulHax merged 1 commit intoKitware:mainfrom
PaulHax merged 1 commit intoKitware:mainfrom
Conversation
✅ Deploy Preview for volview-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
SeparateOnImageOrientation kept a single cosinesToID lookup across all input volumes. When two series shared an ImageOrientationPatient (e.g. T1 MP-RAGE and a sagittal T2 CUBE acquired in the same session) the second volume's files were reassigned to the first volume's bucket, collapsing them into one scan. Scope cosinesToID per input volume so the orientation-based split only happens within a series. Also fixes the Y-cosine row indexing in areCosinesAlmostEqual: the second loop iteration walked indices 1,2,3 — a sliding window straddling the X and Y rows — instead of 3,4,5, the actual Y cosine row. For axial IOP [1,0,0,0,1,0] this happened to dot to 0 and made same-orientation volumes look mismatched, which masked the cosinesToID leak for axial acquisitions. With the leak fixed the windowed comparison no longer affects outputs, but it's still wrong. While there, honor the epsilon argument instead of always using the EPSILON constant. Adds an e2e regression test that synthesizes two minimal DICOM series with distinct SeriesInstanceUIDs and identical oblique IOP, loads them through two manifest URLs, and asserts two volume cards. Closes Kitware#861.
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.
Summary
SeparateOnImageOrientationsharedcosinesToIDacross input volumes, so two series with the sameImageOrientationPatientcollapsed into one.areCosinesAlmostEqualwalked the wrong indices for the Y cosine row and ignored itsepsilonparameter; both fixed.Closes #861.
Test plan
npx wdio run ./wdio.chrome.conf.ts --spec tests/specs/multi-series-load.e2e.ts— passes (4 s)