No, you need to use the python programmable filter (in conjunction with numpy) to do that. Here is an example script applied after a sphere source:
inp = inputs[0] ns = inp.PointData['Normals'] output.PointData.append(ns*3, "array1") output.PointData.append(ns/2, "array2") Here ns is a numpy array (sort of). So, everything numpy supports should be available to manipulate ns. Also, if you have the source code, look at /Utilities/VTKPythonWrapping/paraview/vtk/algorithms.py for some of the algorithms already available. I did not do any performance comparisons yet but this should actually be quite faster than the calculator. I will document this fully for 3.8. Feel free to ask any questions meanwhile. -berk On Wed, Dec 2, 2009 at 5:30 AM, Fred Fred <[email protected]> wrote: > With the Python API, is it possile, in a single instance of Calculator, to > compute several new scalar or vector fields, which would involve having > several different functions associated to the newly created fields? > > > ________________________________ > Avec Internet Explorer, surfez en toute discrétion sur internet Cliquez ici > ! > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the ParaView Wiki at: > http://paraview.org/Wiki/ParaView > > Follow this link to subscribe/unsubscribe: > http://www.paraview.org/mailman/listinfo/paraview > > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
