# How to create my own algorithmfilter in python?

**URL:** <https://discourse.vtk.org/t/how-to-create-my-own-algorithmfilter-in-python/7963>\
**Category:** Development\
**Created:** [March 3, 2022, 6:09am UTC](https://discourse.vtk.org/t/how-to-create-my-own-algorithmfilter-in-python/7963 "2022-03-03T06:09:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xq820063954](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/x/58f4c7/32.png) [@xq820063954](https://discourse.vtk.org/u/xq820063954)\
**Post date:** [March 3, 2022, 6:09am UTC](https://discourse.vtk.org/t/how-to-create-my-own-algorithmfilter-in-python/7963/1 "2022-03-03T06:09:07Z")

</div>

Hello Team,

I am a beginner and blocked in my research. I kindly need help of anyone here.

I’m trying to convert CXX’s AlgorithmFilter sample code to Python. However, I don’t know how vtkNotUsed said in python, is there any alternative expression? The code in cxx is shown below.

int vtkTestAlgorithmFilter::RequestData(vtkInformation\* vtkNotUsed(request),  
vtkInformationVector\*\* inputVector,  
vtkInformationVector\* outputVector)

Thanks and kind regards!

---

<div class="post-metadata">

**Author:** ![Charles\_Gueunet](https://discourse.vtk.org/user_avatar/discourse.vtk.org/charles_gueunet/32/239_2.png) [@Charles\_Gueunet](https://discourse.vtk.org/u/Charles_Gueunet)\
**Post date:** [March 3, 2022, 10:33am UTC](https://discourse.vtk.org/t/how-to-create-my-own-algorithmfilter-in-python/7963/2 "2022-03-03T10:33:41Z")

</div>

Dear xuqian,

the `vtkNotUsed` is simply a macro to avoid a compiler warning.

For resources about VTK Filter in Python, please refer to the corresponding blog:

- [https://www.kitware.com/vtkpythonalgorithm-is-great/](https://www.kitware.com/vtkpythonalgorithm-is-great/)
- [https://www.kitware.com/a-vtk-pipeline-primer-part-1/](https://www.kitware.com/a-vtk-pipeline-primer-part-1/)
- [https://www.kitware.com/a-vtk-pipeline-primer-part-2/](https://www.kitware.com/a-vtk-pipeline-primer-part-2/)
- [https://www.kitware.com/a-vtk-pipeline-primer-part-3/](https://www.kitware.com/a-vtk-pipeline-primer-part-3/)

Best,  
Charles

---

<div class="post-metadata">

**Author:** ![xq820063954](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/x/58f4c7/32.png) [@xq820063954](https://discourse.vtk.org/u/xq820063954)\
**Post date:** [March 4, 2022, 2:07am UTC](https://discourse.vtk.org/t/how-to-create-my-own-algorithmfilter-in-python/7963/3 "2022-03-04T02:07:59Z")

</div>

Thanks for your reply,sir. It helps a lot.
