You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Bidirectional annotations on volume viewport and noticed that the the ANNOTATION_MODIFIED event gets fired repeatedly on zooming and panning.
The event gets fired in _calculateCachedStats, which is called repeatedly in renderAnnotation because the targetId for a volume viewport is a URN string that changes every time the camera is updated (as defined in BaseVolumeViewport)
(Willing to contribute a fix, but not sure the best course of action. Perhaps cached stats should ignore the focalPoint portion of the URN to verify existence.)
Describe the Bug
I am using Bidirectional annotations on volume viewport and noticed that the the ANNOTATION_MODIFIED event gets fired repeatedly on zooming and panning.
localhost_3000.-.Google.Chrome.2024-08-15.14-16-34.mp4
The event gets fired in
_calculateCachedStats
, which is called repeatedly inrenderAnnotation
because thetargetId
for a volume viewport is a URN string that changes every time the camera is updated (as defined in BaseVolumeViewport)See:
cornerstone3D/packages/tools/src/tools/annotation/BidirectionalTool.ts
Line 1051 in 642bbba
(Willing to contribute a fix, but not sure the best course of action. Perhaps cached stats should ignore the focalPoint portion of the URN to verify existence.)
Steps to Reproduce
Steps are similar to #1294
yarn run example niftiWithTools
setup
functionThe current behavior
After placing a BidirectionTool annotation on a volume viewport, a ANNOTATION_MODIFIED event is fired when zooming and panning the viewport.
The expected behavior
The ANNOTATION_MODIFIED event is only fired when the annotation is actually modified (handles moved).
OS
Windows 10
Node version
20.16.0
Browser
Chrome 127.0.6533.101 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered: