VTK  9.0.20210510
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 #include "vtkUnicodeString.h" // for unicode string
35 
36 class vtkIdTypeArray;
37 class vtkLabelHierarchy;
38 class vtkPolyData;
39 
40 class VTKRENDERINGLABEL_EXPORT vtkLabelHierarchyIterator : public vtkObject
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
52  virtual void Begin(vtkIdTypeArray*) {}
53 
57  virtual void Next() {}
58 
62  virtual bool IsAtEnd() { return true; }
63 
67  virtual void GetPoint(double x[3]);
68 
72  virtual void GetSize(double sz[2]);
73 
77  virtual void GetBoundedSize(double sz[2]);
78 
82  virtual int GetType();
83 
88 
92  VTK_DEPRECATED_IN_9_1_0("Use virtual vtkStdString GetLabel()")
93  virtual vtkUnicodeString GetUnicodeLabel();
94 
98  virtual double GetOrientation();
99 
103  virtual vtkIdType GetLabelId() { return -1; }
104 
106 
109  vtkGetObjectMacro(Hierarchy, vtkLabelHierarchy);
111 
117 
124  virtual void GetNodeGeometry(double ctr[3], double& size) = 0;
125 
131  virtual void BoxNode();
132 
138  virtual void BoxAllNodes(vtkPolyData*);
139 
141 
147  vtkSetMacro(AllBounds, int);
148  vtkGetMacro(AllBounds, int);
150 
151 protected:
154 
155  void BoxNodeInternal3(const double* ctr, double sz);
156  void BoxNodeInternal2(const double* ctr, double sz);
157 
162 
165  double BoundsFactor;
168 
169 private:
171  void operator=(const vtkLabelHierarchyIterator&) = delete;
172 };
173 
174 #endif // vtkLabelHierarchyIterator_h
vtkLabelHierarchyIterator::vtkLabelHierarchyIterator
vtkLabelHierarchyIterator()
vtkStdString.h
vtkLabelHierarchyIterator::TraversedBounds
vtkPolyData * TraversedBounds
Definition: vtkLabelHierarchyIterator.h:164
vtkLabelHierarchyIterator::GetPoint
virtual void GetPoint(double x[3])
Retrieves the current label location.
vtkLabelHierarchy
contains an octree of labels
Definition: vtkLabelHierarchy.h:80
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkUnicodeString.h
vtkLabelHierarchyIterator::IsAtEnd
virtual bool IsAtEnd()
Returns true if the iterator is at the end.
Definition: vtkLabelHierarchyIterator.h:62
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:63
VTK_DEPRECATED_IN_9_1_0
#define VTK_DEPRECATED_IN_9_1_0(reason)
Definition: vtkDeprecation.h:117
vtkLabelHierarchyIterator::AllBounds
int AllBounds
Definition: vtkLabelHierarchyIterator.h:166
vtkLabelHierarchyIterator
iterator over vtkLabelHierarchy
Definition: vtkLabelHierarchyIterator.h:41
vtkLabelHierarchyIterator::~vtkLabelHierarchyIterator
~vtkLabelHierarchyIterator() override
vtkLabelHierarchyIterator::SetHierarchy
virtual void SetHierarchy(vtkLabelHierarchy *h)
The hierarchy being traversed by this iterator.
vtkLabelHierarchyIterator::BoundsFactor
double BoundsFactor
Definition: vtkLabelHierarchyIterator.h:165
vtkLabelHierarchyIterator::Begin
virtual void Begin(vtkIdTypeArray *)
Initializes the iterator.
Definition: vtkLabelHierarchyIterator.h:52
vtkLabelHierarchyIterator::SetTraversedBounds
virtual void SetTraversedBounds(vtkPolyData *)
Sets a polydata to fill with geometry representing the bounding boxes of the traversed octree nodes.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkUnicodeString
String class that stores Unicode text.
Definition: vtkUnicodeString.h:72
vtkLabelHierarchyIterator::GetBoundedSize
virtual void GetBoundedSize(double sz[2])
Retrieves the current label maximum width in world coordinates.
vtkX3D::size
@ size
Definition: vtkX3D.h:259
vtkLabelHierarchyIterator::BoxNodeInternal2
void BoxNodeInternal2(const double *ctr, double sz)
vtkLabelHierarchyIterator::BoxNodeInternal3
void BoxNodeInternal3(const double *ctr, double sz)
vtkLabelHierarchyIterator::GetType
virtual int GetType()
Retrieves the current label type.
vtkObject.h
vtkLabelHierarchyIterator::Next
virtual void Next()
Advance the iterator.
Definition: vtkLabelHierarchyIterator.h:57
vtkLabelHierarchyIterator::AllBoundsRecorded
int AllBoundsRecorded
Definition: vtkLabelHierarchyIterator.h:167
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:36
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkLabelHierarchyIterator::GetSize
virtual void GetSize(double sz[2])
Retrieves the current label size.
vtkLabelHierarchyIterator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkLabelHierarchyIterator::BoxNode
virtual void BoxNode()
Add a representation to TraversedBounds for the current octree node.
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:36
vtkLabelHierarchyIterator::BoxAllNodes
virtual void BoxAllNodes(vtkPolyData *)
Add a representation for all existing octree nodes to the specified polydata.
vtkLabelHierarchyIterator::GetNodeGeometry
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.
vtkLabelHierarchyIterator::Hierarchy
vtkLabelHierarchy * Hierarchy
Definition: vtkLabelHierarchyIterator.h:163
h
vtkFrustumSelector is a vtkSelector that selects elements based on whether they are inside or interse...
vtkLabelHierarchyIterator::GetLabel
virtual vtkStdString GetLabel()
Retrieves the current label string.