[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")

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

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

cf = vtk.vtkContourGrid()
cf.SetInputConnection(pdo)
cf.SetValue(1,0.1)

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

Thanks in advance,
Guillaume





More information about the ParaView mailing list