VTK
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 "vtkRenderingLabelModule.h" // For export macro
32 #include "vtkObject.h"
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  virtual void PrintSelf( ostream& os, vtkIndent indent );
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 
87  virtual vtkStdString GetLabel();
88 
92  virtual vtkUnicodeString GetUnicodeLabel();
93 
97  virtual double GetOrientation();
98 
102  virtual vtkIdType GetLabelId() { return -1; }
103 
105 
108  vtkGetObjectMacro(Hierarchy, vtkLabelHierarchy);
110 
115  virtual void SetTraversedBounds( vtkPolyData* );
116 
123  virtual void GetNodeGeometry( double ctr[3], double& size ) = 0;
124 
130  virtual void BoxNode();
131 
137  virtual void BoxAllNodes( vtkPolyData* );
138 
140 
146  vtkSetMacro(AllBounds,int);
147  vtkGetMacro(AllBounds,int);
149 
150 protected:
152  virtual ~vtkLabelHierarchyIterator();
153 
154  void BoxNodeInternal3( const double* ctr, double sz );
155  void BoxNodeInternal2( const double* ctr, double sz );
156 
160  virtual void SetHierarchy( vtkLabelHierarchy* h );
161 
164  double BoundsFactor;
167 
168 private:
169  vtkLabelHierarchyIterator( const vtkLabelHierarchyIterator& ) VTK_DELETE_FUNCTION;
170  void operator = ( const vtkLabelHierarchyIterator& ) VTK_DELETE_FUNCTION;
171 };
172 
173 #endif // vtkLabelHierarchyIterator_h
iterator over vtkLabelHierarchy
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:47
abstract base class for most VTK objects
Definition: vtkObject.h:59
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:287
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
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
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
contains an octree of labels
virtual bool IsAtEnd()
Returns true if the iterator is at the end.
String class that stores Unicode text.
virtual vtkIdType GetLabelId()
Retrieves the current label id.