[Paraview] Accessing a specific variable in Python Programmable Filter
Su, Simon M CTR USARMY ARL (US)
simon.m.su.ctr at mail.mil
Fri May 16 15:46:42 EDT 2014
Hello,
After staring at http://www.paraview.org/Wiki/Python_Programmable_Filter 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
=============================
input = self.GetPolyDataInput();
output = self.GetPolyDataOutput();
colors = vtk.vtkUnsignedCharArray();
colors.SetNumberOfComponents(3);
colors.SetName("Colors");
numPoints = input.GetNumberOfPoints()
for i in range(0, numPoints):
colors.InsertNextTuple3(255,0,0);
output=input
output.GetPointData().AddArray(colors)
===============================
How do I from the next filter, access the variable name "Colors" that I created?
Any help is much appreciated.
thanks
-simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20140516/76199356/attachment.html>
More information about the ParaView
mailing list