Skip to content

fix(dicom): fall back to SliceThickness for unpositioned frame spacing - #1045

Closed
PaulHax wants to merge 1 commit into
Kitware:dicom-loadingfrom
PaulHax:oct-slice-thickness-spacing
Closed

PaulHax wants to merge 1 commit into
Kitware:dicom-loadingfrom
PaulHax:oct-slice-thickness-spacing

Conversation

@PaulHax

@PaulHax PaulHax commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #1046 (base branch dicom-loading), so this diff is only the new commit.

Some enhanced Ophthalmic Tomography exports declare their geometry only as PixelSpacing and SliceThickness in SharedFunctionalGroupsSequence > PixelMeasuresSequence, with no per-frame ImagePositionPatient and no SpacingBetweenSlices. Those files loaded with B-scans 1 mm apart, so the en face, sagittal and 3D views were stretched by tens of times along the B-scan axis while each B-scan looked correct.

When frame positions cannot space the volume, the slice spacing now falls back from SpacingBetweenSlices to SliceThickness, read through the usual functional group lookup (per-frame, then shared, then top level). Positions still take precedence, and the existing "did not load as one sound volume" warning still appears for these files, since SliceThickness describes the slice, not necessarily the gap between slices. For example, Zeiss Cirrus cubes declare a 0.002 mm SliceThickness, which now compresses that axis instead of stretching it to 1 mm per B-scan.

Enhanced OCT exports often declare only PixelSpacing and SliceThickness in
the shared Pixel Measures, with no frame positions or SpacingBetweenSlices.
Their frames were spaced 1 mm apart, stretching the en face and 3D views.
SpacingBetweenSlices still wins when present, and the unsound-volume
warning still reports that frame geometry could not be established.
@PaulHax

PaulHax commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Continued in #1047, opened from a branch in this repository.

@PaulHax PaulHax closed this Nov 25, 2026
@PaulHax
PaulHax deleted the oct-slice-thickness-spacing branch November 25, 2026 14:19
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.

1 participant