[Paraview-developers] Filtered choice of attributes

Cornelis Bockemühl cornelis.bockemuehl at gmail.com
Fri Nov 18 10:26:26 EST 2016


Thanks for this! And not the least also for the quick reaction you are
showing to so many questions here!!

But how do I integrate such a subclass into Paraview so that it replaces
the original class: Do I have to recompile Paraview for this (ok, can be
done - did it already...) or is there a way to "insert" this code like with
the plugins?

Kind regards, Cornelis


2016-11-18 16:23 GMT+01:00 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>:

> There isn't a prebuilt way, but you can subclass vtkSMArrayListDomain and
> override vtkSMArrayListDomain::IsFilteredArray() to filter out arrays you
> don't want and use that domain for your property.
>
> On Fri, Nov 18, 2016 at 4:20 AM, Cornelis Bockemühl <
> cornelis.bockemuehl at gmail.com> wrote:
>
>> With this in the server manager xml it is possible to have the user
>> select one of the available attributes in the input data:
>>
>> <StringVectorProperty command="SetMyAttribute"
>> label="Select an attribute"
>>                       name="MyTonnage"
>>                       number_of_elements="1"
>>                       panel_visibility="default">
>>   <ArrayListDomain name="array_list">
>>     <RequiredProperties>
>>       <Property function="Input"
>>                 name="Input" />
>>     </RequiredProperties>
>>   </ArrayListDomain>
>>   <Documentation>
>>     Whatever...
>>   </Documentation>
>> </StringVectorProperty>
>>
>> I have now a case where it would be desirable to constrain the selection
>> to some of the attributes only, like with a filter function (best part of
>> the C++ code of the plugin) that selects only some of the attributes based
>> on their name.
>>
>> Is there any way how to achieve this?
>>
>> Thanks for any helpful hints!
>>
>> --
>> Cornelis Bockemühl
>> Basel, Schweiz
>>
>> _______________________________________________
>> 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
>>
>>
>


-- 
Cornelis Bockemühl
Basel, Schweiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20161118/2da01e17/attachment.html>


More information about the Paraview-developers mailing list