[vtkusers] Retrieve data within a polydata file
Tanweer Rashid
trash001 at odu.edu
Fri Apr 11 11:28:56 EDT 2014
Hi,
I have a vtkPolyData file that has some meta-information in the form of
fielddata/celldata. My file looks as follows, after POINTS and POLYGONS:
...
CELL_DATA 1024
SCALARS data_name1 int 1
LOOKUP_TABLE data_name1_table
5
5
5
5
...
SCALARS data_name2 int 2
LOOKUP_TABLE data_name2_table
0 2
0 2
0 2
0 2
...
The code
vtkSmartPointer<vtkCellData> cellData =
polydata->GetCellData()->GetArray(0);
only retrieves the first table, i.e. data_name1.
The code
cellData->GetNumberOfArrays();
returns a value of 1.
How would I go about retrieving the information in the second table? The
file can be read into paraview without any problems, and paraview's
information tab lists both tables under Data Arrays.
Thanks,
--
Tanweer Rashid
MSVE Dept.
Old Dominion University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140411/05035ef2/attachment.html>
More information about the vtkusers
mailing list