61 #ifndef vtkArrayCalculator_h
62 #define vtkArrayCalculator_h
65 #include "vtkFiltersCoreModule.h"
71 #ifndef VTK_LEGACY_REMOVE
72 #define VTK_ATTRIBUTE_MODE_DEFAULT 0
73 #define VTK_ATTRIBUTE_MODE_USE_POINT_DATA 1
74 #define VTK_ATTRIBUTE_MODE_USE_CELL_DATA 2
75 #define VTK_ATTRIBUTE_MODE_USE_VERTEX_DATA 3
76 #define VTK_ATTRIBUTE_MODE_USE_EDGE_DATA 4
92 vtkGetStringMacro(Function);
104 const char* arrayName,
int component0 = 0,
int component1 = 1,
int component2 = 2);
114 int component1 = 1,
int component2 = 2);
124 const char* variableName,
int component0 = 0,
int component1 = 1,
int component2 = 2);
135 vtkGetStringMacro(ResultArrayName);
143 vtkGetMacro(ResultArrayType,
int);
144 vtkSetMacro(ResultArrayType,
int);
165 vtkGetMacro(ResultNormals,
bool);
166 vtkSetMacro(ResultNormals,
bool);
167 vtkBooleanMacro(ResultNormals,
bool);
176 vtkGetMacro(ResultTCoords,
bool);
177 vtkSetMacro(ResultTCoords,
bool);
178 vtkBooleanMacro(ResultTCoords,
bool);
192 #ifndef VTK_LEGACY_REMOVE
215 static const int DEFAULT_ATTRIBUTE_TYPE = -1;
223 vtkSetMacro(AttributeType,
int);
224 vtkGetMacro(AttributeType,
int);
274 vtkGetMacro(NumberOfScalarArrays,
int);
275 vtkGetMacro(NumberOfVectorArrays,
int);
288 vtkSetMacro(ReplacementValue,
double);
289 vtkGetMacro(ReplacementValue,
double);
299 vtkSetMacro(IgnoreMissingArrays,
bool);
300 vtkGetMacro(IgnoreMissingArrays,
bool);
301 vtkBooleanMacro(IgnoreMissingArrays,
bool);
perform mathematical operations on data in field data arrays
void SetResultArrayName(const char *name)
Set the name of the array in which to store the result of evaluating this function.
char * GetVectorVariableName(int i)
int ProcessDataObject(vtkDataObject *input, vtkDataObject *output)
void SetAttributeModeToUseEdgeData()
char ** GetScalarArrayNames()
Methods to get information about the current variables.
void RemoveAllVariables()
Remove all the variable names and their associated array names.
void SetAttributeTypeToVertexData()
virtual void RemoveCoordinateVectorVariables()
Remove all the coordinate variables.
void SetAttributeTypeToRowData()
int ** GetSelectedVectorComponents()
char * GetScalarArrayName(int i)
void SetAttributeTypeToDefault()
void SetAttributeModeToUseCellData()
int ** SelectedVectorComponents
char ** ScalarVariableNames
void SetAttributeMode(int newMode)
Control whether the filter operates on point data or cell data.
char ** GetVectorArrayNames()
vtkTypeBool ReplaceInvalidValues
void AddScalarVariable(const char *variableName, const char *arrayName, int component=0)
Add a variable name, a corresponding array name, and which components of the array to use.
vtkTypeBool CoordinateResults
char ** VectorVariableNames
int NumberOfCoordinateScalarArrays
void SetAttributeTypeToEdgeData()
char ** CoordinateVectorVariableNames
vtkDataSet * GetDataSetOutput()
Returns the output of the filter downcast to a vtkDataSet or nullptr if the cast fails.
virtual void SetFunction(const char *function)
Set/Get the function to be evaluated.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int * SelectedCoordinateScalarComponents
int ** SelectedCoordinateVectorComponents
void AddVectorArrayName(const char *arrayName, int component0=0, int component1=1, int component2=2)
int NumberOfCoordinateVectorArrays
void AddCoordinateScalarVariable(const char *variableName, int component=0)
Add a variable name, a corresponding array name, and which components of the array to use.
int * GetSelectedVectorComponents(int i)
virtual void RemoveVectorVariables()
Remove all the scalar variable names and their associated array names.
char ** CoordinateScalarVariableNames
char * GetVectorArrayName(int i)
int * GetSelectedScalarComponents()
void SetAttributeTypeToCellData()
void SetAttributeModeToUseVertexData()
void AddVectorVariable(const char *variableName, const char *arrayName, int component0=0, int component1=1, int component2=2)
char * GetScalarVariableName(int i)
const char * GetAttributeTypeAsString()
Returns a string representation of the calculator's AttributeType.
char ** GetScalarVariableNames()
int GetAttributeTypeFromInput(vtkDataObject *input)
Get the attribute type for the input.
void AddCoordinateVectorVariable(const char *variableName, int component0=0, int component1=1, int component2=2)
vtkFunctionParser * FunctionParser
void SetAttributeModeToUsePointData()
int * SelectedScalarComponents
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
int GetSelectedScalarComponent(int i)
virtual void RemoveScalarVariables()
Remove all the scalar variable names and their associated array names.
void AddScalarArrayName(const char *arrayName, int component=0)
Add an array name to the list of arrays used in the function and specify which components of the arra...
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void SetAttributeTypeToPointData()
~vtkArrayCalculator() override
virtual void RemoveCoordinateScalarVariables()
Remove all the coordinate variables.
void SetAttributeModeToDefault()
const char * GetAttributeModeAsString()
static vtkArrayCalculator * New()
char ** GetVectorVariableNames()
general representation of visualization data
abstract class to specify dataset behavior
Parse and evaluate a mathematical expression.
a simple class to control print indentation