VTK  9.3.1
vtkLabelHierarchyCompositeIterator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
21 #ifndef vtkLabelHierarchyCompositeIterator_h
22 #define vtkLabelHierarchyCompositeIterator_h
23 
25 #include "vtkRenderingLabelModule.h" // For export macro
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class vtkIdTypeArray;
29 class vtkLabelHierarchy;
30 class vtkPolyData;
31 
32 class VTKRENDERINGLABEL_EXPORT vtkLabelHierarchyCompositeIterator : public vtkLabelHierarchyIterator
33 {
34 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
44  virtual void AddIterator(vtkLabelHierarchyIterator* it) { this->AddIterator(it, 1); }
45  virtual void AddIterator(vtkLabelHierarchyIterator* it, int count);
46 
50  virtual void ClearIterators();
51 
58  void Begin(vtkIdTypeArray*) override;
59 
63  void Next() override;
64 
68  bool IsAtEnd() override;
69 
73  vtkIdType GetLabelId() override;
74 
78  vtkLabelHierarchy* GetHierarchy() override;
79 
86  void GetNodeGeometry(double ctr[3], double& size) override;
87 
91  void BoxNode() override {}
92 
96  void BoxAllNodes(vtkPolyData*) override {}
97 
98 protected:
101 
102  class Internal;
103  Internal* Implementation;
104 
105 private:
107  void operator=(const vtkLabelHierarchyCompositeIterator&) = delete;
108 };
109 
110 VTK_ABI_NAMESPACE_END
111 #endif // vtkLabelHierarchyCompositeIterator_h
iterator over vtkLabelHierarchy
virtual void Next()
Advance the iterator.
virtual void AddIterator(vtkLabelHierarchyIterator *it)
Adds a label iterator to this composite iterator.
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:315
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
virtual void Begin(vtkIdTypeArray *)
Initializes the iterator.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual void GetNodeGeometry(double ctr[3], double &size)=0
Retrieve the coordinates of the center of the current hierarchy node and the size of the node...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
contains an octree of labels
virtual bool IsAtEnd()
Returns true if the iterator is at the end.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual vtkLabelHierarchy * GetHierarchy()
Get the label hierarchy associated with the current label.
void BoxAllNodes(vtkPolyData *) override
Not implemented.
virtual vtkIdType GetLabelId()
Retrieves the current label id.