# How to pass the output of a Reader to an algorithm or filter

**URL:** https://discourse.paraview.org/t/how-to-pass-the-output-of-a-reader-to-an-algorithm-or-filter/7252
**Category:** ParaView Support
**Created:** [May 19, 2021, 1:04pm UTC](https://discourse.paraview.org/t/how-to-pass-the-output-of-a-reader-to-an-algorithm-or-filter/7252 "2021-05-19T13:04:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bbellster](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/35a633/32.png) [@bbellster](https://discourse.paraview.org/u/bbellster)
#### Post date: [May 19, 2021, 1:04pm UTC](https://discourse.paraview.org/t/how-to-pass-the-output-of-a-reader-to-an-algorithm-or-filter/7252/1 "2021-05-19T13:04:15Z")

</div>

I’m trying to use vtk functionality not available in paraview. So I’m trying to do everything I need to in a script and its a fairly long script so I don’t prefer the programmable script method.  
My question is, how do I pass the output of say STLReader to an algorithm or filter? Example below.

```
boneScanReader = STLReader(registrationName = 'BoneScan')
boneScanReader.FileNames = tibiaSTLFile
boneScanReader.UpdatePipeline()
.
.
.
postImpactScanTransform = vtk.vtkTransformPolyDataFilter()
postImpactScanTransform.SetInputData(boneScanReader)

```

SetInputData() is where I’m having trouble. I don’t quite understand how to get the polygonal mesh from the STLReader

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 19, 2021, 1:11pm UTC](https://discourse.paraview.org/t/how-to-pass-the-output-of-a-reader-to-an-algorithm-or-filter/7252/2 "2021-05-19T13:11:54Z")

</div>

> [@bbellster](#):
>
> I don’t prefer the programmable script method.

Unrelated.

You are confusing client side pvpython scripting and servser side VTKPython scripting.  
[https://kitware.github.io/paraview-docs/latest/python/](https://kitware.github.io/paraview-docs/latest/python/)  
[https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html](https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html)

---

<div class="post-metadata">

### Author: ![todoooo](https://discourse.paraview.org/user_avatar/discourse.paraview.org/todoooo/32/2819_2.png) [@todoooo](https://discourse.paraview.org/u/todoooo)
#### Post date: [May 20, 2021, 4:14am UTC](https://discourse.paraview.org/t/how-to-pass-the-output-of-a-reader-to-an-algorithm-or-filter/7252/3 "2021-05-20T04:14:29Z")

</div>

`postImpactScanTransform.SetInputConnection(boneScanReader.GetOutputPort())`
