[Paraview] AttributeError ising Python programmable filter

David E DeMarle dave.demarle at kitware.com
Wed Jul 10 16:41:49 EDT 2013


Change that to SetInputData.
The API for connecting filters to filters and filter to data differentiated
like so in VTK6
filter->filter SetInput < 6.0 > SetInputConnection
data->filter SetInput < 6.0 > SetInputData

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Wed, Jul 10, 2013 at 4:35 PM, John Fraser <logic_cube at btinternet.com>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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130710/979b7c74/attachment.htm>


More information about the ParaView mailing list