63#ifndef vtkArrayCalculator_h
64#define vtkArrayCalculator_h
67#include "vtkFiltersCoreModule.h"
72VTK_ABI_NAMESPACE_BEGIN
87 vtkSetStringMacro(Function);
88 vtkGetStringMacro(Function);
104 const char* arrayName,
int component0 = 0,
int component1 = 1,
int component2 = 2);
116 int component1 = 1,
int component2 = 2);
128 const char* variableName,
int component0 = 0,
int component1 = 1,
int component2 = 2);
138 vtkSetStringMacro(ResultArrayName);
139 vtkGetStringMacro(ResultArrayName);
147 vtkGetMacro(ResultArrayType,
int);
148 vtkSetMacro(ResultArrayType,
int);
169 vtkGetMacro(ResultNormals,
bool);
170 vtkSetMacro(ResultNormals,
bool);
171 vtkBooleanMacro(ResultNormals,
bool);
180 vtkGetMacro(ResultTCoords,
bool);
181 vtkSetMacro(ResultTCoords,
bool);
182 vtkBooleanMacro(ResultTCoords,
bool);
190 static const int DEFAULT_ATTRIBUTE_TYPE = -1;
198 vtkSetMacro(AttributeType,
int);
199 vtkGetMacro(AttributeType,
int);
249 return this->SelectedVectorComponents;
266 vtkSetMacro(ReplacementValue,
double);
267 vtkGetMacro(ReplacementValue,
double);
276 vtkSetMacro(IgnoreMissingArrays,
bool);
277 vtkGetMacro(IgnoreMissingArrays,
bool);
278 vtkBooleanMacro(IgnoreMissingArrays,
bool);
288 NumberOfFunctionParserTypes
299 this->FunctionParserType = FunctionParserTypes::FunctionParser;
304 this->FunctionParserType = FunctionParserTypes::ExprTkFunctionParser;
369 template <
typename TFunctionParser>
perform mathematical operations on data in field data arrays
FunctionParserTypes
Enum that includes the types of parsers that can be used.
void SetFunctionParserTypeToFunctionParser()
Set/Get the FunctionParser type that will be used.
const std::vector< std::string > & GetVectorArrayNames()
Methods to get information about the current variables.
void RemoveAllVariables()
Remove all the variable names and their associated array names.
const char * GetAttributeTypeAsString()
Returns a string representation of the calculator's AttributeType.
void SetAttributeTypeToVertexData()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
virtual void RemoveCoordinateVectorVariables()
Remove all the coordinate variables.
std::string GetVectorVariableName(int i)
Methods to get information about the current variables.
void SetAttributeTypeToRowData()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
const std::vector< vtkTuple< int, 3 > > & GetSelectedVectorComponents()
Methods to get information about the current variables.
void SetAttributeTypeToDefault()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
vtkSetEnumMacro(FunctionParserType, FunctionParserTypes)
Set/Get the FunctionParser type that will be used.
vtkTuple< int, 3 > GetSelectedVectorComponents(int i)
Methods to get information about the current variables.
const std::vector< std::string > & GetScalarArrayNames()
Methods to get information about the current variables.
int GetNumberOfVectorArrays()
Methods to get information about the current variables.
vtkTypeBool ReplaceInvalidValues
const std::vector< int > & GetSelectedScalarComponents()
Methods to get information about the current variables.
std::vector< std::string > VectorVariableNames
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.
const std::vector< std::string > & GetScalarVariableNames()
Methods to get information about the current variables.
vtkTypeBool CoordinateResults
std::vector< vtkTuple< int, 3 > > SelectedVectorComponents
void SetAttributeTypeToEdgeData()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
vtkDataSet * GetDataSetOutput()
Returns the output of the filter downcast to a vtkDataSet or nullptr if the cast fails.
vtkGetEnumMacro(FunctionParserType, FunctionParserTypes)
Set/Get the FunctionParser type that will be used.
std::string GetScalarArrayName(int i)
Methods to get information about the current variables.
std::string GetScalarVariableName(int i)
Methods to get information about the current variables.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetNumberOfScalarArrays()
Methods to get information about the current variables.
std::vector< vtkTuple< int, 3 > > SelectedCoordinateVectorComponents
void AddVectorArrayName(const char *arrayName, int component0=0, int component1=1, int component2=2)
Add an array name to the list of arrays used in the function and specify which components of the arra...
void AddCoordinateScalarVariable(const char *variableName, int component=0)
Add a variable name, a corresponding array name, and which components of the array to use.
virtual void RemoveVectorVariables()
Remove all the scalar variable names and their associated array names.
static std::string CheckValidVariableName(const char *variableName)
A variable name is valid if it's sanitized or enclosed in quotes.
void SetAttributeTypeToCellData()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
std::vector< int > SelectedScalarComponents
void AddVectorVariable(const char *variableName, const char *arrayName, int component0=0, int component1=1, int component2=2)
Add a variable name, a corresponding array name, and which components of the array to use.
FunctionParserTypes FunctionParserType
const std::vector< std::string > & GetVectorVariableNames()
Methods to get information about the current variables.
std::vector< std::string > CoordinateVectorVariableNames
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)
Add a variable name, a corresponding array name, and which components of the array to use.
std::vector< std::string > ScalarVariableNames
std::vector< int > SelectedCoordinateScalarComponents
void SetFunctionParserTypeToExprTkFunctionParser()
Set/Get the FunctionParser type that will be used.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
std::vector< std::string > ScalarArrayNames
int GetSelectedScalarComponent(int i)
Methods to get information about the current variables.
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()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
~vtkArrayCalculator() override
virtual void RemoveCoordinateScalarVariables()
Remove all the coordinate variables.
std::vector< std::string > VectorArrayNames
std::string GetVectorArrayName(int i)
Methods to get information about the current variables.
std::vector< std::string > CoordinateScalarVariableNames
static vtkArrayCalculator * New()
general representation of visualization data
abstract class to specify dataset behavior
a simple class to control print indentation
virtual void Modified()
Update the modification time for this object.
templated base type for containers of constant size.