 |
VTK
9.1.0
|
Go to the documentation of this file.
101 #ifndef vtkArrayCalculator_h
102 #define vtkArrayCalculator_h
105 #include "vtkFiltersCoreModule.h"
124 vtkSetStringMacro(Function);
125 vtkGetStringMacro(Function);
141 const char* arrayName,
int component0 = 0,
int component1 = 1,
int component2 = 2);
153 int component1 = 1,
int component2 = 2);
165 const char* variableName,
int component0 = 0,
int component1 = 1,
int component2 = 2);
175 vtkSetStringMacro(ResultArrayName);
176 vtkGetStringMacro(ResultArrayName);
184 vtkGetMacro(ResultArrayType,
int);
185 vtkSetMacro(ResultArrayType,
int);
206 vtkGetMacro(ResultNormals,
bool);
207 vtkSetMacro(ResultNormals,
bool);
208 vtkBooleanMacro(ResultNormals,
bool);
217 vtkGetMacro(ResultTCoords,
bool);
218 vtkSetMacro(ResultTCoords,
bool);
219 vtkBooleanMacro(ResultTCoords,
bool);
227 static const int DEFAULT_ATTRIBUTE_TYPE = -1;
235 vtkSetMacro(AttributeType,
int);
236 vtkGetMacro(AttributeType,
int);
286 return this->SelectedVectorComponents;
303 vtkSetMacro(ReplacementValue,
double);
304 vtkGetMacro(ReplacementValue,
double);
313 vtkSetMacro(IgnoreMissingArrays,
bool);
314 vtkGetMacro(IgnoreMissingArrays,
bool);
315 vtkBooleanMacro(IgnoreMissingArrays,
bool);
325 NumberOfFunctionParserTypes
336 this->FunctionParserType = FunctionParserTypes::FunctionParser;
341 this->FunctionParserType = FunctionParserTypes::ExprTkFunctionParser;
406 template <
typename TFunctionParser>
void SetAttributeTypeToDefault()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
static vtkArrayCalculator * New()
const std::vector< int > & GetSelectedScalarComponents()
Methods to get information about the current variables.
int GetNumberOfVectorArrays()
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.
perform mathematical operations on data in field data arrays
std::vector< std::string > ScalarVariableNames
vtkTypeBool ReplaceInvalidValues
const std::vector< std::string > & GetVectorArrayNames()
Methods to get information about the current variables.
std::string GetVectorArrayName(int i)
Methods to get information about the current variables.
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.
void SetAttributeTypeToEdgeData()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
vtkTypeBool CoordinateResults
std::string GetScalarArrayName(int i)
Methods to get information about the current variables.
const std::vector< std::string > & GetVectorVariableNames()
Methods to get information about the current variables.
virtual void Modified()
Update the modification time for this object.
std::vector< int > SelectedScalarComponents
vtkDataSet * GetDataSetOutput()
Returns the output of the filter downcast to a vtkDataSet or nullptr if the cast fails.
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...
std::vector< std::string > VectorVariableNames
int GetAttributeTypeFromInput(vtkDataObject *input)
Get the attribute type for the input.
FunctionParserTypes FunctionParserType
virtual void RemoveScalarVariables()
Remove all the scalar variable names and their associated array names.
FunctionParserTypes
Enum that includes the types of parsers that can be used.
void SetFunctionParserTypeToFunctionParser()
Set/Get the FunctionParser type that will be used.
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.
std::string GetScalarVariableName(int i)
Methods to get information about the current variables.
static std::string CheckValidVariableName(const char *variableName)
A variable name is valid if it's sanitized or enclosed in quotes.
int GetNumberOfScalarArrays()
Methods to get information about the current variables.
virtual void RemoveCoordinateScalarVariables()
Remove all the coordinate variables.
void SetAttributeTypeToRowData()
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.
a simple class to control print indentation
void SetAttributeTypeToCellData()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
std::vector< std::string > VectorArrayNames
~vtkArrayCalculator() override
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...
std::string GetVectorVariableName(int i)
Methods to get information about the current variables.
int GetSelectedScalarComponent(int i)
Methods to get information about the current variables.
std::vector< vtkTuple< int, 3 > > SelectedCoordinateVectorComponents
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.
vtkTuple< int, 3 > GetSelectedVectorComponents(int i)
Methods to get information about the current variables.
std::vector< std::string > CoordinateScalarVariableNames
abstract class to specify dataset behavior
void SetAttributeTypeToVertexData()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
const char * GetAttributeTypeAsString()
Returns a string representation of the calculator's AttributeType.
virtual void RemoveCoordinateVectorVariables()
Remove all the coordinate variables.
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.
void RemoveAllVariables()
Remove all the variable names and their associated array names.
vtkGetEnumMacro(FunctionParserType, FunctionParserTypes)
Set/Get the FunctionParser type that will be used.
void AddCoordinateScalarVariable(const char *variableName, int component=0)
Add a variable name, a corresponding array name, and which components of the array to use.
const std::vector< vtkTuple< int, 3 > > & GetSelectedVectorComponents()
Methods to get information about the current variables.
vtkSetEnumMacro(FunctionParserType, FunctionParserTypes)
Set/Get the FunctionParser type that will be used.
std::vector< int > SelectedCoordinateScalarComponents
void SetAttributeTypeToPointData()
Control which AttributeType the filter operates on (point data or cell data for vtkDataSets).
general representation of visualization data
std::vector< std::string > CoordinateVectorVariableNames
std::vector< vtkTuple< int, 3 > > SelectedVectorComponents
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
std::vector< std::string > ScalarArrayNames
const std::vector< std::string > & GetScalarVariableNames()
Methods to get information about the current variables.