Skip to content

fix(wheneverImageLoaded): run callback when switching images#724

Merged
floryst merged 1 commit intoKitware:mainfrom
PaulHax:crop-fix
May 2, 2025
Merged

fix(wheneverImageLoaded): run callback when switching images#724
floryst merged 1 commit intoKitware:mainfrom
PaulHax:crop-fix

Conversation

@PaulHax
Copy link
Copy Markdown
Collaborator

@PaulHax PaulHax commented Mar 21, 2025

closes #721 (hopefully)

The CT-Neck to Prostate switching worked OK for me. Switching between Prostate and Fetus had cropping issues for me. This PR fixes Prostate/Fetus case and hoefully gets the CT-Neck/Prostate in the issue.

The bug is that the current implementation of wheneverImageLoaded only watches a derived boolean (hasImageData) that only toggles when the image goes from not-loaded to loaded. If the imageId changes from one valid ID to another (with both returning true), the callback never fires.

@PaulHax PaulHax requested a review from floryst March 21, 2025 13:05
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 21, 2025

Deploy Preview for volview-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit cf28f8f
🔍 Latest deploy log https://app.netlify.com/sites/volview-dev/deploys/680a896f8b6c3c00082ed064
😎 Deploy Preview https://deploy-preview-724--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 site configuration.

The bug is that the current implementation of wheneverImageLoaded 
only watches a derived boolean that only toggles when the image
goes from not-loaded to loaded. If the imageId changes from one
valid ID to another (with both returning true), the callback never fires.
@floryst floryst added this pull request to the merge queue May 2, 2025
Merged via the queue into Kitware:main with commit 6def5e2 May 2, 2025
7 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.

Bug: volume rendering is black after loading the head + neck example

2 participants