[Paraview-developers] information_only property question

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Sep 16 21:24:09 EDT 2016


All is really done in the SIProperty and its subclasses. The helpers
are deprecated, we have code in [1] the XML helpers are converted to
corresponding SIProperty subclass (i.e adds the  si_class="..."
attribute instead).

To add support for new style of "fetching", subclass the
vtkSIStringVectorProperty and provide a custom implementation for the
Pull() method.


[1] https://gitlab.kitware.com/paraview/paraview/blob/master/ParaViewCore/ServerImplementation/Core/vtkSIProxyDefinitionManager.cxx#L1251-1311

On Mon, Sep 12, 2016 at 6:13 AM, Mathieu Westphal
<mathieu.westphal at kitware.com> wrote:
> Hi all
>
> I have a VTK Filter for wich I am creating a specific panel widget.
>
> In order to dynamically generate the widget i need some information, which
> only the filter can provide to me.
>
> the ideal format for the data is somethink like :
>  std::vector<std::pair<std::string, int> >
>
> I need to recover all these data via an information only property, but
> ican't figure out who i'm suposed to do that, and what should be the
> signature vtk side.
>
> So far the best way to do it that i've found would be something like this :
>
>
>       <StringVectorProperty command="GetAllArrayNames"
>                             information_only="1"
>                             name="ArrayNames">
>         <StringArrayHelper />
>       </StringVectorProperty>
>       <IntVectorProperty command="GetAllArrayComps"
>                          information_only="1"
>                          name="ArrayComps">
>         <SimpleIntInformationHelper />
>       </IntVectorProperty>
>
> with the following api :
>
> vtkIntArray MyVTKFilter::GetAllArrayComps();
> vtkStringArray MyVTKFilter::GetAllArrayNames();
>
> Is this the best way to handle it ? What it the uses for
> SimpleIntInformationHelper/StringArrayHelper. I looked at the code but i'm
> unsure of the effect of this.
>
> Regards,
>
> Mathieu Westphal
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at:
> http://markmail.org/search/?q=Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview-developers
>


More information about the Paraview-developers mailing list