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 <[email protected]>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
