<div dir="ltr">You need something like:<div><br></div><div><div>    reader-&gt;ReadAllScalarsOn();</div><div>    reader-&gt;ReadAllVectorsOn();</div><div>    reader-&gt;ReadAllNormalsOn();</div><div>    reader-&gt;ReadAllTensorsOn();</div>

<div>    reader-&gt;ReadAllColorScalarsOn();</div><div>    reader-&gt;ReadAllTCoordsOn();</div><div>    reader-&gt;ReadAllFieldsOn();</div><div><br></div><div style>Translate to Python and adjust to taste.</div><div> </div>

</div><div style>-berk</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 8, 2013 at 9:37 PM, Justin Pogacnik <span dir="ltr">&lt;<a href="mailto:j.pogacnik@auckland.ac.nz" target="_blank">j.pogacnik@auckland.ac.nz</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 style="direction:ltr;font-size:10pt;font-family:Tahoma">Hi all,
<div><br>
</div>
<div>I&#39;m trying to use Python to read an unstructured grid file (vtk format) that I wrote for output from a research code. The vtk file loads fine in Paraview, so it should be in order.</div>
<div><br>
</div>
<div>The vtk file has 7 scalar arrays of point data and one vector array of point data. However, when I print the point data, only 2 arrays are found -- the first scalar array (elementID) and the last (only) vector array (permeability). </div>


<div><br>
</div>
<div>Here is the essential part of my python script:</div>
<div>
<div>from vtk import *</div>
<div><br>
</div>
<div>filename = &#39;VTKoutput/FEHM_mesh4_2.vtk&#39;</div>
<div><br>
</div>
<div>vtkgrid = vtkUnstructuredGridReader()</div>
<div>name = vtkgrid.SetFileName(filename)</div>
<div>vtkgrid.Update()</div>
<div><br>
</div>
<div>print vtkgrid.GetOutput().GetPointData()</div>
</div>
<div><br>
</div>
<div>I&#39;m happy to pass along the small test vtk file too if it&#39;d be helpful. Also, I&#39;m running vtk-5.10 on Mac OSX 10.7.5.</div>
<div><br>
</div>
<div>Thanks in advance,</div>
<div><br>
</div>
<div>Justin</div>
</div>
</div>

<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>