VTK  9.2.6
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 -------------------------------------------------------------------------*/
64 #ifndef vtkLabelHierarchy_h
65 #define vtkLabelHierarchy_h
66 
67 #include "vtkPointSet.h"
68 #include "vtkRenderingLabelModule.h" // For export macro
69 
70 class vtkAbstractArray;
71 class vtkCamera;
73 class vtkCoordinate;
74 class vtkDataArray;
75 class vtkIntArray;
77 class vtkPoints;
78 class vtkPolyData;
79 class vtkRenderer;
80 class vtkTextProperty;
81 
82 class VTKRENDERINGLABEL_EXPORT vtkLabelHierarchy : public vtkPointSet
83 {
84 public:
85  static vtkLabelHierarchy* New();
87  void PrintSelf(ostream& os, vtkIndent indent) override;
88 
92  void SetPoints(vtkPoints*) override;
93 
97  virtual void ComputeHierarchy();
98 
100 
104  vtkSetMacro(TargetLabelCount, int);
105  vtkGetMacro(TargetLabelCount, int);
107 
109 
112  vtkSetMacro(MaximumDepth, int);
113  vtkGetMacro(MaximumDepth, int);
115 
120  {
124  FRUSTUM
125  };
126 
128 
131  virtual void SetTextProperty(vtkTextProperty* tprop);
132  vtkGetObjectMacro(TextProperty, vtkTextProperty);
134 
136 
139  virtual void SetPriorities(vtkDataArray* arr);
140  vtkGetObjectMacro(Priorities, vtkDataArray);
142 
144 
147  virtual void SetLabels(vtkAbstractArray* arr);
148  vtkGetObjectMacro(Labels, vtkAbstractArray);
150 
152 
155  virtual void SetOrientations(vtkDataArray* arr);
156  vtkGetObjectMacro(Orientations, vtkDataArray);
158 
160 
163  virtual void SetIconIndices(vtkIntArray* arr);
164  vtkGetObjectMacro(IconIndices, vtkIntArray);
166 
168 
171  virtual void SetSizes(vtkDataArray* arr);
172  vtkGetObjectMacro(Sizes, vtkDataArray);
174 
176 
179  virtual void SetBoundedSizes(vtkDataArray* arr);
180  vtkGetObjectMacro(BoundedSizes, vtkDataArray);
182 
196  double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2]);
197 
208  void GetDiscreteNodeCoordinatesFromWorldPoint(int ijk[3], double pt[3], int level);
209 
221  static bool GetPathForNodalCoordinates(int* path, int ijk[3], int level);
222 
224 
227  vtkIdType GetNumberOfCells() override;
228  using vtkDataSet::GetCell;
229  vtkCell* GetCell(vtkIdType) override;
230  void GetCell(vtkIdType, vtkGenericCell*) override;
231  int GetCellType(vtkIdType) override;
232  void GetCellPoints(vtkIdType, vtkIdList*) override;
233  void GetPointCells(vtkIdType, vtkIdList*) override;
234  vtkIdType FindCell(double*, vtkCell*, vtkIdType, double, int&, double*, double*) override;
236  double*, vtkCell*, vtkGenericCell*, vtkIdType, double, int&, double*, double*) override;
237  int GetMaxCellSize() override;
239 
240  class Implementation;
241  Implementation* GetImplementation() { return this->Impl; }
242 
244 
247  vtkGetObjectMacro(CenterPts, vtkPoints);
249 
251 
256  vtkGetObjectMacro(CoincidentPoints, vtkCoincidentPoints);
258 
260 
265  static void GetAnchorFrustumPlanes(
266  double frustumPlanes[24], vtkRenderer* ren, vtkCoordinate* anchorTransform);
268 
269 protected:
271  ~vtkLabelHierarchy() override;
272 
284 
286 
287  friend class vtkLabelHierarchyFrustumIterator;
288  friend class vtkLabelHierarchyFullSortIterator;
289  friend class implementation;
290 
291 private:
292  vtkLabelHierarchy(const vtkLabelHierarchy&) = delete;
293  void operator=(const vtkLabelHierarchy&) = delete;
294 };
295 
296 #endif // vtkLabelHierarchy_h
iterator over vtkLabelHierarchy
contains an octree of labels
vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
See vtkDataSet for additional information.
Abstract superclass for all arrays.
virtual void SetPoints(vtkPoints *)
Specify point array to define point coordinates.
vtkAbstractArray * Labels
vtkDataArray * Priorities
void GetCellPoints(vtkIdType, vtkIdList *idList) override
Topological inquiry to get points defining cell.
Definition: vtkPointSet.h:145
vtkCoincidentPoints * CoincidentPoints
vtkDataArray * Sizes
abstract specification for renderers
Definition: vtkRenderer.h:72
concrete class for storing a set of points
Definition: vtkPointSet.h:69
vtkIdType GetNumberOfCells() override
This method always returns 0, as there are no cells in a vtkPointSet.
Definition: vtkPointSet.h:129
int vtkIdType
Definition: vtkType.h:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
int GetCellType(vtkIdType) override
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:158
provides thread-safe access to cells
abstract class to specify cell behavior
Definition: vtkCell.h:60
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:45
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
a simple class to control print indentation
Definition: vtkIndent.h:39
a virtual camera for 3D rendering
Definition: vtkCamera.h:51
static vtkPointSet * New()
Standard instantiation method.
list of point or cell ids
Definition: vtkIdList.h:33
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
represent text properties.
vtkDataArray * Orientations
#define VTK_NEWINSTANCE
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:79
Implementation * Impl
int GetMaxCellSize() override
This method always returns 0, as there are no cells in a vtkPointSet.
Definition: vtkPointSet.h:130
vtkIntArray * IconIndices
void GetPointCells(vtkIdType, vtkIdList *idList) override
Topological inquiry to get cells using point.
Definition: vtkPointSet.h:146
vtkDataArray * BoundedSizes
contains an octree of labels
vtkCell * GetCell(vtkIdType) override
This method always return a vtkEmptyCell, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:138
IteratorType
Enumeration of iterator types.
vtkTextProperty * TextProperty
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
represent and manipulate 3D points
Definition: vtkPoints.h:39
Implementation * GetImplementation()