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
Calling toolGroup.setToolActive on a barebones stack viewport in a webpack project throws an internal error.
The error thrown in Chrome:
index.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'renderViewport')
at eval (index.js:1:391493)
at Array.forEach (<anonymous>)
at Bp._renderViewports (index.js:1:391412)
at Bp.setToolActive (index.js:1:387749)
at __webpack_require__.g.enable_tool (index.js:103:15)
at HTMLButtonElement.onclick ((index):9:55)
See the readme for build and run instructions, be sure to press the Enable Pan Tool button to trigger the error. Note that this uses the UMD distribution because of a similar error to one seen when using vite (#1071).
The sample DICOM provided is a slice from a publicly available scan of a mouse.
The current behavior
toolGroup.setToolActive is called, an error is thrown, and the tool does not become active . No interaction with the DICOM is possible.
Alternatively, if toolGroup.setToolActive is called before the viewport is set up then no error is thrown, but the tool still remains inactive.
The expected behavior
toolGroup.setToolActive is called, the tool becomes active and the user is able to interact with the DICOM image
OS
Windows
Node version
v18.12.1
Browser
Chrome (125.0.6422.60) and Firefox (126.0)
The text was updated successfully, but these errors were encountered:
Describe the Bug
Calling
toolGroup.setToolActive
on a barebones stack viewport in a webpack project throws an internal error.The error thrown in Chrome:
The error thrown in Firefox:
Both are referring to the same line, just reporting the error differently.
Steps to Reproduce
A minimum repro that roughly matches the webpack configuration I am using: https://github.com/plt-joey/cornerstone-issue-repro
See the readme for build and run instructions, be sure to press the
Enable Pan Tool
button to trigger the error. Note that this uses the UMD distribution because of a similar error to one seen when using vite (#1071).The sample DICOM provided is a slice from a publicly available scan of a mouse.
The current behavior
toolGroup.setToolActive
is called, an error is thrown, and the tool does not become active . No interaction with the DICOM is possible.Alternatively, if
toolGroup.setToolActive
is called before the viewport is set up then no error is thrown, but the tool still remains inactive.The expected behavior
toolGroup.setToolActive
is called, the tool becomes active and the user is able to interact with the DICOM imageOS
Windows
Node version
v18.12.1
Browser
Chrome (125.0.6422.60) and Firefox (126.0)
The text was updated successfully, but these errors were encountered: