[vtk-developers] Filters and active attributes

Mathieu Westphal mathieu.westphal at kitware.com
Tue Jul 10 21:57:37 EDT 2018


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtk-developers/attachments/20180711/21b54da2/attachment.html>


More information about the vtk-developers mailing list