[Paraview] XML plugin based on programmable filter with a slider

Alessandro De Maio demaio.a at gmail.com
Thu Mar 22 09:59:49 EDT 2018


Hello  Shuhao,
   thank you for your reply and for your really great job on the
pvpyfilter. I had already tried it and it's very useful.
But I'm looking for the possibility to automatically assign the slider
range (in this case the upper value will be enough) depending on
information about the input of the programmable filter (in this case the
number of blocks of a multiblock dataset) and not to set it hardcoded in
the xml as from your approach. I would like that, if I apply this filter to
a mbdataset with 5 blocks, the slider can choose an int value from 0 to 4,
and if I apply the same filter (without modifying xml) to another mbdataset
with 8 blocks the slider provides an int from 0 to 7.

Cheers

Alessandro

PS With pvpyfilter is there the possibility of decide in the .py file the
order of the widgets in the property panel? It seems to me that the order
is random

On Thu, Mar 22, 2018 at 12:39 AM, Shuhao Wu <shuhao at shuhaowu.com> wrote:

> Accidentally hit Reply instead of hit Reply list. The record is below:
>
> -------- Forwarded Message --------
> Subject: Re: [Paraview] XML plugin based on programmable filter with a
> slider
> Date: Wed, 21 Mar 2018 19:38:40 -0400
> From: Shuhao Wu <shuhao at shuhaowu.com>
> To: Alessandro De Maio <demaio.a at gmail.com>
>
> Hello Alessandro,
>
> I just published a library that allows you to do _just this_. See:
> https://github.com/shuhaowu/pvpyfilter
>
> The example covers exactly this and specifically you can use the property:
>
> double_slider = Double("double with slider", default=0.5, slider=[0.0,
> 1.0], help="double with slider between 0.0 and 1.0 and a default of 0.5")
>
> Let me know if the library works for you or if you encounter any bug as it
> is still early days for this library.
>
> Cheers,
> Shuhao
>
> On 2018-03-21 01:37 PM, Alessandro De Maio wrote:
> > Hello,
> > I'm trying to write a plugin based on a programmable filter in order to
> > extract a single block from a multiblockdataset (with a single level
> tree)
> > in input chosing it through a slider in the property panel.
> > I need help to automatically set the range of the slider (the higher
> limit
> > as the lower is always 0) as the number of blocks of the
> multiblockdataset
> > in input, but the XML ServerManager definition of the slider is not clear
> > enough for me.
> >
> > I'm trying to follow Utkarsh suggestion in
> >
> > https://public.kitware.com/pipermail/paraview/2009-March/011599.html
> >
> > but I'm missing how to recovery the number of blocks of the input of the
> > programmable filter and how to set it as the upper value of the slider
> > range.
> >
> > Thank you in advance for your kind help
> >
> > Alessandro
> >
> >
> >
> > _______________________________________________
> > 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
> >
> > Search the list archives at: http://markmail.org/search/?q=ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > https://public.kitware.com/mailman/listinfo/paraview
> >
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180322/14308b3a/attachment.html>


More information about the ParaView mailing list