[vtkusers] vtkDataSetAttributes problem

Frable zemitis.janis at inbox.lv
Tue Oct 4 08:36:23 EDT 2011


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.



More information about the vtkusers mailing list