# Add custom filters to custom app

**URL:** https://discourse.paraview.org/t/add-custom-filters-to-custom-app/3476
**Category:** Development
**Tags:** python
**Created:** [January 31, 2020, 9:30pm UTC](https://discourse.paraview.org/t/add-custom-filters-to-custom-app/3476 "2020-01-31T21:30:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![majo\_vlas](https://discourse.paraview.org/user_avatar/discourse.paraview.org/majo_vlas/32/2567_2.png) [@majo\_vlas](https://discourse.paraview.org/u/majo_vlas)
#### Post date: [January 31, 2020, 9:30pm UTC](https://discourse.paraview.org/t/add-custom-filters-to-custom-app/3476/1 "2020-01-31T21:30:04Z")

</div>

I recently ask about automatically adding custom filters to a custom application based on the Clone1 example.  
[https://gitlab.kitware.com/paraview/paraview/tree/master/Examples/CustomApplications/Clone1](https://gitlab.kitware.com/paraview/paraview/tree/master/Examples/CustomApplications/Clone1)

I was referred to this article  
[https://kitware.github.io/paraview-docs/latest/cxx/PluginHowto.html](https://kitware.github.io/paraview-docs/latest/cxx/PluginHowto.html)

But I can’t find an example on how to do it in my case.

For example, in the Clone1 folder I have the file `ParaViewFilters.xml`, how do I add my custom filters `matrix-filters.py` and `markers-filter.py` to that file?

 ![Screen Shot 2020-01-31 at 18.19.40](https://discourse.paraview.org/uploads/default/original/2X/d/dd298adb9579dc2d0d90c75071a0ac983f6847a9.png)

---

<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: [February 3, 2020, 3:11am UTC](https://discourse.paraview.org/t/add-custom-filters-to-custom-app/3476/2 "2020-02-03T03:11:57Z")

</div>

> [@majo\_vlas](#):
>
> how do I add my custom filters `matrix-filters.py` and `markers-filter.py` to that file?

You do not. These files refers only to filters already present in ParaView

Just build a Plugin and load it in your application, the same way you do it in ParaView or with the static framework I provided a link to.

---

<div class="post-metadata">

### Author: ![majo\_vlas](https://discourse.paraview.org/user_avatar/discourse.paraview.org/majo_vlas/32/2567_2.png) [@majo\_vlas](https://discourse.paraview.org/u/majo_vlas)
#### Post date: [February 4, 2020, 5:03pm UTC](https://discourse.paraview.org/t/add-custom-filters-to-custom-app/3476/3 "2020-02-04T17:03:04Z")

</div>

I guess I have problems with this because I can’t find examples that fit my needs.  
For example, in [https://kitware.github.io/paraview-docs/latest/cxx/PluginHowto.html](https://kitware.github.io/paraview-docs/latest/cxx/PluginHowto.html) there is an example with `ElevationFilters`.

But I have filters in python, so I look at another example.  
In the ParaView source code folder `Examples/Plugins` there is `PythonAlgorithm/PythonAlgorithmExamples.py`  
 ![Screen Shot 2020-02-04 at 13.49.35](https://discourse.paraview.org/uploads/default/original/2X/e/e86a78867fa283bc5294bc7f0b83d8098d797bbc.png)

Then, in `/Desktop/pv/pv-build/install/lib/paraview-5.7/plugins/`  
I created a folder and add the filter: `MarkersFilters/markers-filter.py`.

Then, I build the Clone1 ([https://gitlab.kitware.com/paraview/paraview/tree/master/Examples/CustomApplications](https://gitlab.kitware.com/paraview/paraview/tree/master/Examples/CustomApplications)) application again from

But the filter is not loaded.

Do I need to create something else? Like an XML file? Where?

Do I have to rebuild ParaView after adding the filters to the plugins folder?

Thanks!

---

<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: [February 5, 2020, 2:49am UTC](https://discourse.paraview.org/t/add-custom-filters-to-custom-app/3476/4 "2020-02-05T02:49:12Z")

</div>

you need to **Load** dynamically the plugin, **exactly the same way as in ParaView.**  
(or to use the Static link I already explained earlier)

All the info is in the link you provided earlier. Please read it thoroughly.

---

<div class="post-metadata">

### Author: ![majo\_vlas](https://discourse.paraview.org/user_avatar/discourse.paraview.org/majo_vlas/32/2567_2.png) [@majo\_vlas](https://discourse.paraview.org/u/majo_vlas)
#### Post date: [February 11, 2020, 4:01pm UTC](https://discourse.paraview.org/t/add-custom-filters-to-custom-app/3476/5 "2020-02-11T16:01:24Z")

</div>

In the end I end up creating a `plugins` folder in `/path/Clone1/build/bin/paraview_clone1.app/Contents/MacOS` and pasting the filters `markers-filter.py` and `matrix-filters.py` there.
