64 #ifndef vtkArrayCalculator_h
65 #define vtkArrayCalculator_h
68 #include "vtkFiltersCoreModule.h"
75 VTK_ABI_NAMESPACE_BEGIN
91 vtkSetStringMacro(Function);
92 vtkGetStringMacro(Function);
106 void AddScalarArrayName(
const char* arrayName,
int component = 0);
107 void AddVectorArrayName(
const char* arrayName);
109 void AddVectorArrayName(
110 const
char* arrayName,
int component0,
int component1 = 1,
int component2 = 2)
112 static_cast<void>(component0);
113 static_cast<void>(component1);
114 static_cast<void>(component2);
115 this->AddVectorArrayName(arrayName);
126 void AddScalarVariable(
const char* variableName,
const char* arrayName,
int component = 0);
127 void AddVectorVariable(
const char* variableName,
const char* arrayName);
129 "Use AddVectorVariable(const char* variableName, const char* arrayName) instead")
130 void AddVectorVariable(const
char* variableName, const
char* arrayName,
int component0,
131 int component1 = 1,
int component2 = 2)
133 static_cast<void>(component0);
134 static_cast<void>(component1);
135 static_cast<void>(component2);
136 this->AddVectorVariable(variableName, arrayName);
147 void AddCoordinateScalarVariable(
const char* variableName,
int component = 0);
148 void AddCoordinateVectorVariable(
const char* variableName);
150 void AddCoordinateVectorVariable(
151 const
char* variableName,
int component0,
int component1 = 1,
int component2 = 2)
153 static_cast<void>(component0);
154 static_cast<void>(component1);
155 static_cast<void>(component2);
156 this->AddCoordinateVectorVariable(variableName);
167 vtkSetStringMacro(ResultArrayName);
168 vtkGetStringMacro(ResultArrayName);
176 vtkGetMacro(ResultArrayType,
int);
177 vtkSetMacro(ResultArrayType,
int);
198 vtkGetMacro(ResultNormals,
bool);
199 vtkSetMacro(ResultNormals,
bool);
200 vtkBooleanMacro(ResultNormals,
bool);
209 vtkGetMacro(ResultTCoords,
bool);
210 vtkSetMacro(ResultTCoords,
bool);
211 vtkBooleanMacro(ResultTCoords,
bool);
217 const char* GetAttributeTypeAsString();
219 static const int DEFAULT_ATTRIBUTE_TYPE = -1;
227 vtkSetMacro(AttributeType,
int);
228 vtkGetMacro(AttributeType,
int);
240 void RemoveAllVariables();
245 virtual void RemoveScalarVariables();
250 virtual void RemoveVectorVariables();
255 virtual void RemoveCoordinateScalarVariables();
260 virtual void RemoveCoordinateVectorVariables();
275 int GetSelectedScalarComponent(
int i);
279 vtkTuple<
int, 3> GetSelectedVectorComponents(
int) {
return {}; }
284 return this->CoordinateScalarVariableNames;
286 std::string GetCoordinateScalarVariableName(
int i);
289 return this->CoordinateVectorVariableNames;
291 std::string GetCoordinateVectorVariableName(
int i);
294 return this->SelectedCoordinateScalarComponents;
296 int GetSelectedCoordinateScalarComponent(
int i);
299 return static_cast<int>(this->CoordinateScalarVariableNames.size());
303 return static_cast<int>(this->CoordinateVectorVariableNames.size());
316 vtkBooleanMacro(ReplaceInvalidValues,
vtkTypeBool);
317 vtkSetMacro(ReplacementValue,
double);
318 vtkGetMacro(ReplacementValue,
double);
327 vtkSetMacro(IgnoreMissingArrays,
bool);
328 vtkGetMacro(IgnoreMissingArrays,
bool);
329 vtkBooleanMacro(IgnoreMissingArrays,
bool);
339 NumberOfFunctionParserTypes
347 vtkSetEnumMacro(FunctionParserType, FunctionParserTypes);
350 this->FunctionParserType = FunctionParserTypes::FunctionParser;
355 this->FunctionParserType = FunctionParserTypes::ExprTkFunctionParser;
358 vtkGetEnumMacro(FunctionParserType, FunctionParserTypes);
387 static std::string CheckValidVariableName(
const char* variableName);
423 template <
typename TFunctionParser,
typename TResultArray>
424 class vtkArrayCalculatorFunctor;
426 template <
typename TFunctionParser>
427 struct vtkArrayCalculatorWorker;
429 template <
typename TFunctionParser>
433 template <
typename TFunctionParser>
437 VTK_ABI_NAMESPACE_END
vtkTypeBool ReplaceInvalidValues
std::vector< std::string > ScalarArrayNames
const std::vector< std::string > & GetCoordinateScalarVariableNames()
Methods to get information about the current variables.
int GetNumberOfCoordinateVectorVariables()
Methods to get information about the current variables.
const std::vector< std::string > & GetScalarVariableNames()
Methods to get information about the current variables.
perform mathematical operations on data in field data arrays
abstract class to specify dataset behavior
void SetAttributeTypeToVertexData()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
void SetFunctionParserTypeToFunctionParser()
Set/Get the FunctionParser type that will be used.
void SetAttributeTypeToDefault()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
Hold a reference to a vtkObjectBase instance.
void SetAttributeTypeToPointData()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
const std::vector< int > & GetSelectedScalarComponents()
Methods to get information about the current variables.
void SetAttributeTypeToCellData()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
int GetNumberOfVectorArrays()
Methods to get information about the current variables.
std::vector< std::string > CoordinateVectorVariableNames
const std::vector< std::string > & GetVectorVariableNames()
Methods to get information about the current variables.
#define VTK_DEPRECATED_IN_9_6_0(reason)
templated base type for containers of constant size.
const std::vector< int > & GetSelectedCoordinateScalarComponents()
Methods to get information about the current variables.
void SetFunctionParserTypeToExprTkFunctionParser()
Set/Get the FunctionParser type that will be used.
std::vector< std::string > VectorVariableNames
a simple class to control print indentation
int GetNumberOfScalarArrays()
Methods to get information about the current variables.
virtual void Modified()
Update the modification time for this object.
std::vector< std::string > CoordinateScalarVariableNames
std::vector< std::string > ScalarVariableNames
FunctionParserTypes FunctionParserType
const std::vector< std::string > & GetVectorArrayNames()
Methods to get information about the current variables.
FunctionParserTypes
Enum that includes the types of parsers that can be used.
const std::vector< std::string > & GetCoordinateVectorVariableNames()
Methods to get information about the current variables.
std::vector< std::string > VectorArrayNames
void SetAttributeTypeToEdgeData()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
const std::vector< std::string > & GetScalarArrayNames()
Methods to get information about the current variables.
vtkTypeBool CoordinateResults
general representation of visualization data
void SetAttributeTypeToRowData()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
std::vector< int > SelectedScalarComponents
int GetNumberOfCoordinateScalarVariables()
Methods to get information about the current variables.
std::vector< int > SelectedCoordinateScalarComponents