I’m new on VTK, there’s a problem I do not know how to resolve: Select a contour to display using vtkContourFilter (The input data is a vtkUnstructuredGrid)
That’s an odd shape for contour lines. I maybe wrong, but I think you want to render the outline of an object and not contour lines. A contour filter won’t display the outline of watever you want. A vtkOutlineFilter will do: https://examples.vtk.org/site/Cxx/PolyData/Outline/ .
Apologize I’m not descripbe the background of my work requirement clearly.
At fist, there’s indeed contour display module in the work project. And the contour display module show the simulation field data use
contourFilter->GenerateValues(5, min, max);
Second, there’s another requirement to display the specified contour (value == 0) which has special meaning (So it displayed using highlight color, e.g. red).
I ask the chatGPT and got the answer using SetValue without GenerateValues:
If you’re getting an unexpected contour line for 0.0, then you have to check the data or the simulation result. Try to get a histogram of the results or display the grid as is.