Skip to content

Dicom acquisition split - #926

Open
PaulHax wants to merge 3 commits into
Kitware:mainfrom
PaulHax:dicom-acquisition-split
Open

Dicom acquisition split#926
PaulHax wants to merge 3 commits into
Kitware:mainfrom
PaulHax:dicom-acquisition-split

Conversation

@PaulHax

Copy link
Copy Markdown
Collaborator

No description provided.

@netlify

netlifyBot commented Aug 18, 2026

Copy link
Copy Markdown

Deploy Preview for volview-dev ready!

NameLink
🔨 Latest commit4c6cab3
🔍 Latest deploy loghttps://app.netlify.com/projects/volview-dev/deploys/6a9095eff70cd70008216074
😎 Deploy Previewhttps://deploy-preview-926--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.
…mocking modules
The acquisition-split spec replaced @/src/io/dicom and dicomChunkImage with
vi.mock, which main's lint rule now rejects. importChunks takes splitAndSort
and the chunk image class as parameters defaulting to the real ones, threaded
through to _resolveVolumes and _importVolume so the cached-image checks see
the same class the spec constructs.
@PaulHax
PaulHaxforce-pushed the dicom-acquisition-split branch from 9d62e2a to 4c6cab3CompareAugust 27, 2026 19:54
Sign up for freeto 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

@PaulHax