[Paraview] ParaViewWeb, vtk filters python description

Sebastien Jourdain sebastien.jourdain at kitware.com
Mon Jun 25 18:03:47 EDT 2012


If you managed to load your plugin (the C++ ParaView one) at startup,
then you will be able to use your filter as any other filter in
ParaViewWeb without using any ParaViewWeb plugin. Otherwise, the
python file that you are missing is in fact an XML file that list the
properties for each filters and sources inside ParaView.

PARAVIEW_src/ParaViewCore/ServerImplementation/resources/filter.xml

The labels without space are used as filter name and properties for
creating and controlling those filters...

Otherwise inside your ParaViewWeb plugin, you can provide a dictionary
as argument and just loop through its entry and set them in python.

Seb

On Mon, Jun 25, 2012 at 5:47 PM, Alex <tuanha_it0306 at yahoo.com> wrote:
> Hi seb, thank you for your quick reply.
> I found that I can use vtk Filter like Threshold, Clip, etc. in ParaViewWeb
> by enter the arguments like I cited in my email. Like threshold =
> paraview.Threshold({Input:proxy,ThresholdRange:[300,600]}).
> So I think there are perhaps some files like pwsimple.py that describe how
> can ParaViewWeb can use a Plugin. I search for all the .py file in ParaView
> and I can't find something like that.
> I did succeed in doing a ParaViewWeb plugin.
> I used your advice to define something as following :
> def SimpleImageThreshold(proxy)
>
> servermanager.Activeconnection.Modules.filter.SimpleImageThreshold(proxy)
>
> Now if I want my plugin to take ThresholdRange=[300,600] as input like the
> original Threshold of ParaView, is that possible?
> If yes, how can we define this?
> Thank you very much indeed
>
>
>
> ________________________________
> From: Sebastien Jourdain <sebastien.jourdain at kitware.com>
> To: Alex <tuanha_it0306 at yahoo.com>
> Cc: "paraview at paraview.org" <paraview at paraview.org>
> Sent: Monday, June 25, 2012 11:08 PM
> Subject: Re: [Paraview] ParaViewWeb, vtk filters python description
>
> I'm not sure I understand what you mean by "Where is the python file
> which describes the way of using vtk Filters in ParaViewWeb?"
>
> The one that is imported by default is the pwsimple.py which is an
> extension of the simple.py of regular ParaView.
>
> But having said that, you can't easily mix VTK filter and ParaView
> proxy together, unless you just want to do some data processing
> without rendering.
> But as I remember, you did a ParaView plugin for that, so normally,
> once loaded you should be able to use it.
>
> Did you try to load that plugin at startup with the extra argument of
> PWServer ?
>
> Seb
>
> On Mon, Jun 25, 2012 at 4:25 PM, Alex <tuanha_it0306 at yahoo.com> wrote:
>> Hi everybody,
>>    Well, I found that using vtk Filter (Threshold, Clip, etc.) is simple
>> within ParaViewWeb, we have a list of filters so that we can use the
>> filters
>> @ http://paraview.org/Wiki/ParaView/Users_Guide/List_of_filters
>>    We can use "threshold =
>> paraview.Threshold({Input:proxy,ThresholdRange:[300,600]})" to applicate a
>> threshold between 300 and 600 for an image.
>>    So, my question is : where can I find the python script .py which
>> describes the way of using vtk Filters in ParaViewWeb?
>>
>>    If there isn't any file python script like that, how can we define a
>> function that take in value as described above? How can we tell the
>> ParaViewWeb to take in different type of variable?
>>    I mean : def ImageThreshold(proxy,ThresholdRange......) or something
>> like
>> that?
>>
>>    Thank you very much for your reply.
>>    Good day everybody :)
>>
>>
>> _______________________________________________
>> 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
>>
>
>


More information about the ParaView mailing list