[Paraview] [EXTERNAL] Geometric center of Dataset
Favre Jean
jfavre at cscs.ch
Fri Mar 29 03:52:21 EDT 2013
If you are looking for the Centroid of the dataset, then I would propose 3 lines of python in a Programmable Filter, using numpy's mean. Cut and paste in the script section of a PF:
from paraview.vtk.dataset_adapter import numpyTovtkDataArray
coords = inputs[0].Points
print mean(coords)
see page 85 of the ParaViewManual for other examples
http://www.paraview.org/files/v3.98/ParaViewManual.v3.98.pdf
-----------------
Jean
CSCS
More information about the ParaView
mailing list