143 #ifndef vtkSelection_h
144 #define vtkSelection_h
146 #include "vtkCommonDataModelModule.h"
154 VTK_ABI_NAMESPACE_BEGIN
289 virtual void Dump(ostream& os);
310 std::array<signed char, 2>
range;
311 return this->Evaluate(values, num_values,
range);
314 unsigned int num_values, std::array<signed char, 2>&
range)
const;
322 template <
typename MapType>
325 std::array<signed char, 2>
range;
326 return this->Evaluate(values_map,
range);
328 template <
typename MapType>
330 const MapType& values_map, std::array<signed char, 2>&
range)
const;
344 vtkInternals* Internals;
345 struct EvaluateFunctor;
349 template <
typename MapType>
351 const MapType& values_map, std::array<signed char, 2>&
range)
const
354 std::vector<vtkSignedCharArray*> values(num_nodes,
nullptr);
355 for (
unsigned int cc = 0; cc < num_nodes; ++cc)
358 values[cc] = iter != values_map.end() ? iter->second :
nullptr;
363 VTK_ABI_NAMESPACE_END
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.
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 and extracts the range.
virtual void Union(vtkSelection *selection)
Union this selection with the specified selection.
virtual void RemoveNode(const std::string &name)
Removes a selection node.
static vtkSelection * GetData(vtkInformation *info)
Retrieve a vtkSelection stored inside an invormation object.
vtkSmartPointer< vtkSignedCharArray > Evaluate(const MapType &values_map) const
Convenience method to pass a map of vtkSignedCharArray ptrs (or vtkSmartPointers) and range.
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.
vtkSmartPointer< vtkSignedCharArray > Evaluate(vtkSignedCharArray *const *values, unsigned int num_values, std::array< signed char, 2 > &range) const
Evaluates the expression for each element in the values and extracts the range.
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)
Dumps the contents of the selection, giving basic information only.
virtual std::string AddNode(vtkSelectionNode *)
Adds a selection node.
static vtkSelection * New()
static vtkSelection * GetData(vtkInformationVector *v, int i=0)
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
vtkTypeUInt32 vtkMTimeType