I know that in programmable filters, I can get the input in the scene easily by using self.GetInputDataObject(0, ). It is already a vtkPolyData object.
When I tried to troubleshoot, I am trying to first locate a source (which is an STL file I already loaded):
src = GetSources().values()
And I can see the type:
But I cannot pass it to many vtk functions (e.g. vtk.vtkImplicitPolyDataDistance().SetInput()) because it is not a VTK object. How can I convert it into a VTK object?
The error message is:
pdd = vtk.vtkImplicitPolyDataDistance()
Traceback (most recent call last):
File “”, line 1, in
TypeError: SetInput argument 1: method requires a VTK object