I am looking for a vtkContourGrid example since I couldn’t find one with the online vtkContourGrid class documentation.
I have scalar cell data assigned to my vtkUnstructuredGrid object. Based on the vtkContourFilter examples, I think that output from the vtkUnstructuredGrid object can be read into the vtkContourGrid.
If this works, do I then need to process normals for the contour surface?
vtkContourFilter calls vtkContourGrid internally when unstructured grid are processed, and i am pretty sure there are examples out there for vtkContourFilter .
you can consider using vtkCellDataToPointData so that you have the array of cell data that you want interpolated as an array of point data and then use it as input for the contour filter.
I thought that there might be a method to convert cell data to point. I know that I wouldn’t have found that routine without asking. I’ll look into it.
Using what I last posted to this topic, I’m not convinced that the cell data is being converted to point data as I thought it would. When I co-plot the cell data with a contour from the converted data, the two don’t align. That is, the contour doesn’t coincide with the cell data.
Is there a way that I can dump some of the data to see what is going on?
The vtkCellDataToPointData is a highly tested filter and it’s doing what it is supposed to do. But you should know that point values are set by averaging the neighboring cells, no weighted averaging the neighboring cells, that’s why you probably don’t get the results you expect.