[vtkusers] how to check content of arrray

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Tue Jul 16 00:10:27 EDT 2002


>>>>> "CP" == Csaba Palotai <csabamdm at hotmail.com> writes:

    CP> Hi list, I'm having problems visualizing my data and dont know
    CP> whether my GFD data array is not going through to the
    CP> VTk-arrays or they are in there just not using proper commands
    CP> for visualizing. Can you help me please how can i check the
    CP> content of a VTK-array to rule one of the possibilities out?

Look at the vtkDataArray class.  There are many functions that let you
find what data values are in the array.  Under VTK 4.x you could use
something like so (Python example):

arr = vtkFloatArray()
# add elements to the array
# ...
# now print them
n = arr.GetNumberOfTuples()
for i in range(n):
    print arr.GetValue(i)


cheers,
prabhu



More information about the vtkusers mailing list