<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>The Wiki has some good examples of how to use vtkFloatArray:</div>
<div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/KnownLengthArray">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/KnownLengthArray</a></div>
<div>The source code documentation also has many examples of how to use it:</div>
<div><a href="http://www.vtk.org/doc/nightly/html/c2_vtk_e_2.html#c2_vtk_e_vtkFloatArray">http://www.vtk.org/doc/nightly/html/c2_vtk_e_2.html#c2_vtk_e_vtkFloatArray</a></div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>vtkusers <<a href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a>> on behalf of Abdul Abdul <<a href="mailto:abdul.sw84@gmail.com">abdul.sw84@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Sunday, July 26, 2015 at 8:24 AM<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
<span style="font-weight:bold">Subject: </span>[vtkusers] Iterating through vtkFloatArray<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Hello,<br>
<br>
I noticed that the return type of a function I'm calling is <code>vtkFloatArray</code>. I want to check the components of this array, but, not sure how to iterate through its components.
<div class="post-text" itemprop="text">
<p>Since when I tried to iterate through the elements, I got the following error:</p>
<pre style="" class="lang-cpp prettyprint prettyprinted"><code><span class="typ">TypeError</span><span class="pun">:</span><span class="pln"> </span><span class="str">'vtkobject'</span><span class="pln"> object is not iterable</span></code></pre>
<p>Why am I getting such error?</p>
<p>Thanks.</p>
</div>
</div>
</div>
</div>
</span>
</body>
</html>