VTK
vtkLabelHierarchy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLabelHierarchy.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 -------------------------------------------------------------------------*/
61 #ifndef vtkLabelHierarchy_h
62 #define vtkLabelHierarchy_h
63 
64 #include "vtkRenderingLabelModule.h" // For export macro
65 #include "vtkPointSet.h"
66 
67 class vtkAbstractArray;
68 class vtkCamera;
70 class vtkDataArray;
71 class vtkIntArray;
73 class vtkPoints;
74 class vtkPolyData;
75 class vtkRenderer;
76 class vtkTextProperty;
77 
78 class VTKRENDERINGLABEL_EXPORT vtkLabelHierarchy : public vtkPointSet
79 {
80 public:
81  static vtkLabelHierarchy* New();
83  void PrintSelf( ostream& os, vtkIndent indent ) VTK_OVERRIDE;
84 
88  void SetPoints( vtkPoints* ) VTK_OVERRIDE;
89 
93  virtual void ComputeHierarchy();
94 
96 
100  vtkSetMacro(TargetLabelCount,int);
101  vtkGetMacro(TargetLabelCount,int);
103 
105 
108  vtkSetMacro(MaximumDepth,int);
109  vtkGetMacro(MaximumDepth,int);
111 
119  FRUSTUM
120  };
121 
123 
126  virtual void SetTextProperty(vtkTextProperty* tprop);
127  vtkGetObjectMacro(TextProperty,vtkTextProperty);
129 
131 
134  virtual void SetPriorities(vtkDataArray* arr);
135  vtkGetObjectMacro(Priorities,vtkDataArray);
137 
139 
142  virtual void SetLabels(vtkAbstractArray* arr);
143  vtkGetObjectMacro(Labels,vtkAbstractArray);
145 
147 
150  virtual void SetOrientations(vtkDataArray* arr);
151  vtkGetObjectMacro(Orientations,vtkDataArray);
153 
155 
158  virtual void SetIconIndices(vtkIntArray* arr);
159  vtkGetObjectMacro(IconIndices,vtkIntArray);
161 
163 
166  virtual void SetSizes(vtkDataArray* arr);
167  vtkGetObjectMacro(Sizes,vtkDataArray);
169 
171 
174  virtual void SetBoundedSizes(vtkDataArray* arr);
175  vtkGetObjectMacro(BoundedSizes,vtkDataArray);
177 
190  int type, vtkRenderer* ren, vtkCamera* cam, double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2] );
191 
202  void GetDiscreteNodeCoordinatesFromWorldPoint( int ijk[3], double pt[3], int level );
203 
214  static bool GetPathForNodalCoordinates( int* path, int ijk[3], int level );
215 
217 
220  vtkIdType GetNumberOfCells() VTK_OVERRIDE;
221  using vtkDataSet::GetCell;
222  vtkCell* GetCell(vtkIdType) VTK_OVERRIDE;
223  void GetCell(vtkIdType, vtkGenericCell*) VTK_OVERRIDE;
224  int GetCellType(vtkIdType) VTK_OVERRIDE;
225  void GetCellPoints(vtkIdType, vtkIdList*) VTK_OVERRIDE;
226  void GetPointCells(vtkIdType, vtkIdList*) VTK_OVERRIDE;
227  vtkIdType FindCell(double*, vtkCell*, vtkIdType, double, int&, double*, double*) VTK_OVERRIDE;
228  vtkIdType FindCell(double*, vtkCell*, vtkGenericCell*, vtkIdType, double, int&, double*, double*) VTK_OVERRIDE;
229  int GetMaxCellSize() VTK_OVERRIDE;
231 
232  class Implementation;
233  Implementation* GetImplementation() { return this->Impl; }
234 
236 
239  vtkGetObjectMacro(CenterPts,vtkPoints);
241 
243 
248  vtkGetObjectMacro(CoincidentPoints,vtkCoincidentPoints);
250 
251 protected:
253  ~vtkLabelHierarchy() VTK_OVERRIDE;
254 
255  int TargetLabelCount;
256  int MaximumDepth;
257  vtkDataArray* Priorities;
259  vtkDataArray* Orientations;
260  vtkIntArray* IconIndices;
261  vtkDataArray* Sizes;
262  vtkDataArray* BoundedSizes;
263  vtkCoincidentPoints* CoincidentPoints;
264  vtkPoints* CenterPts;
265  vtkTextProperty* TextProperty;
266 
268 
269  friend class vtkLabelHierarchyFrustumIterator;
270  friend class vtkLabelHierarchyFullSortIterator;
271  friend class implementation;
272 
273 private:
274  vtkLabelHierarchy( const vtkLabelHierarchy& ) VTK_DELETE_FUNCTION;
275  void operator = ( const vtkLabelHierarchy& ) VTK_DELETE_FUNCTION;
276 };
277 
278 #endif // vtkLabelHierarchy_h
iterator over vtkLabelHierarchy
contains an octree of labels
virtual vtkIdType GetNumberOfCells()=0
Determine the number of cells composing the dataset.
static vtkDataObject * New()
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
Abstract superclass for all arrays.
virtual void SetPoints(vtkPoints *)
Specify point array to define point coordinates.
abstract specification for renderers
Definition: vtkRenderer.h:57
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:39
int vtkIdType
Definition: vtkType.h:345
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
provides thread-safe access to cells
abstract class to specify cell behavior
Definition: vtkCell.h:56
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:33
a virtual camera for 3D rendering
Definition: vtkCamera.h:44
list of point or cell ids
Definition: vtkIdList.h:30
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
represent text properties.
#define VTK_NEWINSTANCE
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
contains an octree of labels
IteratorType
Enumeration of iterator types.
represent and manipulate 3D points
Definition: vtkPoints.h:33