VTK  9.3.1
vtkLabelHierarchyIterator.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
12 #ifndef vtkLabelHierarchyIterator_h
13 #define vtkLabelHierarchyIterator_h
14 
15 #include "vtkObject.h"
16 #include "vtkRenderingLabelModule.h" // For export macro
17 #include "vtkStdString.h" // for std string
18 
19 VTK_ABI_NAMESPACE_BEGIN
20 class vtkIdTypeArray;
21 class vtkLabelHierarchy;
22 class vtkPolyData;
23 
24 class VTKRENDERINGLABEL_EXPORT vtkLabelHierarchyIterator : public vtkObject
25 {
26 public:
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
36  virtual void Begin(vtkIdTypeArray*) {}
37 
41  virtual void Next() {}
42 
46  virtual bool IsAtEnd() { return true; }
47 
51  virtual void GetPoint(double x[3]);
52 
56  virtual void GetSize(double sz[2]);
57 
61  virtual void GetBoundedSize(double sz[2]);
62 
66  virtual int GetType();
67 
71  virtual vtkStdString GetLabel();
72 
76  virtual double GetOrientation();
77 
81  virtual vtkIdType GetLabelId() { return -1; }
82 
84 
87  vtkGetObjectMacro(Hierarchy, vtkLabelHierarchy);
89 
94  virtual void SetTraversedBounds(vtkPolyData*);
95 
102  virtual void GetNodeGeometry(double ctr[3], double& size) = 0;
103 
109  virtual void BoxNode();
110 
116  virtual void BoxAllNodes(vtkPolyData*);
117 
119 
125  vtkSetMacro(AllBounds, int);
126  vtkGetMacro(AllBounds, int);
128 
129 protected:
131  ~vtkLabelHierarchyIterator() override;
132 
133  void BoxNodeInternal3(const double* ctr, double sz);
134  void BoxNodeInternal2(const double* ctr, double sz);
135 
139  virtual void SetHierarchy(vtkLabelHierarchy* h);
140 
143  double BoundsFactor;
146 
147 private:
149  void operator=(const vtkLabelHierarchyIterator&) = delete;
150 };
151 
152 VTK_ABI_NAMESPACE_END
153 #endif // vtkLabelHierarchyIterator_h
iterator over vtkLabelHierarchy
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:28
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void Next()
Advance the 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
void GetPoint(int i, int j, int k, double pnt[3])
contains an octree of labels
virtual bool IsAtEnd()
Returns true if the iterator is at the end.
virtual vtkIdType GetLabelId()
Retrieves the current label id.