Go to the documentation of this file.
104 #ifndef vtkMultiThreshold_h
105 #define vtkMultiThreshold_h
107 #include "vtkFiltersGeneralModule.h"
194 int assoc,
const char* arrayName,
int component,
int allScalars );
196 int assoc,
int attribType,
int component,
int allScalars );
207 int AddLowpassIntervalSet(
double xmax,
int assoc,
const char* arrayName,
int component,
int allScalars );
208 int AddHighpassIntervalSet(
double xmin,
int assoc,
const char* arrayName,
int component,
int allScalars );
209 int AddBandpassIntervalSet(
double xmin,
double xmax,
int assoc,
const char* arrayName,
int component,
int allScalars );
210 int AddNotchIntervalSet(
double xlo,
double xhi,
int assoc,
const char* arrayName,
int component,
int allScalars );
263 else if ( this->Component > other.
Component )
266 if ( (! this->AllScalars) && other.
AllScalars )
268 else if ( this->AllScalars && (! other.
AllScalars) )
271 if ( this->Type == -1 )
273 if ( other.
Type == -1 )
274 return this->Name < other.
Name;
279 return this->Type < other.
Type;
305 virtual Interval* GetIntervalPointer();
312 double EndpointValues[2];
314 int EndpointClosures[2];
326 Interval* GetIntervalPointer()
override;
338 BooleanSet(
int sId,
int op,
int* inBegin,
int* inEnd ) : Inputs( inBegin, inEnd ) {
399 typedef std::map<NormKey,IntervalList>
RuleMap;
455 double xmin,
double xmax,
int assoc,
const char* arrayName,
int component,
int allScalars )
461 double xlo,
double xhi,
int assoc,
const char* arrayName,
int component,
int allScalars )
491 #endif // vtkMultiThreshold_h
std::vector< Set * > Sets
A list of rules keyed by their unique integer ID.
int AddBooleanSet(int operation, int numInputs, int *inputs)
Create a new mesh subset using boolean operations on pre-existing sets.
TruthTree DependentSets
A list of boolean sets whose values depend on the given set.
A subset of a mesh represented by a range of acceptable attribute values.
int AddIntervalSet(double xmin, double xmax, int omin, int omax, int assoc, int attribType, int component, int allScalars)
@ WOR
Include elements that belong to an odd number of input sets (a kind of "winding XOR")
virtual void PrintNodeName(ostream &os)
Print a graphviz node label statement (with fancy node name and shape).
std::vector< TruthTreeValues > TruthTree
@ NAND
Only include elements that don't belong to any input set.
Ruling
When an interval is evaluated, its value is used to update a truth table.
int AddBandpassIntervalSet(double xmin, double xmax, int assoc, const char *arrayName, int component, int allScalars)
BooleanSet(int sId, int op, int *inBegin, int *inEnd)
Construct a new set with the given ID, operator, and inputs.
int AddHighpassIntervalSet(double xmin, int assoc, const char *arrayName, int component, int allScalars)
void PrintNode(ostream &os) override
Print a graphviz node name for use in an edge statement.
abstract superclass for arrays of numeric data
VTKCOMMONCORE_EXPORT bool operator<(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
NormKey Norm
This contains information about the attribute over which the interval is defined.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This function performs the actual thresholding.
static vtkMultiThreshold * New()
static double Inf()
Special IEEE-754 number used to represent positive infinity.
vtkMultiThreshold(const vtkMultiThreshold &)=delete
int AddLowpassIntervalSet(double xmax, int assoc, const char *arrayName, int component, int allScalars)
These convenience members make it easy to insert closed intervals.
static double NegInf()
Special IEEE-754 number used to represent negative infinity.
int Operator
The boolean operation that will be performed on the inputs to obtain the output.
int AddIntervalSet(NormKey &nk, double xmin, double xmax, int omin, int omax)
A utility method called by the public AddInterval members.
std::vector< Interval * > IntervalList
A list of pointers to IntervalSets.
Interval * GetIntervalPointer() override
int AddIntervalSet(double xmin, double xmax, int omin, int omax, int assoc, const char *arrayName, int component, int allScalars)
Add a mesh subset to be computed by thresholding an attribute of the input mesh.
BooleanSet * GetBooleanSetPointer() override
Avoid dynamic_casts. Subclasses must override.
abstract class to specify cell behavior
represent and manipulate cell attribute data
std::map< NormKey, IntervalList > RuleMap
A map describing the IntervalSets that share a common attribute and norm.
a simple class to control print indentation
Closure
Whether the endpoint value of an interval should be included or excluded.
int NumberOfOutputs
The number of output datasets.
virtual BooleanSet * GetBooleanSetPointer()
Avoid dynamic_casts. Subclasses must override.
void PrintNode(ostream &os) override
Print a graphviz node name for use in an edge statement.
RuleMap IntervalRules
A set of threshold rules sorted by the attribute+norm to which they are applied.
A subset of a mesh represented as a boolean set operation.
@ OR
Include an element if it belongs to any input set.
void ComputeNorm(vtkIdType cellId, vtkCell *cell, vtkDataArray *array, double cellNorm[2]) const
Compute the norm of a cell by calling NormFunction for all its points or for its single cell-centered...
@ AND
Only include an element if it belongs to all the input sets.
~vtkMultiThreshold() override
int OutputId
A unique identifier for this set.
int FillInputPortInformation(int port, vtkInformation *info) override
We accept any mesh that is descended from vtkPointSet.
virtual ~Set()
Virtual destructor since we have virtual members.
Set()
The index of the output mesh that will hold this set or -1 if the set is not output.
@ CLOSED
Specify a closed interval.
Norm
Norms that can be used to threshold vector attributes.
virtual Interval * GetIntervalPointer()
@ XOR
Include an element if it belongs to exactly one input set.
Threshold cells within multiple intervals.
abstract class for specifying dataset behavior
void PrintGraph(ostream &os)
Print out a graphviz-formatted text description of all the sets.
void Reset()
Remove all the intervals currently defined.
provides thread-safe access to cells
std::vector< int > Inputs
A list of input sets. These may be IntervalSets or BooleanSets.
std::vector< int > TruthTreeValues
A base class for representing threshold sets.
dataset represents arbitrary combinations of all possible cell types
int AddNotchIntervalSet(double xlo, double xhi, int assoc, const char *arrayName, int component, int allScalars)
virtual void PrintNode(ostream &os)=0
Print a graphviz node name for use in an edge statement.
int Match(double cellNorm[2])
Does the specified range fall inside the interval? For cell-centered attributes, only cellNorm[0] is ...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int OutputSet(int setId)
Create an output mesh containing a boolean or interval subset of the input mesh.
SetOperation
Operations that can be performed on sets to generate another set. Most of these operators take 2 or m...
A class with comparison operator used to index input array norms used in threshold rules.
void UpdateDependents(int id, std::set< int > &unresolvedOutputs, TruthTreeValues &setStates, vtkCellData *inCellData, vtkIdType cellId, vtkGenericCell *cell, std::vector< vtkUnstructuredGrid * > &outv)
Recursively update the setStates and unresolvedOutputs vectors based on this->DependentSets.
int NextArrayIndex
A variable used to store the next index to use when calling SetInputArrayToProcess.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.