# How can I set up the scale range in vtkRenderingWindow?

**URL:** https://discourse.vtk.org/t/how-can-i-set-up-the-scale-range-in-vtkrenderingwindow/11745
**Category:** Support
**Tags:** rendering
**Created:** [June 17, 2023, 1:24am UTC](https://discourse.vtk.org/t/how-can-i-set-up-the-scale-range-in-vtkrenderingwindow/11745 "2023-06-17T01:24:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![yen](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/y/50afbb/32.png) [@yen](https://discourse.vtk.org/u/yen)
#### Post date: [June 17, 2023, 1:24am UTC](https://discourse.vtk.org/t/how-can-i-set-up-the-scale-range-in-vtkrenderingwindow/11745/1 "2023-06-17T01:24:49Z")

</div>

Hello, I am a new comer to vtk recently. I want to ask a question. Can I set up the scale in vtk windows?

 ![image](https://discourse.vtk.org/uploads/default/original/2X/6/652be8c7ce4e7e509e3dec47c175d5f07b67769e.png)

Here is my 3D object. However, since some value is up to 21000, which represent that the original laser sensor did not sense anything, I want to set the range of Z-axis scale to (-40, 40). How can I do that? Maybe changing the camera view?

---

<div class="post-metadata">

### Author: ![Jens\_Munk\_Hansen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jens_munk_hansen/32/1215_2.png) [@Jens\_Munk\_Hansen](https://discourse.vtk.org/u/Jens_Munk_Hansen)
#### Post date: [June 18, 2023, 6:36pm UTC](https://discourse.vtk.org/t/how-can-i-set-up-the-scale-range-in-vtkrenderingwindow/11745/2 "2023-06-18T18:36:20Z")

</div>

You can use SetClippingRange for the camera. Values are depth in world coordinates.

---

<div class="post-metadata">

### Author: ![yen](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/y/50afbb/32.png) [@yen](https://discourse.vtk.org/u/yen)
#### Post date: [June 19, 2023, 12:34am UTC](https://discourse.vtk.org/t/how-can-i-set-up-the-scale-range-in-vtkrenderingwindow/11745/3 "2023-06-19T00:34:30Z")

</div>

Thank you, then should I set up the position of camera? i found a result that if I set up the position of camera in vtk, I will no longer being able to rolling the camera by mouse.

---

<div class="post-metadata">

### Author: ![Jens\_Munk\_Hansen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jens_munk_hansen/32/1215_2.png) [@Jens\_Munk\_Hansen](https://discourse.vtk.org/u/Jens_Munk_Hansen)
#### Post date: [June 19, 2023, 10:27pm UTC](https://discourse.vtk.org/t/how-can-i-set-up-the-scale-range-in-vtkrenderingwindow/11745/4 "2023-06-19T22:27:20Z")

</div>

You can get the active camera from the renderer and simply set the clipping range. You can still roll the camera through the interactor.
