# Make source a VTK object?

**URL:** https://discourse.paraview.org/t/make-source-a-vtk-object/4208
**Category:** ParaView Support
**Tags:** python, vtk
**Created:** [April 29, 2020, 2:52am UTC](https://discourse.paraview.org/t/make-source-a-vtk-object/4208 "2020-04-29T02:52:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![yw5aj](https://discourse.paraview.org/user_avatar/discourse.paraview.org/yw5aj/32/60_2.png) [@yw5aj](https://discourse.paraview.org/u/yw5aj)
#### Post date: [April 29, 2020, 2:52am UTC](https://discourse.paraview.org/t/make-source-a-vtk-object/4208/1 "2020-04-29T02:52:08Z")

</div>

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()[0]

And I can see the type:  
type(src)  
\<class ‘paraview.servermanager.STLReader’\>

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()  
pdd.SetInput(src)

Traceback (most recent call last):  
File “”, line 1, in   
TypeError: SetInput argument 1: method requires a VTK object

Thanks,  
Shawn

---

<div class="post-metadata">

### Author: ![yw5aj](https://discourse.paraview.org/user_avatar/discourse.paraview.org/yw5aj/32/60_2.png) [@yw5aj](https://discourse.paraview.org/u/yw5aj)
#### Post date: [May 1, 2020, 10:58am UTC](https://discourse.paraview.org/t/make-source-a-vtk-object/4208/2 "2020-05-01T10:58:39Z")

</div>

Ah here it is:

Use servermanager.Fetch(src) to get the data.
