43 #ifndef vtkSelection_h
44 #define vtkSelection_h
46 #include "vtkCommonDataModelModule.h"
54 VTK_ABI_NAMESPACE_BEGIN
189 virtual void Dump(ostream& os);
210 std::array<signed char, 2>
range;
211 return this->Evaluate(values, num_values,
range);
214 unsigned int num_values, std::array<signed char, 2>&
range)
const;
222 template <
typename MapType>
225 std::array<signed char, 2>
range;
226 return this->Evaluate(values_map,
range);
228 template <
typename MapType>
230 const MapType& values_map, std::array<signed char, 2>&
range)
const;
244 vtkInternals* Internals;
245 struct EvaluateFunctor;
249 template <
typename MapType>
251 const MapType& values_map, std::array<signed char, 2>&
range)
const
254 std::vector<vtkSignedCharArray*> values(num_nodes,
nullptr);
255 for (
unsigned int cc = 0; cc < num_nodes; ++cc)
258 values[cc] = iter != values_map.end() ? iter->second :
nullptr;
263 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