[vtk.js] imagestream/DefaultProtocol.js incompatible with VTK


I was trying to setup a server with VTK and wslink and connect to it via vtk.js, but I am getting several errors in the web application. For example:
“TypeError(‘updateCamera() takes 5 positional arguments but 6 were given’)”

Is it possible that the Protocol, defined in vtk.js/Sources/IO/Core/ImageStream/DefaultProtocol.js is not compatible with the one in VTK/Web/Python/vtkmodules/web/protocols.py ?
If so: why is that, and is there a fix planned? Or did I use it wrong?

Thank you in advance

Thanks for reporting the issue. The fix is here but ideally if you need also to use a parallel camera, you will need to use the useCameraParameters option on the image stream which will push to viewport.camera.update.params RPC that does not exist but that you can implement this way minus the difference between VTK and ParaView since the code below is for ParaView.

    def updateCameraParamters(self, viewId, params, forceUpdate = True):
      view = self.getView(viewId)

      if 'focalPoint' in params:
        view.CameraFocalPoint = params['focalPoint']

      if 'viewUp' in params:
        view.CameraViewUp = params['viewUp']

      if 'position' in params:
        view.CameraPosition = params['position']

      if 'parallelProjection' in params:
        view.CameraParallelProjection = params['parallelProjection']

      if 'viewAngle' in params:
        view.CameraViewAngle = params['viewAngle']

      if 'parallelScale' in params:
        view.CameraParallelScale = params['parallelScale']

      if forceUpdate: