VTK  9.3.1
vtkLabelHierarchy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
48 #ifndef vtkLabelHierarchy_h
49 #define vtkLabelHierarchy_h
50 
51 #include "vtkPointSet.h"
52 #include "vtkRenderingLabelModule.h" // For export macro
53 
54 VTK_ABI_NAMESPACE_BEGIN
55 class vtkAbstractArray;
56 class vtkCamera;
58 class vtkCoordinate;
59 class vtkDataArray;
60 class vtkIntArray;
62 class vtkPoints;
63 class vtkPolyData;
64 class vtkRenderer;
65 class vtkTextProperty;
66 
67 class VTKRENDERINGLABEL_EXPORT vtkLabelHierarchy : public vtkPointSet
68 {
69 public:
70  static vtkLabelHierarchy* New();
72  void PrintSelf(ostream& os, vtkIndent indent) override;
73 
77  void SetPoints(vtkPoints*) override;
78 
82  virtual void ComputeHierarchy();
83 
85 
89  vtkSetMacro(TargetLabelCount, int);
90  vtkGetMacro(TargetLabelCount, int);
92 
94 
97  vtkSetMacro(MaximumDepth, int);
98  vtkGetMacro(MaximumDepth, int);
100 
105  {
109  FRUSTUM
110  };
111 
113 
116  virtual void SetTextProperty(vtkTextProperty* tprop);
117  vtkGetObjectMacro(TextProperty, vtkTextProperty);
119 
121 
124  virtual void SetPriorities(vtkDataArray* arr);
125  vtkGetObjectMacro(Priorities, vtkDataArray);
127 
129 
132  virtual void SetLabels(vtkAbstractArray* arr);
133  vtkGetObjectMacro(Labels, vtkAbstractArray);
135 
137 
140  virtual void SetOrientations(vtkDataArray* arr);
141  vtkGetObjectMacro(Orientations, vtkDataArray);
143 
145 
148  virtual void SetIconIndices(vtkIntArray* arr);
149  vtkGetObjectMacro(IconIndices, vtkIntArray);
151 
153 
156  virtual void SetSizes(vtkDataArray* arr);
157  vtkGetObjectMacro(Sizes, vtkDataArray);
159 
161 
164  virtual void SetBoundedSizes(vtkDataArray* arr);
165  vtkGetObjectMacro(BoundedSizes, vtkDataArray);
167 
181  double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2]);
182 
193  void GetDiscreteNodeCoordinatesFromWorldPoint(int ijk[3], double pt[3], int level);
194 
206  static bool GetPathForNodalCoordinates(int* path, int ijk[3], int level);
207 
209 
212  vtkIdType GetNumberOfCells() override;
213  using vtkDataSet::GetCell;
214  vtkCell* GetCell(vtkIdType) override;
215  void GetCell(vtkIdType, vtkGenericCell*) override;
216  int GetCellType(vtkIdType) override;
217  void GetCellPoints(vtkIdType, vtkIdList*) override;
218  void GetPointCells(vtkIdType, vtkIdList*) override;
219  vtkIdType FindCell(double*, vtkCell*, vtkIdType, double, int&, double*, double*) override;
221  double*, vtkCell*, vtkGenericCell*, vtkIdType, double, int&, double*, double*) override;
222  int GetMaxCellSize() override;
224 
225  class Implementation;
226  Implementation* GetImplementation() { return this->Impl; }
227 
229 
232  vtkGetObjectMacro(CenterPts, vtkPoints);
234 
236 
241  vtkGetObjectMacro(CoincidentPoints, vtkCoincidentPoints);
243 
245 
250  static void GetAnchorFrustumPlanes(
251  double frustumPlanes[24], vtkRenderer* ren, vtkCoordinate* anchorTransform);
253 
254 protected:
256  ~vtkLabelHierarchy() override;
257 
269 
271 
272  friend class vtkLabelHierarchyFrustumIterator;
273  friend class vtkLabelHierarchyFullSortIterator;
274  friend class implementation;
275 
276 private:
277  vtkLabelHierarchy(const vtkLabelHierarchy&) = delete;
278  void operator=(const vtkLabelHierarchy&) = delete;
279 };
280 
281 VTK_ABI_NAMESPACE_END
282 #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:139
vtkCoincidentPoints * CoincidentPoints
vtkDataArray * Sizes
abstract specification for renderers
Definition: vtkRenderer.h:61
concrete class for storing a set of points
Definition: vtkPointSet.h:58
vtkIdType GetNumberOfCells() override
This method always returns 0, as there are no cells in a vtkPointSet.
Definition: vtkPointSet.h:123
int vtkIdType
Definition: vtkType.h:315
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
int GetCellType(vtkIdType) override
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:152
provides thread-safe access to cells
abstract class to specify cell behavior
Definition: vtkCell.h:49
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:34
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
a simple class to control print indentation
Definition: vtkIndent.h:28
a virtual camera for 3D rendering
Definition: vtkCamera.h:40
static vtkPointSet * New()
Standard instantiation method.
list of point or cell ids
Definition: vtkIdList.h:22
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
represent text properties.
vtkDataArray * Orientations
#define VTK_NEWINSTANCE
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:68
Implementation * Impl
int GetMaxCellSize() override
This method always returns 0, as there are no cells in a vtkPointSet.
Definition: vtkPointSet.h:124
vtkIntArray * IconIndices
void GetPointCells(vtkIdType, vtkIdList *idList) override
Topological inquiry to get cells using point.
Definition: vtkPointSet.h:140
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.
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:28
Implementation * GetImplementation()