on using the vtkThresholdPoints to threshold a mesh it returns back just the points. I need to get back the mesh with its surface again, not just the points. I need to get the thresholded mesh with the surface.
this is my code:
threshold = vtkThresholdPoints()
threshold.SetInputData(polydata)
threshold.ThresholdByUpper(threshold_value)
threshold.Update()
polydata = threshold.Update()
Then I added the surface reconstruction filter to construct the surface again, but it gives a total different red shape.
surface = vtkSurfaceReconstructionFilter()
surface.SetInputData(polydata)
cf = vtkContourFilter()
cf.SetInputConnection(surface.GetOutputPort())
cf.Update()
cf.GetOutput()
this is the output, which is not the input mesh I used or the expected output.
vtkThresholdPoints
only "extracts points whose scalar value satisfies threshold criterion" (from the doc). So no way to get any surface defined.
You should use the vtkClipDataSet
filter instead. You can clip by a scalar instead of a geometric implicit function.
See the lens_clip
in this example