# Cropping plane scaling

**URL:** https://discourse.vtk.org/t/cropping-plane-scaling/11327
**Category:** Support
**Created:** [April 27, 2023, 12:15pm UTC](https://discourse.vtk.org/t/cropping-plane-scaling/11327 "2023-04-27T12:15:13Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![theGunner24](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@theGunner24](https://discourse.vtk.org/u/theGunner24)
#### Post date: [April 27, 2023, 12:15pm UTC](https://discourse.vtk.org/t/cropping-plane-scaling/11327/1 "2023-04-27T12:15:13Z")

</div>

Hello !  
I use AddClippingPlane method in vtk volume rendering and can easily set origin and orientation of plane.Is it possible to also scale cropping plane in volume mapper ? If not because I assume so as vtkPlane is math function and not object on the scene do you have any ideas how to achieve that ?

Regards,  
Konrad

---

<div class="post-metadata">

### Author: ![sankhesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sankhesh/32/73_2.png) [@sankhesh](https://discourse.vtk.org/u/sankhesh)
#### Post date: [May 2, 2023, 2:23pm UTC](https://discourse.vtk.org/t/cropping-plane-scaling/11327/2 "2023-05-02T14:23:31Z")

</div>

Yes, vtkPlane is an implicit function that is evaluated against the volume bounds to create a bounded cropping plane. As such, there is no scaling involved. Are you looking to render scaled plane geometry?

---

<div class="post-metadata">

### Author: ![theGunner24](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@theGunner24](https://discourse.vtk.org/u/theGunner24)
#### Post date: [May 4, 2023, 10:44am UTC](https://discourse.vtk.org/t/cropping-plane-scaling/11327/3 "2023-05-04T10:44:19Z")

</div>

Thanks for confirmation @sankhesh !  
Actually I want to crop volume with cube bounds so I could crop it not only on whole length. Something like on the pic:

 ![criopping](https://discourse.vtk.org/uploads/default/original/2X/3/31cd3bde4e3ae949b691626ffbe2bc584c1bc962.jpeg)

---

<div class="post-metadata">

### Author: ![sankhesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sankhesh/32/73_2.png) [@sankhesh](https://discourse.vtk.org/u/sankhesh)
#### Post date: [May 4, 2023, 2:59pm UTC](https://discourse.vtk.org/t/cropping-plane-scaling/11327/4 "2023-05-04T14:59:15Z")

</div>

For cropping to cube bounds, you need to define the 6 planes that make up the cube and then feed them to the volume mapper. That’s how [VolView’s](https://volview.netlify.app/) cropping widget is implemented.

---

<div class="post-metadata">

### Author: ![theGunner24](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@theGunner24](https://discourse.vtk.org/u/theGunner24)
#### Post date: [May 8, 2023, 7:45am UTC](https://discourse.vtk.org/t/cropping-plane-scaling/11327/5 "2023-05-08T07:45:18Z")

</div>

Yes that works perfectly indeed however I’m wondering here if it’s possible to have a reversed cropping effect so instead cropping volume that is inside a cube to crop it with an aouter cube which will result in that only part of volume could be cropped and not on whole lenght if scaling of plane would be possible. Let me attach more SSs of this idea:

 ![example](https://discourse.vtk.org/uploads/default/original/2X/d/dc554fa84a7ceb3bcb9829cf5d29b3e7535256cf.png)

---

<div class="post-metadata">

### Author: ![sankhesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sankhesh/32/73_2.png) [@sankhesh](https://discourse.vtk.org/u/sankhesh)
#### Post date: [May 8, 2023, 1:20pm UTC](https://discourse.vtk.org/t/cropping-plane-scaling/11327/6 "2023-05-08T13:20:13Z")

</div>

To reverse cropping direction, just negate the normals of the face planes.
