SetInput method was removed in VTK 6.0. See this link for info on how to fix your code.
http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Overview


On 07/10/2013 01:35 PM, John Fraser wrote:
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




_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to