I used python-vtk a while ago. So I am trying to help you using my dim memory. <br><br>What&#39;s the data type of distanceArray?  I think it should be a python List. If that&#39;s the case, you don&#39;t need GetTuple. <br>

<br>If you simple need to access data in VTK files, you can use pyvtk, which is simpler. <a href="http://code.google.com/p/pyvtk/">http://code.google.com/p/pyvtk/</a><br><br clear="all">Cheers, Forrest<br><br><div class="gmail_quote">

On Wed, Feb 15, 2012 at 10:38 AM, bberkowi <span dir="ltr">&lt;<a href="mailto:benjamin-berkowitz@uiowa.edu">benjamin-berkowitz@uiowa.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

OK, so if anyone can just help in general, it doesn&#39;t have to be with Python<br>
syntax (but it would be helpful). Â This is what I have so far, and it&#39;s not<br>
working:<br>
<br>
 Â  Â distanceMapper.Surface.GetPointData().SetActiveScalars(&#39;Scalars_&#39;)<br>
 Â  Â distanceArray = distanceMapper.Surface.GetPointData().GetScalars()<br>
<br>
 Â  Â #print &#39;DISTANCE SURFACE:&#39;, Â distanceMapper.Surface<br>
<br>
 Â  Â print &#39;DISTANCE ARRAY:&#39;, Â distanceArray<br>
 Â  Â tuple = []<br>
 Â  Â tuple = distanceArray.GetTuple(0)<br>
 Â  Â print tuple<br>
<br>
and GetTuple() doesn&#39;t work. Â It returns an error, &quot;Traceback (most recent<br>
call last):<br>
 Â File &quot;VTK_testing.py&quot;, line 80, in &lt;module&gt;<br>
 Â  Â tuple = distanceArray.GetTuple(0)<br>
AttributeError: GetTuple&quot;<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Accessing-vtkPolyData-scalars-with-Python-tp5470807p5486620.html" target="_blank">http://vtk.1045678.n5.nabble.com/Accessing-vtkPolyData-scalars-with-Python-tp5470807p5486620.html</a><br>


Sent from the VTK - Users mailing list archive at Nabble.com.<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>
</font></blockquote></div><br>