[vtk-developers] Filters and active attributes

Patrick Bergeron pbergeron at spiria.com
Sun Jul 15 15:54:18 EDT 2018


Ok. 

Sent from my iPhone

> On Jul 15, 2018, at 15:38, Utkarsh Ayachit <utkarsh.ayachit at kitware.com> wrote:
> 
> Patrick,
> 
> Consider this, even now, if you have a long chain of filters and the
> first source added M arrays, all M, except may be an active attribute
> or two, will get propagated through to the output.
>> On Sun, Jul 15, 2018 at 2:56 PM Patrick Bergeron <pbergeron at spiria.com> wrote:
>> 
>> Please forgive my newbiness, but what happens when you have a long chain of filters?
>> 
>> Will the output have 25 Unused arrays?
>> 
>> Sent from my iPhone
>> 
>>> On Jul 15, 2018, at 09:57, Utkarsh Ayachit <utkarsh.ayachit at kitware.com> wrote:
>>> 
>>> Thanks folks! Since there seem to be no objections to the proposal
>>> (b), I'll create an MR in the near future and see if that exposes any
>>> legitimate reasons for the original implementation (a).
>>> 
>>> Utkarsh
>>> 
>>>> On Wed, Jul 11, 2018 at 3:16 PM Cory Quammen <cory.quammen at kitware.com> wrote:
>>>> 
>>>> +1 for (b) as well. There is no reason an array should disappear simply because it was marked as active in the input. I remember being stunned when first encountering this behavior and have had to work around it. I don't foresee any backwards compatibility issues with changing the behavior since arrays will be added to the output and will likely be ignored.
>>>> 
>>>> Cory
>>>> 
>>>>> On Tue, Jul 10, 2018 at 9:58 PM Mathieu Westphal <mathieu.westphal at kitware.com> wrote:
>>>>> 
>>>>> My vote is definitelly (b), but I may be influenced by the fact I'm working on VTK mostly trough ParaView where this kind of behavior is most of the time not expected.
>>>>> 
>>>>> Mathieu Westphal
>>>>> 
>>>>>> On Tue, Jul 10, 2018 at 4:08 PM, Utkarsh Ayachit <utkarsh.ayachit at kitware.com> wrote:
>>>>>> 
>>>>>> Folks,
>>>>>> 
>>>>>> I have a philosophical question. Suppose I am writing a filter that
>>>>>> takes in an input dataset and generates a new vector field for the
>>>>>> input. Such a filter will do something like the following in its
>>>>>> RequestData:
>>>>>> 
>>>>>> output->ShallowCopy(input);
>>>>>> output->GetPointData()->SetVectors(newVectors);
>>>>>> 
>>>>>> Now the question is this: if the input had an active vectors array
>>>>>> set, what should the output look like? Should it (a) drop the input
>>>>>> vectors array entirely or should it (b) pass the input vectors array,
>>>>>> just not flag it as active vectors and instead mark my "newVectors" as
>>>>>> the active vectors.
>>>>>> 
>>>>>> My vote is (b), currently most filters do (a). The curious side effect
>>>>>> of A is that if I apply a filter like vtkGlyph3D to a dataset, the
>>>>>> output will have arrays passed on from the input based on whether or
>>>>>> not they were marked as active attributes on the input!
>>>>>> 
>>>>>> The change to fix this is quite non-intrusive. We simply change the
>>>>>> behavior of SetAttribute/SetVector etc. in vtkDataSetAttributes.
>>>>>> 
>>>>>> Thanks in advance
>>>>>> 
>>>>>> Utkarsh
>>>>>> _______________________________________________
>>>>>> 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=vtk-developers
>>>>>> 
>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>> https://public.kitware.com/mailman/listinfo/vtk-developers
>>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> 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=vtk-developers
>>>>> 
>>>>> Follow this link to subscribe/unsubscribe:
>>>>> https://public.kitware.com/mailman/listinfo/vtk-developers
>>>>> 
>>>> 
>>>> 
>>>> --
>>>> Cory Quammen
>>>> Staff R&D Engineer
>>>> Kitware, Inc.
>>> _______________________________________________
>>> 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=vtk-developers
>>> 
>>> Follow this link to subscribe/unsubscribe:
>>> https://public.kitware.com/mailman/listinfo/vtk-developers
>>> 


More information about the vtk-developers mailing list