OHIF/VTKPlugin

Error when loading plugin

luccascorrea opened this issue · 7 comments

Hello there,

I am running into this error when trying to load the plugin:

TypeError: Cannot read property 'getImageData' of undefined
    at VolumeRenderingPlugin.setupViewport (main.js?986.5500000305474:59)
    at 008a74a72da5af5b95bbc47fe6c1f8d714786336.js:175
    at Array.forEach (<anonymous>)
    at VolumeRenderingPlugin._initEmptyPluginViewports (008a74a72da5af5b95bbc47fe6c1f8d714786336.js:175)
    at 008a74a72da5af5b95bbc47fe6c1f8d714786336.js:175
    at t._compute (008a74a72da5af5b95bbc47fe6c1f8d714786336.js:49)
    at t._recompute (008a74a72da5af5b95bbc47fe6c1f8d714786336.js:49)
    at Object.s._runFlush (008a74a72da5af5b95bbc47fe6c1f8d714786336.js:49)
    at a (008a74a72da5af5b95bbc47fe6c1f8d714786336.js:1)

This error happened to me while developing locally but it also happens using the demo URL (https://vtk-plugin.ohif.org/?url=https://s3.eu-central-1.amazonaws.com/ohif-viewer/JSON/PTCTStudy.json) which I guess would make it easier to reproduce it. In the demo project, it happens when I click the "Volume rendering" tool.

I am new to OHIF and VTK so I am not sure what is going on. Could anyone give me a hand? Thank you.

It works for me (chrome on mac). Maybe your browser doesn't support vtkjs (try the examples https://kitware.github.io/vtk-js/examples/)

image

Same problem here vtk.js examples from the site all work

EDIT: vtktools are not linked on the window object
EDIT: This is with current Chrome browser

Bug on Windows OS when run https://vtk-plugin.ohif.org/?url=https://s3.eu-central-1.amazonaws.com/ohif-viewer/JSON/PTCTStudy.json
-Chrome
-MS Edge
-Firefox

  1. Same above bug occurs at Chrome and MS Edge
  2. Bug on Firefox is below
Exception from Tracker recompute function:
TypeError: VTKUtils is undefined 
setupViewport@https://vtk-plugin.ohif.org/plugins/VTKPlugin/volumeRendering/main.js?2963:59:33
_initEmptyPluginViewports/<@https://vtk-plugin.ohif.org/008a74a72da5af5b95bbc47fe6c1f8d714786336.js:175:317768
_initEmptyPluginViewports@https://vtk-plugin.ohif.org/008a74a72da5af5b95bbc47fe6c1f8d714786336.js:175:317678
_setupListeners/<@https://vtk-plugin.ohif.org/008a74a72da5af5b95bbc47fe6c1f8d714786336.js:175:318115
_compute@https://vtk-plugin.ohif.org/008a74a72da5af5b95bbc47fe6c1f8d714786336.js:49:2321
_recompute@https://vtk-plugin.ohif.org/008a74a72da5af5b95bbc47fe6c1f8d714786336.js:49:2476
tracker.js/s._runFlush@https://vtk-plugin.ohif.org/008a74a72da5af5b95bbc47fe6c1f8d714786336.js:49:3485

Do you have plan fix them?
Thank you!

@Iam0620, this plugin will likely be deprecated in the near future. Most of our VTK work is now taking place in react-vtkjs-viewport and OHIF/viewers/extensions/vtk

Thank you @dannyrb !

Hello there,

I am running into this error when trying to load the plugin:

TypeError: Cannot read property 'getImageData' of undefined
    at VolumeRenderingPlugin.setupViewport (main.js?986.5500000305474:59)
    at 008a74a72da5af5b95bbc47fe6c1f8d714786336.js:175
    at Array.forEach (<anonymous>)
    at VolumeRenderingPlugin._initEmptyPluginViewports (008a74a72da5af5b95bbc47fe6c1f8d714786336.js:175)
    at 008a74a72da5af5b95bbc47fe6c1f8d714786336.js:175
    at t._compute (008a74a72da5af5b95bbc47fe6c1f8d714786336.js:49)
    at t._recompute (008a74a72da5af5b95bbc47fe6c1f8d714786336.js:49)
    at Object.s._runFlush (008a74a72da5af5b95bbc47fe6c1f8d714786336.js:49)
    at a (008a74a72da5af5b95bbc47fe6c1f8d714786336.js:1)

This error happened to me while developing locally but it also happens using the demo URL (https://vtk-plugin.ohif.org/?url=https://s3.eu-central-1.amazonaws.com/ohif-viewer/JSON/PTCTStudy.json) which I guess would make it easier to reproduce it. In the demo project, it happens when I click the "Volume rendering" tool.

I am new to OHIF and VTK so I am not sure what is going on. Could anyone give me a hand? Thank you.

Hi i'd like know if u resolve the problem, I can't update my viewer and I need a solution Thanks you!:)

Hi @miguelranklin. This actually stopped happening to me with the latest versions of the viewer.