Skip to content

perf(vtk): skip the image layer when picking widgets - #1044

Merged
PaulHax merged 2 commits into
Kitware:mainfrom
PaulHax:picking-skips-image-layer
Nov 24, 2026
Merged

PaulHax merged 2 commits into
Kitware:mainfrom
PaulHax:picking-skips-image-layer

Conversation

@PaulHax

@PaulHax PaulHax commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Widget picking runs on every pointer move. The hardware selector redraws every renderer in the view once per selection pass and blocks on `readPixels` after each pass. Slice views draw images in a separate renderer that never holds widgets, so that layer was redrawn several times per move for nothing.

This hides the image layer while the widget manager's selector captures, and restores it when the capture ends.

The cost matters most for expensive image layers. The en face slab projection samples the whole slab depth per pixel, so with annotation widgets on an en face view (#1022) dragging a rectangle handle lagged well behind the cursor. With this change, handle drags there respond like they do in the axial view.

Widget picking redraws every renderer once per selection pass and blocks
on readPixels after each pass. Slice views keep images in a separate
renderer that never holds widgets, so hide it while the selector
captures. This keeps expensive image layers, like the en face slab
projection, out of every pointer move.
@netlify

netlify Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for volview-dev ready!

Name Link
🔨 Latest commit a19af2e
🔍 Latest deploy log https://app.netlify.com/projects/volview-dev/deploys/6b05a508f3acfc7d17a46fc8
😎 Deploy Preview https://deploy-preview-1044--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 merged commit a9a2420 into Kitware:main Nov 24, 2026
9 of 10 checks passed
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