VTK  9.2.6
vtkLabelHierarchyIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLabelHierarchyIterator.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
28 #ifndef vtkLabelHierarchyIterator_h
29 #define vtkLabelHierarchyIterator_h
30 
31 #include "vtkObject.h"
32 #include "vtkRenderingLabelModule.h" // For export macro
33 #include "vtkStdString.h" // for std string
34 
35 class vtkIdTypeArray;
36 class vtkLabelHierarchy;
37 class vtkPolyData;
38 
39 class VTKRENDERINGLABEL_EXPORT vtkLabelHierarchyIterator : public vtkObject
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
51  virtual void Begin(vtkIdTypeArray*) {}
52 
56  virtual void Next() {}
57 
61  virtual bool IsAtEnd() { return true; }
62 
66  virtual void GetPoint(double x[3]);
67 
71  virtual void GetSize(double sz[2]);
72 
76  virtual void GetBoundedSize(double sz[2]);
77 
81  virtual int GetType();
82 
86  virtual vtkStdString GetLabel();
87 
91  virtual double GetOrientation();
92 
96  virtual vtkIdType GetLabelId() { return -1; }
97 
99 
102  vtkGetObjectMacro(Hierarchy, vtkLabelHierarchy);
104 
109  virtual void SetTraversedBounds(vtkPolyData*);
110 
117  virtual void GetNodeGeometry(double ctr[3], double& size) = 0;
118 
124  virtual void BoxNode();
125 
131  virtual void BoxAllNodes(vtkPolyData*);
132 
134 
140  vtkSetMacro(AllBounds, int);
141  vtkGetMacro(AllBounds, int);
143 
144 protected:
146  ~vtkLabelHierarchyIterator() override;
147 
148  void BoxNodeInternal3(const double* ctr, double sz);
149  void BoxNodeInternal2(const double* ctr, double sz);
150 
154  virtual void SetHierarchy(vtkLabelHierarchy* h);
155 
158  double BoundsFactor;
161 
162 private:
164  void operator=(const vtkLabelHierarchyIterator&) = delete;
165 };
166 
167 #endif // vtkLabelHierarchyIterator_h
iterator over vtkLabelHierarchy
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
abstract base class for most VTK objects
Definition: vtkObject.h:62
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:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
virtual void Begin(vtkIdTypeArray *)
Initializes the iterator.
void GetPoint(const int i, const int j, const int k, double pnt[3])
a simple class to control print indentation
Definition: vtkIndent.h:39
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.