[vtkusers] vtkDataSetAttributes problem

David E DeMarle dave.demarle at kitware.com
Tue Oct 4 09:21:28 EDT 2011


The confusion stems from the difference between a scalar array (which
usually means any 1-component array) and "the active scalar" array
(which means the one scalar array that is flagged as being special).
Many places in VTK consider just the one array that is flagged as
being the active, others will consider any array that you designate.

The same goes for the "active" vector, tensor, texture coordinate etc arrays.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909



On Tue, Oct 4, 2011 at 8:36 AM, Frable <zemitis.janis at inbox.lv> wrote:
> Hey there,
>
> I'm having trouble with the vtkDataSetAttributes class and somehow the
> Documentation only adds to the confusion.
> If we take a look at this function:
>
>
> "---
> *int vtkDataSetAttributes::IsArrayAnAttribute   (int idx)   *
> Determine whether a data array of index idx is considered a data set
> attribute (i.e., scalar, vector, tensor, etc).Return less-than zero if it
> is, otherwise an index / 0<=idx<NUM_ATTRIBUTES to indicate which attribute.
> ---"
>
>
> I am having a hard time to understand in what cases it will return a -1 to
> me. What I could think of,tough it's still a bit weird,is if the index of
> the array matches the attributetype, however it was not the case.
> Can anyone please clarify this?
>
> On the other hand is there a better function, a more elegant way to
> determine what Type my attribute array is?
> I am reading in a VTK Legacy format file, and need to be able to separate
> the different Scalar,Vector,Tensor fields so the user can pick the one to be
> visualized.
>
> Frable
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/vtkDataSetAttributes-problem-tp4868353p4868353.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list