# How to delete/hide specific points from vtkvolume?

**URL:** https://discourse.vtk.org/t/how-to-delete-hide-specific-points-from-vtkvolume/10431
**Category:** Support
**Created:** [January 12, 2023, 10:54am UTC](https://discourse.vtk.org/t/how-to-delete-hide-specific-points-from-vtkvolume/10431 "2023-01-12T10:54:07Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [January 13, 2023, 1:13pm UTC](https://discourse.vtk.org/t/how-to-delete-hide-specific-points-from-vtkvolume/10431/2 "2023-01-13T13:13:22Z")

</div>

You can create a 3D frustum shape based on the 2D polygon drawn on the screen and the camera parameters, then convert this closed surface to a binary image. This binary image can be either used as a mask in the volume raycast mapper, or you can use it to blank out voxels of the rendered volume.

This is implemented using VTK in 3D Slicer. It is called the Scissors tool (a.k.a. Scalpel in other software):

[![](https://discourse.vtk.org/uploads/default/original/2X/3/31f74b899980ead3a4b116e45bc91bb1b0e3d6e5.jpeg "New "Surface cut" and "Mask volume" tools for 3D Slicer segment editor") ](https://www.youtube.com/watch?v=xZwyW6SaoM4)

You can use the feature as is in 3D Slicer using GUI or in your custom C++ modules or Python scripts. Or you can copy-paste the code into your application (Slicer’s permissive license allows using any parts of it for any purpose in any other software). The implementation in C++ is available here, for both slice and 3D views, perspective and parallel projections:

> <https://github.com/Slicer/Slicer/blob/83a84a0f72baa0fcd1bb3653cedae7b02ca3bd1b/Modules/Loadable/Segmentations/EditorEffects/qSlicerSegmentEditorScissorsEffect.cxx#L544-L866>

---

_[View the full topic](https://discourse.vtk.org/t/how-to-delete-hide-specific-points-from-vtkvolume/10431)._
