# Kitware/Visualizer renderer doesn't update the image automatically

**URL:** https://discourse.paraview.org/t/kitware-visualizer-renderer-doesnt-update-the-image-automatically/6540
**Category:** Web Support
**Created:** [February 24, 2021, 2:48am UTC](https://discourse.paraview.org/t/kitware-visualizer-renderer-doesnt-update-the-image-automatically/6540 "2021-02-24T02:48:15Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![lbs1163](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/a587f6/32.png) [@lbs1163](https://discourse.paraview.org/u/lbs1163)
#### Post date: [February 24, 2021, 2:48am UTC](https://discourse.paraview.org/t/kitware-visualizer-renderer-doesnt-update-the-image-automatically/6540/1 "2021-02-24T02:48:15Z")

</div>

Hello! I’m working on making single rendering view with paraview backend.

I successed with running python launcher included in Kitware/visualizer.

I changed the renderer of visualizer from **React/Renderers/VtkRenderer** to **NativeUI/Canvas/RemoteRenderer** due to more flexible compability.

I made a button which modifies the viewport.  
The rpc call for updateCamera and resetCamera works.  
However, **the renderer (canvas) doesn’t change until I make a mouse interaction.**

How do I make the renderer (canvas) update the image automatically when the methods related to the viewport are called?  
**Is there any function in RemoteRenderer object to update image?**

Below is my code for event handler.  
renderer is an object of RemoteRenderer class (NativeUI/Canvas/RemoteRenderer).

```
const resetCamera = () => {
  renderer.client.ViewPort.updateCamera(renderer.view, [0, 0, 0], [0, 1, 0], [1, 0, 0]);
  renderer.client.ViewPort.resetCamera(renderer.view);
}
```

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [February 24, 2021, 3:24pm UTC](https://discourse.paraview.org/t/kitware-visualizer-renderer-doesnt-update-the-image-automatically/6540/2 "2021-02-24T15:24:33Z")

</div>

Every time you want the server to push a new image you should call [that method](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Web/Python/paraview/web/protocols.py#L283).

BTW, if you are starting a new project, you should use [that project](https://github.com/Kitware/web-project-templates/tree/master/vue-vtkjs-pvw-template) as a reference on how to create a new ParaViewWeb application using Vue.

---

<div class="post-metadata">

### Author: ![lbs1163](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/a587f6/32.png) [@lbs1163](https://discourse.paraview.org/u/lbs1163)
#### Post date: [February 25, 2021, 2:38am UTC](https://discourse.paraview.org/t/kitware-visualizer-renderer-doesnt-update-the-image-automatically/6540/3 "2021-02-25T02:38:52Z")

</div>

I called resetCamera by RPC with “renderer.client.ViewPort.resetCamera(renderer.view);”  
I think updateEvent should be invoked when I call resetCamera.  
I checked the vue project but I’m not familiar with vue and it uses vtkRemoteView, not RemoteRenderer that I use.

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [February 25, 2021, 3:16pm UTC](https://discourse.paraview.org/t/kitware-visualizer-renderer-doesnt-update-the-image-automatically/6540/4 "2021-02-25T15:16:40Z")

</div>

The Vue project does use `vtkRemoteView` because that is the latest implementation that should be used going forward.

The old one that you are using should still work assuming you are exposing the proper (old) server side protocol `ParaViewWebViewPortImageDelivery`.

My guess is that with that old protocol, you may have to request (from the client) a new image when you click on resetCamera which is not required anymore with the latest `ParaViewWebPublishImageDelivery`.

---

<div class="post-metadata">

### Author: ![jone](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jone/32/9307_2.png) [@jone](https://discourse.paraview.org/u/jone)
#### Post date: [March 1, 2021, 1:19am UTC](https://discourse.paraview.org/t/kitware-visualizer-renderer-doesnt-update-the-image-automatically/6540/5 "2021-03-01T01:19:01Z")

</div>

Have you solved the problem？I’m also annoyed that the remoterRenderer won’t update the image automatically.

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [March 1, 2021, 3:16pm UTC](https://discourse.paraview.org/t/kitware-visualizer-renderer-doesnt-update-the-image-automatically/6540/6 "2021-03-01T15:16:39Z")

</div>

Like I said `ParaViewWebViewPortImageDelivery` expect the client to request an image push.

---

<div class="post-metadata">

### Author: ![lbs1163](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/a587f6/32.png) [@lbs1163](https://discourse.paraview.org/u/lbs1163)
#### Post date: [March 3, 2021, 2:20am UTC](https://discourse.paraview.org/t/kitware-visualizer-renderer-doesnt-update-the-image-automatically/6540/7 "2021-03-03T02:20:04Z")

</div>

> [@jourdain](#):
>
> The old one that you are using should still work assuming you are exposing the proper (old) server side protocol `ParaViewWebViewPortImageDelivery`.

I have only _stillRender_ function in **renderer.client.ViewPortImageDelivery**.  
I did try this function but I think it returns the image as json, not updating the actual canvas.  
Did I misunderstand something? Should I put the image returned from _stillRender_ on canvas manually?

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [March 3, 2021, 3:06pm UTC](https://discourse.paraview.org/t/kitware-visualizer-renderer-doesnt-update-the-image-automatically/6540/8 "2021-03-03T15:06:07Z")

</div>

Did you call [that function](https://github.com/Kitware/paraviewweb/blob/master/src/NativeUI/Canvas/RemoteRenderer/index.js#L137)?
