Re: [Paraview] Sum values of scalar vector

2012-11-29 Thread Scott Ripplinger
Christian, Thanks for getting me started. And sorry it took me so long to respond. I've been moving pretty slow on this project. Anyway, I've done the following with my script: import math input = self.GetInputDataObject(0,0) output = self.GetOutputDataObject(0) numPoints = input.GetNumberO

Re: [Paraview] Sum values of scalar vector

2012-11-03 Thread Christian Richter
Hi, in a programmable Filter do something like this: import math input = self.GetInputDataObject(0, 0) output = self.GetOutputDataObject(0) COUNT=input.GetNumberOfPoints() pd=input.GetPointData() m=0 v=0 for i in xrange(COUNT): r=pd.GetArray('radius').GetValue(i) v=v+((4.0/3.0)*math.

[Paraview] Sum values of scalar vector

2012-11-02 Thread Scott Ripplinger
I need to sum all the values in a vector of a scalar property. I've struggled understanding the documentation for the python calculator and programmable filter, mainly in how to access the point data that I want to use. Any tips will be appreciated. ___