Skip to content

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

Merged
PaulHax merged 1 commit into
dicom-loadingfrom
oct-slice-thickness-spacing
Nov 25, 2026
Merged

PaulHax merged 1 commit into
dicom-loadingfrom
oct-slice-thickness-spacing

Conversation

@PaulHax

@PaulHax PaulHax commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Replaces #1045, now opened from a branch in this repository.

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 merged commit c657db2 into dicom-loading Nov 25, 2026
8 checks passed
@PaulHax
PaulHax deleted the oct-slice-thickness-spacing branch November 25, 2026 15:51
@PaulHax

PaulHax commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Folded into #1046, which now carries this change.

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