[vtk-developers] Retrieving data from UnstructuredGrid
Nicholas Yue
yue.nicholas at gmail.com
Fri Jan 2 21:51:15 EST 2015
Hi,
Using the sample data from VTKData as an example
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian"
compressor="vtkZLibDataCompressor">
<UnstructuredGrid>
<Piece NumberOfPoints="22" NumberOfCells="3">
<PointData Scalars="scalars">
<DataArray type="Float32" Name="scalars" format="ascii">
1 1 1 1 0 0 0 0 0 0
1 1 1 0 0 0
1 1 1 0 0 0
</DataArray>
</PointData>
<CellData>
</CellData>
<Points>
<DataArray type="Float32" NumberOfComponents="3" format="ascii">
0 0 0
I have written initial code to load the unstructured grid file.
How should I go about extracting the PointData Scalars from the
unstructured grid ?
Eventually, my *.vtu file will have velocity (vector), density
(scalar) and other additional PointData (file will be binary due to size)
Which CXX example is helpful in understanding PointData extraction
from unstructured grid ?
Cheers
--
Nicholas Yue
Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
http://au.linkedin.com/in/nicholasyue
https://vimeo.com/channels/naiadtools
More information about the vtk-developers
mailing list