[vtk-developers] selecting arrays

Amy Henderson amy.henderson at kitware.com
Tue Nov 6 16:39:33 EST 2001


Hi everyone,

We are proposing a change to filters in VTK that operate on scalars, 
vectors, etc.  Currently, to change which array a filter operates on, you 
have to put a vtkAssignAttribute or a vtkFieldDataToAttributeFilter before 
that filter in the pipeline.  It would be convenient if this functionality 
could be added to the filters instead.  For example, if you wanted to 
contour by an array called "temperature" instead of the currently active 
scalars, you would be able to say contour->SelectInputScalars("temperature").

We propose adding this on a filter-by-filter basis.  The method names would 
be SelectInputScalars, SelectInputVectors, SelectInputNormals, etc.  By 
default the filters would operate as they do now, but if one of these 
methods were set, that array would be used instead.  With this approach, 
unless we change all the filters that specifically operate on attribute 
data, we have the issue of having multiple ways to achieve this result.

We thought about doing this in a superclass instead, but then you end up 
with filters having methods that don't do anything.  (For example, 
vtkContourFilter::SelectInputTensors.)

We're still in the brainstorming stage on this, so I would appreciate your 
input.

- Amy




More information about the vtk-developers mailing list