[vtkusers] min, max sign vtkArrayCalculator-Problems!

Rasmus Hemph rasmus.hemph at chalmers.se
Sat Jul 8 13:14:39 EDT 2006


Hi!
I am struggling with the vtkArrayCalculator function. It works like 
expected for the regular mathematical expressions as plus, minus or mag, 
but when I try to apply min, max or sign I get error messages as follows.

In the (example) code

calc = vtkArrayCalculator()
calc.SetInputConnection(preader.GetOutputPort())
calc.SetAttributeModeToUsePointData()
calc.AddVectorArrayName("fColl",0,1,2)


calc.SetFunction('fColl*min(1,2)')
calc.Update()

Warning: In /home/local/src/VTK/Common/vtkFunctionParser.cxx, line 1723
vtkFunctionParser (0x865cea0): Unknown math function

ERROR: In /home/local/src/VTK/Common/vtkFunctionParser.cxx, line 1257
vtkFunctionParser (0x865cea0): Syntax error: input to math function not 
in parentheses; see position 6


I am using vtk 5.0 and the python interface to vtk.
Any ideas?

//Rasmus




More information about the vtkusers mailing list