# Subsample polydata

**URL:** https://discourse.vtk.org/t/subsample-polydata/6444
**Category:** Support
**Created:** [August 22, 2021, 12:11am UTC](https://discourse.vtk.org/t/subsample-polydata/6444 "2021-08-22T00:11:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Y\_So\_Salty](https://discourse.vtk.org/user_avatar/discourse.vtk.org/y_so_salty/32/1426_2.png) [@Y\_So\_Salty](https://discourse.vtk.org/u/Y_So_Salty)
#### Post date: [August 22, 2021, 12:11am UTC](https://discourse.vtk.org/t/subsample-polydata/6444/1 "2021-08-22T00:11:55Z")

</div>

I have a polydata with `N_v` vertices and `N_f` faces.  
I have manually segmented regions (and know all corresponding vertices) which belong to their respective classes. How do I create “subsampled” polydata for these selection, i.e I would like to create sepereate meshes based on the the `point_ID` selections  
My best guess was to use `vtkGeometryFilter`, where it mentions “It also is possible to specify conditions on point ids, cell ids, and on a bounding box (referred to as “Extent”) to control the extraction process”, but I do not find an option to provide the `point ids`

---

<div class="post-metadata">

### Author: ![Andrew](https://discourse.vtk.org/user_avatar/discourse.vtk.org/andrew/32/3861_2.png) [@Andrew](https://discourse.vtk.org/u/Andrew)
#### Post date: [August 23, 2021, 2:27am UTC](https://discourse.vtk.org/t/subsample-polydata/6444/2 "2021-08-23T02:27:09Z")

</div>

I think vtkThreshold is what you’re looking for? It can produce a new poly data for which all values within a certain range are provided. Either cell or point data. You can play around with it in Paraview as well.
