[Paraview] List to select zones in object panel for a custom reader

burlen burlen.loring at gmail.com
Wed Sep 1 12:25:05 EDT 2010


You don't necessarily need to do a lot of heavy coding.

One simple way to transfer variable length data such as the list of 
selected zone ids from client to server is via a string vector property. 
On the client side you will need a custom panel that handles 
serialization of the list of zones into the string vector property. On 
the server side parse the string during request data phase. A format like:

"nZoneIds Zone1Id Zone2Id ... ZoneNId".

Would do the trick, and would be compatible with PV state.

Burlen

Paul Edwards wrote:
> Hi,
>
> I have a reader and would like to have a list box in the object panel 
> to select which zones to read in from the file.  The number of zones 
> can change depending on the file.  Does anyone have any suggestions 
> for how to do this?  My ideas were:
>
>     * add a new vtkSM*Domain
>           o I don't think this is possible in a plugin because
>             pqSMAdaptor needs to be updated for any new class (is that
>             right?)
>     * create a custom panel and have one information only property to
>       get the number of zones and another property to set the zones
>           o would the set property need to be a string that I put
>             comma-separated zone indexes or is there a way to change
>             the number of elements in an integer vector?
>
> Thanks in advance,
> Paul
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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