[vtkusers] vtkDecimate not available from python bindings?

Thomas Hansen thomas.hansen at gmail.com
Wed Aug 10 23:32:55 EDT 2005


Hi I am extracting some Iso sirfaces from a set of rather large images.  It 
all works pretty good, except that I would like to use some Decimation to get 
some smoother interaction.

Here is some of my code:
[...]
contours =  vtkContourFilter()
contours.SetInput(reader.GetOutput())
contours.SetValue(0,70)
contours.GetValue(0)

deci =  vtkDecimate()
deci.SetInput(contours.GetOutput())
deci.SetTargetReduction(0.9)
deci.SetAspectRatio(20)
deci.SetInitialError(0.0005)
deci.SetErrorIncrement(0.001)
deci.SetMaximumIteration(6)
[...]

but when I run the program I get the following error:
    deci =  vtkDecimate()
NameError: name 'vtkDecimate' is not defined

I have tried with both python and vtkpython.  Also I have tried with both a 
VTK installation from the debian repository (not sure what version though) 
and a self-compiled 4.4 interim release..


Anyone have similar problems or know what I am doing wrong??



More information about the vtkusers mailing list