I used python-vtk a while ago. So I am trying to help you using my dim memory. <br><br>What's the data type of distanceArray? I think it should be a python List. If that's the case, you don'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"><<a href="mailto:benjamin-berkowitz@uiowa.edu">benjamin-berkowitz@uiowa.edu</a>></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't have to be with Python<br>
syntax (but it would be helpful). Â This is what I have so far, and it's not<br>
working:<br>
<br>
  distanceMapper.Surface.GetPointData().SetActiveScalars('Scalars_')<br>
  distanceArray = distanceMapper.Surface.GetPointData().GetScalars()<br>
<br>
  #print 'DISTANCE SURFACE:',  distanceMapper.Surface<br>
<br>
  print 'DISTANCE ARRAY:',  distanceArray<br>
  tuple = []<br>
  tuple = distanceArray.GetTuple(0)<br>
  print tuple<br>
<br>
and GetTuple() doesn't work. Â It returns an error, "Traceback (most recent<br>
call last):<br>
 File "VTK_testing.py", line 80, in <module><br>
  tuple = distanceArray.GetTuple(0)<br>
AttributeError: GetTuple"<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>