Hi Alex,

there is two ways to achieve your goal.

Solution 1:
Inside the pw-config.properties file, instead of calling the PWServer
executable right away, you can call a shell script which will call
PWServer underneath with some extra arguments such as an
initialization python script (--batch-file=/.../loadPlugins.py).
Basically that script will load your plugin.
Once that's achieved, normally when the JavaScript ask for the
ParaView available methods, you should see your plugin. And have
access to everything on the JavaScript side. (You can read that part
in the wiki here:
http://www.paraview.org/Wiki/ParaViewWeb_Manta_setting)

Solution 2:
Create a ParaViewWeb plugin, that will load the plugin and provide a
method to create an instance of your plugin filter. (like in
http://www.paraview.org/Wiki/ParaViewWeb_Plugins). Maybe the
definition of your plugin won't properly be updated in the simple
context. Therefore, you might need to use the full filter path to
create it by calling
"severmanager.ActiveConnection.Modules.filters.MyFilter()" instead of
just "simple.MyFilter()".

Seb

On Thu, Jun 14, 2012 at 3:32 AM, Alex <[email protected]> wrote:
> Hi everybody,
>     I'm really new in ParaView. I have a question about utilisation of
> ParaView's plugin in ParaViewWeb:
> - My plugin has been imported to ParaView and work with ParaView. I did a
> simple image threshold filter (1 input and 1 output,derived de
> SimpleToSimpleImageFilter) and it works as I imagined in ParaView, I
> succeeded in calling it in Python Shell as well (all the steps are
> respected, including .xml, CMakeLists, etc.)
> - Now I want to use it in ParaView. I found in "simple.py" a command
> LoadPlugin, and I use this without any problem (no error in Chrome's error
> console, nothing abnormal in log at PWService/admin). But I don't have the
> right syntax to call this plugin.
>
> => So all I want to know is how to call my filter. name MyImageThreshod. Do
> you have any idea?
> Thank you very much indeed.
>
> PS: I tried
> paraview.LoadPlugin('path/to/myPlugin.so',false);
> paraview.MyImageThreshold() => ParaView has no methode named
> MyImageThreshold
> paraview.plugins.MyImageThreshold => always the same error.
>
>
>
> _______________________________________________
> 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://www.paraview.org/mailman/listinfo/paraview
>
_______________________________________________
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://www.paraview.org/mailman/listinfo/paraview

Reply via email to