# How to actively trigger resolution reduction when zooming in and rotating on a tablet？

**URL:** https://discourse.vtk.org/t/how-to-actively-trigger-resolution-reduction-when-zooming-in-and-rotating-on-a-tablet/9270
**Category:** Web
**Created:** [September 2, 2022, 3:07am UTC](https://discourse.vtk.org/t/how-to-actively-trigger-resolution-reduction-when-zooming-in-and-rotating-on-a-tablet/9270 "2022-09-02T03:07:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zhangzhi93](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zhangzhi93/32/4954_2.png) [@zhangzhi93](https://discourse.vtk.org/u/zhangzhi93)
#### Post date: [September 2, 2022, 3:07am UTC](https://discourse.vtk.org/t/how-to-actively-trigger-resolution-reduction-when-zooming-in-and-rotating-on-a-tablet/9270/1 "2022-09-02T03:07:09Z")

</div>

When the volume image is manipulated on a tablet, the resolution will not be reduced at the beginning, resulting in operations such as zooming and rotating, which will be very laggy. After that, continuous operation will trigger resolution reduction, and the operation will become smoother at this time. But I don’t know what triggered the downgrade. I would like to ask if it is possible to manually trigger the resolution reduction when zooming in and rotating operations?

---

<div class="post-metadata">

### Author: ![Forrest](https://discourse.vtk.org/user_avatar/discourse.vtk.org/forrest/32/300_2.png) [@Forrest](https://discourse.vtk.org/u/Forrest)
#### Post date: [September 2, 2022, 2:43pm UTC](https://discourse.vtk.org/t/how-to-actively-trigger-resolution-reduction-when-zooming-in-and-rotating-on-a-tablet/9270/2 "2022-09-02T14:43:26Z")

</div>

You can try adjusting `renderWindowInteractor.setDesiredUpdateRate(rate)`. The default value is 30.

---

<div class="post-metadata">

### Author: ![zhangzhi93](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zhangzhi93/32/4954_2.png) [@zhangzhi93](https://discourse.vtk.org/u/zhangzhi93)
#### Post date: [September 5, 2022, 2:37am UTC](https://discourse.vtk.org/t/how-to-actively-trigger-resolution-reduction-when-zooming-in-and-rotating-on-a-tablet/9270/3 "2022-09-05T02:37:26Z")

</div>

After setting the update rate to 1, it becomes more stuttering and does not trigger reducing the resolution. In my software, it also involves adjusting the contrast and brightness of the 3 slices. After setting the update rate to 1, the slices also update the brightness and contrast. became stuck. Or do I need to set the value higher?  
my code:

```javascript
  rendering.interactor = vtk.genericRenderWindow.getInteractor();
  rendering.interactor.setDesiredUpdateRate(1);

```

---

<div class="post-metadata">

### Author: ![Forrest](https://discourse.vtk.org/user_avatar/discourse.vtk.org/forrest/32/300_2.png) [@Forrest](https://discourse.vtk.org/u/Forrest)
#### Post date: [September 13, 2022, 2:48am UTC](https://discourse.vtk.org/t/how-to-actively-trigger-resolution-reduction-when-zooming-in-and-rotating-on-a-tablet/9270/4 "2022-09-13T02:48:50Z")

</div>

Oh, I was interpreting that incorrectly. Try setting it to be a higher number than the framerate you’re getting already. You can listen to `interactor.onAnimationFrameRateUpdate(() => console.log(interactor.getRecentAnimationFrameRate())` to get the frame rate, and set your desired frame rate to something larger, which may speed up the rate at which downsampling happens.

If you’re in need of a method for immediate resolution reduction, we can see if that’s something worth adding.
