Dicom acquisition split - #926
Open
PaulHax wants to merge 2 commits into
Open
Conversation
toVec and the slice-normal cross product were private to allocateImageFromChunks, and a Map view of a chunk's metadata was built inline there. Move all three into dicomChunks.ts, and collect the DICOM-specific modules of src/utils into src/utils/dicom so they sit with their peers rather than among the generic helpers. No behavior change.
GDCM's series-detail key covers SeriesNumber, SliceThickness, Rows and Columns, but not AcquisitionNumber, so the categorize pipeline hands back a series holding several overlapping scans as a single volume. Sorted by position, those slices sit on no one lattice, and the derived Z spacing describes none of the scans. Separate such a volume by grouping on AcquisitionNumber, then TemporalPositionIdentifier, then EchoNumbers, splitting on the first tag whose groups cover overlapping stretches of the slice axis and recursing into each part with the remaining tags, so a 4D multi-echo series separates on both axes. Groups that follow one another along the axis are one volume between them and stay merged, however their acquisition is numbered: the decision compares positions rather than measuring how even the spacing looks. The split is decided over the batch plus every chunk already imported for the same group, so a series loaded across several imports converges on the same volumes as one loaded at once. Split volumes keep the provenance of their member files so a saved session restores them, and a state file leaf covered by more than one volume is left unmapped rather than bound to an arbitrary one of them. Volumes that still hold two slices at one position after splitting are reported as a warning, since no listed tag separates them.
✅ Deploy Preview for volview-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
No description provided.