Thank you for the informative link. <div><br></div><div>I tried running the <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/GenericDataObjectReader" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/GenericDataObjectReader</a> on my data file and it correctly </div>

<div>gave the total number of points viz. 5 points for my program. </div><div><br></div><div>However, does this code also read and store the pressure, density, position vector and velocity vectors somehwere? </div><div>If so, how do I access / print them? The vtk documentation looks quite intimidating and I am not sure of how to do this. </div>

<div><br></div><div>Here is the data file  again.</div><div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><div># vtk DataFile Version 3.0</div>
<div><div>The actual time is 0.01000000</div><div>ASCII</div><div>DATASET POLYDATA</div><div>POINTS 5 double</div><div>1.0 3.0 6.8</div><div>2.3 4.5 6.7</div><div>4.5 6.7 9.0</div><div>1.2 3.4 5.6</div><div>2.1 1.5 2.3 </div>
<div>POINT_DATA 5</div><div>SCALARS pressure double</div><div>LOOKUP_TABLE default</div><div>3.4</div><div>6.7</div><div>8.9</div><div>3.5</div><div>6.9</div><div>SCALARS density double</div><div>LOOKUP_TABLE default</div>
<div>3</div><div>4</div><div>5</div><div>6</div><div>7</div><div>VECTORS velocity double</div><div>3 4 5</div><div>6 7 8</div><div>1 2 3</div><div>6 7 8</div><div>8 9 0</div></div></span></div><div><br></div><div><br></div>
<div><br></div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">On Wed, Oct 19, 2011 at 5:31 PM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>On Wed, Oct 19, 2011 at 5:27 PM, Gaurish Telang &lt;<a href="mailto:gaurish108@gmail.com" target="_blank">gaurish108@gmail.com</a>&gt; wrote:<br>


&gt; Hi I am new to the VTK toolkit. Is there any standard VTK function/ library<br>
&gt; available to read the VTK files. The file which I want to read into my C++<br>
&gt; program looks like<br>
&gt; # vtk DataFile Version 3.0<br>
&gt; The actual time is 0.01000000<br>
&gt; ASCII<br>
&gt; DATASET POLYDATA<br>
&gt; POINTS 5 double<br>
&gt; 1.0 3.0 6.8<br>
&gt; 2.3 4.5 6.7<br>
&gt; 4.5 6.7 9.0<br>
&gt; 1.2 3.4 5.6<br>
&gt; 2.1 1.5 2.3<br>
&gt; POINT_DATA 5<br>
&gt; SCALARS pressure double<br>
&gt; LOOKUP_TABLE default<br>
&gt; 3.4<br>
&gt; 6.7<br>
&gt; 8.9<br>
&gt; 3.5<br>
&gt; 6.9<br>
&gt; SCALARS density double<br>
&gt; LOOKUP_TABLE default<br>
&gt; 3<br>
&gt; 4<br>
&gt; 5<br>
&gt; 6<br>
&gt; 7<br>
&gt; VECTORS velocity double<br>
&gt; 3 4 5<br>
&gt; 6 7 8<br>
&gt; 1 2 3<br>
&gt; 6 7 8<br>
&gt; 8 9 0<br>
&gt; I want  to read this information into the arrays<br>
&gt; xp[5], yp[5], zp[5] (the first block of numbers)<br>
&gt; pressure[5] (second block)<br>
&gt; density[5] (third block)<br>
&gt; velocity_x[5], velocity_y[5] velocity_z[5] (fourth block)<br>
<br>
</div></div>If this is a .vtk &quot;legacy&quot; file, I think you can use:<br>
<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/GenericDataObjectReader" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/GenericDataObjectReader</a><br>
<font color="#888888"><br>
David<br>
</font></blockquote></div><br></div>