Skip to content

fix(io): replace zero voxel spacing when reading images - #949

Open
PaulHax wants to merge 2 commits into
Kitware:mainfrom
PaulHax:paint-brush-spacing
Open

fix(io): replace zero voxel spacing when reading images#949
PaulHax wants to merge 2 commits into
Kitware:mainfrom
PaulHax:paint-brush-spacing

Conversation

@PaulHax

@PaulHax PaulHax commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Images with zero or non-finite voxel spacing left slice views blank and made the paint brush throw. Such spacing now becomes 1, and ultrasound regions with a zero delta are ignored, both with a warning.

@netlify

netlify Bot commented Sep 11, 2026

Copy link
Copy Markdown

Deploy Preview for volview-dev ready!

Name Link
🔨 Latest commit 3b5cfba
🔍 Latest deploy log https://app.netlify.com/projects/volview-dev/deploys/6aa4601265ed3d0009eed1f3
😎 Deploy Preview https://deploy-preview-949--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.

@PaulHax
PaulHax force-pushed the paint-brush-spacing branch from e5d1697 to 085defc Compare September 11, 2026 18:42
A MetaImage or VTI header can declare zero or non-finite voxel spacing,
and an ultrasound region can declare a zero physical delta. Slice views
then render blank and the paint brush throws on every pointer move
because its stencil scale divides by spacing.

Zero or non-finite spacing now becomes 1 on import, with a warning that
measurements along that axis are not physical. Labelmaps restored from a
session get the same repair so they keep the parent grid. Ultrasound
region spacing is applied only when both deltas are nonzero and finite.
Negative spacing is kept because its sign places the voxels.
A zero or non-finite PhysicalDeltaX or PhysicalDeltaY is broken
calibration, and measurements silently fell back to the image pixel
spacing. Report it to the user instead of only the console.
@PaulHax
PaulHax force-pushed the paint-brush-spacing branch from 085defc to 3b5cfba Compare September 11, 2026 20:09
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