[Paraview] Calling a customized xml plugin from python

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Sep 3 08:22:12 EDT 2014


I believe you should be accessing it as :
   >> myfilter()

And not servermanager.myfilter.

On Wed, Sep 3, 2014 at 8:06 AM,  <livia.barazzetti at istb.unibe.ch> wrote:
> Hi,
>
>
>
> I have saved a paraview state in python format. In the pipeline there are a
> couple of filters coming from an xml plugin (generated in this way
> http://www.kitware.com/blog/home/post/534 ). When I try to run the the
> script in the python shell  (with the plugin already loaded from the gui
> menu), I get the error “'module' object has no attribute 'myfilter'” .
>
> I have tried also the following commands:
>
>
>
>>>LoadPlugin(“path/to/myfilter.xml”,globals())
>
>>>servermanager.myfilter
>
> But still I am not able to access it.
>
> If it can help, when I load the pipeline from a pvsm file, the filter is
> correctly loaded.
>
> If I select it and call GetActiveSource, I get: <paraview.servermanager.
> myfilter object at 0x0000000015B40A20>
>
>
>
> What should be the correct command for calling it?
>
> Thank you
>
>
>
> Livia Barazzetti
> Ph.D. Student - Medical Image Analysis
> Institute for Surgical Technology and Biomechanics
> University of Bern
> Stauffacherstrasse 78
> CH-3014 Bern
> Tel +41 31 631 59 48
> http://www.istb.unibe.ch
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>


More information about the ParaView mailing list