[vtkusers] Reading from a VTK file

Gaurish Telang gaurish108 at gmail.com
Wed Oct 19 17:27:02 EDT 2011


Hi I am new to the VTK toolkit. Is there any standard VTK function/ library
available to read the VTK files. The file which I want to read into my C++
program looks like

# vtk DataFile Version 3.0
The actual time is 0.01000000
ASCII
DATASET POLYDATA
POINTS 5 double
1.0 3.0 6.8
2.3 4.5 6.7
4.5 6.7 9.0
1.2 3.4 5.6
2.1 1.5 2.3
POINT_DATA 5
SCALARS pressure double
LOOKUP_TABLE default
3.4
6.7
8.9
3.5
6.9
SCALARS density double
LOOKUP_TABLE default
3
4
5
6
7
VECTORS velocity double
3 4 5
6 7 8
1 2 3
6 7 8
8 9 0

I want  to read this information into the arrays

xp[5], yp[5], zp[5] (the first block of numbers)

pressure[5] (second block)

density[5] (third block)

velocity_x[5], velocity_y[5] velocity_z[5] (fourth block)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111019/98ba5f40/attachment.htm>


More information about the vtkusers mailing list