34 #ifndef vtkSelection_h
35 #define vtkSelection_h
37 #include "vtkCommonDataModelModule.h"
45 VTK_ABI_NAMESPACE_BEGIN
70 unsigned int GetNumberOfNodes()
const;
100 virtual std::string GetNodeNameAtIndex(
unsigned int idx)
const;
106 virtual void RemoveNode(
unsigned int idx);
114 virtual void RemoveAllNodes();
180 virtual void Dump(ostream& os);
201 std::array<signed char, 2>
range;
202 return this->Evaluate(values, num_values, range);
205 unsigned int num_values, std::array<signed char, 2>&
range)
const;
213 template <
typename MapType>
216 std::array<signed char, 2>
range;
217 return this->Evaluate(values_map, range);
219 template <
typename MapType>
221 const MapType& values_map, std::array<signed char, 2>&
range)
const;
235 vtkInternals* Internals;
236 struct EvaluateFunctor;
240 template <
typename MapType>
242 const MapType& values_map, std::array<signed char, 2>&
range)
const
245 std::vector<vtkSignedCharArray*> values(num_nodes,
nullptr);
246 for (
unsigned int cc = 0; cc < num_nodes; ++cc)
249 values[cc] = iter != values_map.end() ? iter->second :
nullptr;
254 VTK_ABI_NAMESPACE_END
a node in a vtkSelection the defines the selection criteria.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkDataObject * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
static vtkDataObject * New()
vtkTypeUInt32 vtkMTimeType
data object that represents a "selection" in VTK.
virtual void Initialize()
Restore data object to initial state,.
vtkSmartPointer< vtkSignedCharArray > Evaluate(vtkSignedCharArray *const *values, unsigned int num_values) const
Evaluates the expression for each element in the values and extracts the range.
int GetDataObjectType() override
Returns VTK_SELECTION enumeration value.
a simple class to control print indentation
dynamic, self-adjusting array of signed char
unsigned int GetNumberOfNodes() const
Returns the number of nodes in this selection.
virtual std::string GetNodeNameAtIndex(unsigned int idx) const
Returns the name for a node at the given index.
vtkMTimeType GetMTime() override
Data objects are composite objects and need to check each part for MTime.
general representation of visualization data
virtual void DeepCopy(vtkDataObject *src)
The goal of the method is to copy the complete data from src into this object.
vtkSmartPointer< vtkSignedCharArray > Evaluate(const MapType &values_map) const
Convenience method to pass a map of vtkSignedCharArray ptrs (or vtkSmartPointers) and range...
virtual void ShallowCopy(vtkDataObject *src)
The goal of the method is to copy the data up to the array pointers only.