# How to generate contours on points without interpolation to cells?

**URL:** https://discourse.vtk.org/t/how-to-generate-contours-on-points-without-interpolation-to-cells/7985
**Category:** Support
**Created:** [March 5, 2022, 6:05pm UTC](https://discourse.vtk.org/t/how-to-generate-contours-on-points-without-interpolation-to-cells/7985 "2022-03-05T18:05:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![DFlyer](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dflyer/32/1598_2.png) [@DFlyer](https://discourse.vtk.org/u/DFlyer)
#### Post date: [March 5, 2022, 6:05pm UTC](https://discourse.vtk.org/t/how-to-generate-contours-on-points-without-interpolation-to-cells/7985/1 "2022-03-05T18:05:04Z")

</div>

I have a polydata with quad mesh and scalar double values on **points**. When I generate contours with vtkContourFilter, I get contours that lie on the cells and seems to be interpolated by average. Is it possible to generate contours that strictly lies on the points?

Thanks!

 ![image](https://discourse.vtk.org/uploads/default/original/2X/c/c8f5b9669a7166641091687b51dc165f3c032f8e.png)

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [March 6, 2022, 1:16pm UTC](https://discourse.vtk.org/t/how-to-generate-contours-on-points-without-interpolation-to-cells/7985/2 "2022-03-06T13:16:51Z")

</div>

Hi,

I don’t think so. By their very definition, countours are lines that connect places equally valued. For example, if you have points valued 0.0 and neighboring ones valued 1.0, the 0.5 contour will necessarily pass halfway between them. So, I believe you need a post-processing “snap-to-grid” step/filter to align the contour points with the underlying grid edges. Please, take a look at this example: [https://kitware.github.io/vtk-examples/site/Cxx/PolyData/QuantizePolyDataPoints/](https://kitware.github.io/vtk-examples/site/Cxx/PolyData/QuantizePolyDataPoints/)

take care,

Paulo
