# Independent zoom along different axes

**URL:** <https://discourse.slicer.org/t/independent-zoom-along-different-axes/19263>\
**Category:** Development\
**Created:** [August 18, 2021, 10:45pm UTC](https://discourse.slicer.org/t/independent-zoom-along-different-axes/19263 "2021-08-18T22:45:49Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [August 22, 2021, 3:02pm UTC](https://discourse.slicer.org/t/independent-zoom-along-different-axes/19263/14 "2021-08-22T15:02:10Z")

</div>

It seems that I can set [transform to the vtkCamera](https://discourse.vtk.org/t/scaling-a-rendering-scene/173/4?u=kerim). And I tested with VTK 9.0.1 it works.

```cpp
  vtkNew<vtkTransform> transform;
  transform->Scale(2, 1, 1);

  renderer->GetActiveCamera()->SetModelTransformMatrix(transform->GetMatrix());

```

Though there are some problems that is connected with `vtkCubeAxesActor`.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/0/00b3c26df9bc6275bd4060e7159e5ec15a960198.png)

P.S. as I have previously created [topic dedicated to adding vtkCubeAxesActor to the Slicer’s scene](https://discourse.slicer.org/t/add-an-actor-vtkcubeaxesactor-to-the-scene-in-c/19294), I think I should discuss the mentionned problem there.

---

_[View the full topic](https://discourse.slicer.org/t/independent-zoom-along-different-axes/19263)._
