[Paraview] contour programmable filter

guillaume robguillaume at free.fr
Fri Sep 24 14:57:20 EDT 2010

Hi everybody,

I begin with Paraview and I would like to have a variable input (like 
the maximum temperature at each time step) for the isosurface into the 
contour filter.
In this way, I created a programmable filter to get the maximum 
temperature :

pdi = self.GetPolyDataInput()
pdo =  self.GetPolyDataOutput()
numPoints = pdi.GetNumberOfPoints()
temperature = pdi.GetPointData().GetArray("temperature")

for i in range(0, numPoints):
    if (max < temperature.GetValue(i)):
        max = temperature.GetValue(i)

But, now my problem is how create the contour filter ?
I tried with :

cf = vtk.vtkContourGrid()

but I didn't obtained some images. Perhaps I need some lines code with 
self.GetPolyDataOutput() ?

Thanks in advance,

More information about the ParaView mailing list