VTK Function parser does not function for min, max or sign
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Applying min, max or sign in vtkArrayCalulator causes error of type 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 have done a little bit of investigation and find that the GetMathFunctionStringLength()-function in vtkFunctionParser.cxx does not include case VTK_PARSER_MAX: case VTK_PARSER_MIN: or case VTK_PARSER_SIGN:
the return to the min or max or sign function is then zero which causes the parser to complain about parenthesis. Just adding the cases does not completely help however. I can then do min(1,2), but not min(abs(-1),2), since the parenthesis count gets messed up.