[Paraview] AttributeError ising Python programmable filter

John Fraser logic_cube at btinternet.com
Wed Jul 10 16:35:47 EDT 2013


Hello,

I'm using ParaView 4.01 32 bit and trying out an example Python programmable filter, however it seems I am unable to use some VTK methods and get the resulting errors:

Traceback (most recent call last):
File "<string>", line 21, in <module>
File "<string>", line 7, in RequestData
AttributeError: SetInput

Here is the example taken from the wiki that produces this error

pinput = vtk.vtkImageData()
pinput.SetExtent(0, 10, 0, 10, 0, 10)
pinput.SetOrigin(0, 1, 0)
pinput.SetSpacing(0.5, 0.5, 0.5)
probe = vtk.vtkProbeFilter()
probe.SetInput(pinput)
input_copy = inputs[0].NewInstance()
input_copy.UnRegister(None)
input_copy.ShallowCopy(inputs[0].VTKObject)
probe.SetSource(input_copy)
probe.Update()
output.ShallowCopy(probe.GetOutput())

The other filters on the wiki that don't use include the use of VTK filters work fine, e.g. the script called "transform the input" works just fine.  Does anyone know what I'm missing?

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130710/41235832/attachment.htm>


More information about the ParaView mailing list