vtkFunctionParser

Section: Visualization Toolkit Common Classes

Usage

vtkFunctionParser is a class that takes in a mathematical expression as a char string, parses it, and evaluates it at the specified values of the variables in the input string.

You can use the "if" operator to create conditional expressions such as if ( test, trueresult, falseresult). These evaluate the boolean valued test expression and then evaluate either the trueresult or the falseresult expression to produce a final (scalar or vector valued) value. "test" may contain <,>,=,|,&, and () and all three subexpressions can evaluate arbitrary function operators (ln, cos, +, if, etc)

.SECTION Thanks Thomas Dunne (thomas.dunne@iwr.uni-heidelberg.de) for adding code for two-parameter-parsing and a few functions (sign, min, max).

Sid Sydoriak (sxs@lanl.gov) for adding boolean operations and conditional expressions and for fixing a variety of bugs.

To create an instance of class vtkFunctionParser, simply invoke its constructor as follows

  obj = vtkFunctionParser

Methods

The class vtkFunctionParser has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkFunctionParser class.