<div dir="ltr">input.GetPointData().GetArray("Colors")<div><br><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>

Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div>
<br><br><div class="gmail_quote">On Fri, May 16, 2014 at 3:46 PM, Su, Simon M CTR USARMY ARL (US) <span dir="ltr"><<a href="mailto:simon.m.su.ctr@mail.mil" target="_blank">simon.m.su.ctr@mail.mil</a>></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-family:Tahoma;color:#000000;font-size:10pt">Hello,<br>
<br>
After staring at <a href="http://www.paraview.org/Wiki/Python_Programmable_Filter" target="_blank">
http://www.paraview.org/Wiki/Python_Programmable_Filter</a> for a while, the way to access the data for a specific variable name still eludes me. This is the python code from the wiki on Add the Colors variable to a PolyData<br>


<br>
=============================<br>
<div dir="ltr" style="text-align:left">
<div>
<pre><span>input</span> = <span>self</span>.<span>GetPolyDataInput</span><span>(</span><span>)</span><span>;</span>
output =  <span>self</span>.<span>GetPolyDataOutput</span><span>(</span><span>)</span><span>;</span>
 
colors = vtk.<span>vtkUnsignedCharArray</span><span>(</span><span>)</span><span>;</span>
colors.<span>SetNumberOfComponents</span><span>(</span><span>3</span><span>)</span><span>;</span>
colors.<span>SetName</span><span>(</span><span>"Colors"</span><span>)</span><span>;</span>
 
numPoints = <span>input</span>.<span>GetNumberOfPoints</span><span>(</span><span>)</span>
<span>for</span> i <span>in</span> <span>range</span><span>(</span><span>0</span>, numPoints<span>)</span>:
    colors.<span>InsertNextTuple3</span><span>(</span><span>255</span>,<span>0</span>,<span>0</span><span>)</span><span>;</span>
 
output=<span>input</span>
output.<span>GetPointData</span><span>(</span><span>)</span>.<span>AddArray</span><span>(</span>colors<span>)</span></pre>
</div>
</div>
===============================<br>
<br>
How do I from the next filter, access the variable name "Colors" that I created? <br>
<br>
Any help is much appreciated. <br>
<br>
thanks<span class="HOEnZb"><font color="#888888"><br>
-simon<br>
</font></span></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 ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>