44 #ifndef vtkSelection_h
45 #define vtkSelection_h
47 #include "vtkCommonDataModelModule.h"
188 virtual void Dump(ostream& os);
212 template <
typename MapType>
226 vtkInternals* Internals;
230 template <
typename MapType>
235 for (
unsigned int cc = 0; cc < num_nodes; ++cc)
238 values[cc] = iter != values_map.end() ? iter->second :
nullptr;
240 return this->
Evaluate(&values[0], num_nodes);
general representation of visualization data
a simple class to control print indentation
A node in a selection tree.
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.
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.
vtkSmartPointer< vtkSignedCharArray > Evaluate(vtkSignedCharArray *const *values, unsigned int num_values) const
Evaluates the expression for each element in the values.
virtual void Union(vtkSelection *selection)
Union this selection with the specified selection.
virtual void RemoveNode(const std::string &name)
static vtkSelection * GetData(vtkInformation *info)
Retrieve a vtkSelection stored inside an invormation object.
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.
void ShallowCopy(vtkDataObject *src) override
Copy selection nodes of the input.
virtual vtkSelectionNode * GetNode(unsigned int idx) const
Returns a node given it's index.
virtual void Subtract(vtkSelectionNode *node)
Remove the nodes from the specified selection from this selection.
virtual vtkSelectionNode * GetNode(const std::string &name) const
Returns a node with the given name, if present, else nullptr is returned.
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)
virtual std::string AddNode(vtkSelectionNode *)
Adds a selection node.
static vtkSelection * New()
static vtkSelection * GetData(vtkInformationVector *v, int i=0)
virtual void RemoveAllNodes()
Removes all selection nodes.
virtual void RemoveNode(vtkSelectionNode *)
dynamic, self-adjusting array of signed char
Hold a reference to a vtkObjectBase instance.
vtkTypeUInt32 vtkMTimeType