# About 3D image cutting

**URL:** https://discourse.vtk.org/t/about-3d-image-cutting/11011
**Category:** Web
**Created:** [March 20, 2023, 2:49pm UTC](https://discourse.vtk.org/t/about-3d-image-cutting/11011 "2023-03-20T14:49:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![HWsir](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/h/9dc877/32.png) [@HWsir](https://discourse.vtk.org/u/HWsir)
#### Post date: [March 20, 2023, 2:49pm UTC](https://discourse.vtk.org/t/about-3d-image-cutting/11011/1 "2023-03-20T14:49:30Z")

</div>

I have some questions about 3D image cutting. I draw a polygon through the lasso tool and generate a polydata, that is, a polyprism, according to the original volume data in the vertical direction of the screen, as shown in the figure. Now my idea is to calculate the nearest and furthest point from the original volume data to the screen to set the height of the polyprism Volume data field intersection, after use vtkImageStencilToImage class and vtkPolyDataToImageStencil class performing data conversion.

 ![image](https://discourse.vtk.org/uploads/default/original/2X/8/8ff2c05a0f05eaa325704c7f626209184f98fd30.jpeg)  
I’d like to know the feasibility of this method. Maybe there are other ways I don’t know, and I’d like to get some advice I will be very grateful.

---

<div class="post-metadata">

### Author: ![finetjul](https://discourse.vtk.org/user_avatar/discourse.vtk.org/finetjul/32/154_2.png) [@finetjul](https://discourse.vtk.org/u/finetjul)
#### Post date: [March 22, 2023, 6:11pm UTC](https://discourse.vtk.org/t/about-3d-image-cutting/11011/2 "2023-03-22T18:11:00Z")

</div>

Is this related to the “Web” category of VTK? With what toolkit do you want to perform these operations ? VTK C++ or VTK.js ?

---

<div class="post-metadata">

### Author: ![HWsir](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/h/9dc877/32.png) [@HWsir](https://discourse.vtk.org/u/HWsir)
#### Post date: [March 23, 2023, 2:29am UTC](https://discourse.vtk.org/t/about-3d-image-cutting/11011/3 "2023-03-23T02:29:28Z")

</div>

I am using vtk C++ to do this, and later I plan to rewrite it in python and eventually work on the web via trame.

—Original—

---

<div class="post-metadata">

### Author: ![finetjul](https://discourse.vtk.org/user_avatar/discourse.vtk.org/finetjul/32/154_2.png) [@finetjul](https://discourse.vtk.org/u/finetjul)
#### Post date: [March 23, 2023, 7:46am UTC](https://discourse.vtk.org/t/about-3d-image-cutting/11011/4 "2023-03-23T07:46:20Z")

</div>

Then you will have better luck with your question if you post it in a different discourse category 😃

---

<div class="post-metadata">

### Author: ![HWsir](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/h/9dc877/32.png) [@HWsir](https://discourse.vtk.org/u/HWsir)
#### Post date: [March 23, 2023, 9:56am UTC](https://discourse.vtk.org/t/about-3d-image-cutting/11011/5 "2023-03-23T09:56:50Z")

</div>

You’re right. I just noticed the topic category.
