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