149#ifndef vtkSelection_h
150#define vtkSelection_h
152#include "vtkCommonDataModelModule.h"
241 vtkSetMacro(Expression, std::string);
242 vtkGetMacro(Expression, std::string);
293 virtual void Dump(ostream& os);
317 template <
typename MapType>
331 vtkInternals* Internals;
335template <
typename MapType>
340 for (
unsigned int cc = 0; cc < num_nodes; ++cc)
343 values[cc] = iter != values_map.end() ? iter->second :
nullptr;
345 return this->
Evaluate(&values[0], num_nodes);
general representation of visualization data
a simple class to control print indentation
a node in a vtkSelection the defines the selection criteria.
data object that represents a "selection" in VTK.
virtual void RemoveNode(unsigned int idx)
Removes a selection node.
vtkMTimeType GetMTime() override
Return the MTime taking into account changes to the properties.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkSelection * GetData(vtkInformationVector *v, int i=0)
Retrieve a vtkSelection stored inside an invormation object.
virtual vtkSelectionNode * GetNode(unsigned int idx) const
Returns a node given it's index.
unsigned int GetNumberOfNodes() const
Returns the number of nodes in this selection.
virtual void SetNode(const std::string &name, vtkSelectionNode *)
Adds a vtkSelectionNode and assigns it the specified name.
virtual void Union(vtkSelection *selection)
Union this selection with the specified selection.
virtual void RemoveNode(const std::string &name)
Removes a selection node.
virtual vtkSelectionNode * GetNode(const std::string &name) const
Returns a node with the given name, if present, else nullptr is returned.
void DeepCopy(vtkDataObject *src) override
Copy selection nodes of the input.
virtual void Subtract(vtkSelection *selection)
Remove the nodes from the specified selection from this selection.
virtual void Union(vtkSelectionNode *node)
Union this selection with the specified selection node.
static vtkSelection * New()
void ShallowCopy(vtkDataObject *src) override
Copy selection nodes of the input.
virtual void Subtract(vtkSelectionNode *node)
Remove the nodes from the specified selection from this selection.
void Initialize() override
Restore data object to initial state,.
virtual std::string GetNodeNameAtIndex(unsigned int idx) const
Returns the name for a node at the given index.
virtual void Dump()
Dumps the contents of the selection, giving basic information only.
int GetDataObjectType() override
Returns VTK_SELECTION enumeration value.
virtual void Dump(ostream &os)
Dumps the contents of the selection, giving basic information only.
virtual std::string AddNode(vtkSelectionNode *)
Adds a selection node.
vtkSmartPointer< vtkSignedCharArray > Evaluate(vtkSignedCharArray *const *values, unsigned int num_values) const
Evaluates the expression for each element in the values.
static vtkSelection * GetData(vtkInformation *info)
Retrieve a vtkSelection stored inside an invormation object.
virtual void RemoveAllNodes()
Removes all selection nodes.
virtual void RemoveNode(vtkSelectionNode *)
Removes a selection node.
dynamic, self-adjusting array of signed char
Hold a reference to a vtkObjectBase instance.
vtkTypeUInt32 vtkMTimeType