Go to the documentation of this file.
67 #ifndef vtkArrayCalculator_h
68 #define vtkArrayCalculator_h
71 #include "vtkFiltersCoreModule.h"
77 #ifndef VTK_LEGACY_REMOVE
78 #define VTK_ATTRIBUTE_MODE_DEFAULT 0
79 #define VTK_ATTRIBUTE_MODE_USE_POINT_DATA 1
80 #define VTK_ATTRIBUTE_MODE_USE_CELL_DATA 2
81 #define VTK_ATTRIBUTE_MODE_USE_VERTEX_DATA 3
82 #define VTK_ATTRIBUTE_MODE_USE_EDGE_DATA 4
98 vtkGetStringMacro(Function);
110 int component1 = 1,
int component2 = 2);
121 int component0 = 0,
int component1 = 1,
133 int component0 = 0,
int component1 = 1,
145 vtkGetStringMacro(ResultArrayName);
153 vtkGetMacro(ResultArrayType,
int);
154 vtkSetMacro(ResultArrayType,
int);
175 vtkGetMacro(ResultNormals,
bool);
176 vtkSetMacro(ResultNormals,
bool);
177 vtkBooleanMacro(ResultNormals,
bool);
186 vtkGetMacro(ResultTCoords,
bool);
187 vtkSetMacro(ResultTCoords,
bool);
188 vtkBooleanMacro(ResultTCoords,
bool);
202 #ifndef VTK_LEGACY_REMOVE
206 {this->SetAttributeType(DEFAULT_ATTRIBUTE_TYPE);};
224 static const int DEFAULT_ATTRIBUTE_TYPE = -1;
232 vtkSetMacro(AttributeType,
int);
233 vtkGetMacro(AttributeType,
int);
235 {this->SetAttributeType(DEFAULT_ATTRIBUTE_TYPE);}
289 vtkGetMacro(NumberOfScalarArrays,
int);
290 vtkGetMacro(NumberOfVectorArrays,
int);
303 vtkSetMacro(ReplacementValue,
double);
304 vtkGetMacro(ReplacementValue,
double);
void SetAttributeTypeToDefault()
static vtkArrayCalculator * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
perform mathematical operations on data in field data arrays
vtkTypeBool ReplaceInvalidValues
void SetAttributeModeToDefault()
void AddVectorVariable(const char *variableName, const char *arrayName, int component0=0, int component1=1, int component2=2)
void SetAttributeModeToUseEdgeData()
void SetAttributeTypeToEdgeData()
vtkTypeBool CoordinateResults
int NumberOfCoordinateVectorArrays
char ** GetVectorVariableNames()
vtkDataSet * GetDataSetOutput()
Returns the output of the filter downcast to a vtkDataSet or nullptr if the cast fails.
int * SelectedCoordinateScalarComponents
int * GetSelectedVectorComponents(int i)
char ** GetScalarArrayNames()
Methods to get information about the current variables.
const char * GetAttributeModeAsString()
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...
char ** ScalarVariableNames
void SetAttributeModeToUseCellData()
char ** GetScalarVariableNames()
virtual void RemoveScalarVariables()
Remove all the scalar variable names and their associated array names.
void SetAttributeModeToUseVertexData()
virtual void RemoveVectorVariables()
Remove all the scalar variable names and their associated array names.
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.
int NumberOfCoordinateScalarArrays
char ** VectorVariableNames
int * GetSelectedScalarComponents()
char * GetVectorArrayName(int i)
virtual void RemoveCoordinateScalarVariables()
Remove all the coordinate variables.
void SetAttributeTypeToRowData()
char ** CoordinateVectorVariableNames
a simple class to control print indentation
void SetAttributeTypeToCellData()
~vtkArrayCalculator() override
void AddVectorArrayName(const char *arrayName, int component0=0, int component1=1, int component2=2)
char ** GetVectorArrayNames()
int GetSelectedScalarComponent(int i)
char * GetVectorVariableName(int i)
void AddCoordinateVectorVariable(const char *variableName, int component0=0, int component1=1, int component2=2)
char * GetScalarArrayName(int i)
void SetAttributeMode(int newMode)
Control whether the filter operates on point data or cell data.
abstract class to specify dataset behavior
void SetAttributeTypeToVertexData()
const char * GetAttributeTypeAsString()
Returns a string representation of the calculator's AttributeType.
virtual void RemoveCoordinateVectorVariables()
Remove all the coordinate variables.
int ** SelectedVectorComponents
int ** GetSelectedVectorComponents()
virtual void SetFunction(const char *function)
Set/Get the function to be evaluated.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
void SetAttributeModeToUsePointData()
void RemoveAllVariables()
Remove all the variable names and their associated array names.
char ** CoordinateScalarVariableNames
Parse and evaluate a mathematical expression.
char * GetScalarVariableName(int i)
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 ** SelectedCoordinateVectorComponents
void SetResultArrayName(const char *name)
Set the name of the array in which to store the result of evaluating this function.
void SetAttributeTypeToPointData()
vtkFunctionParser * FunctionParser
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
int * SelectedScalarComponents