How to generate contours on points without interpolation to cells?

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!

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/

take care,

Paulo