VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
54 
55 VTK_ABI_NAMESPACE_BEGIN
56 class vtkAbstractArray;
57 class vtkCamera;
59 class vtkCoordinate;
60 class vtkDataArray;
61 class vtkIntArray;
63 class vtkPoints;
64 class vtkPolyData;
65 class vtkRenderer;
66 class vtkTextProperty;
67 
68 class VTKRENDERINGLABEL_EXPORT VTK_MARSHALAUTO vtkLabelHierarchy : public vtkPointSet
69 {
70 public:
71  static vtkLabelHierarchy* New();
73  void PrintSelf(ostream& os, vtkIndent indent) override;
74 
78  void SetPoints(vtkPoints*) override;
79 
83  virtual void ComputeHierarchy();
84 
86 
90  vtkSetMacro(TargetLabelCount, int);
91  vtkGetMacro(TargetLabelCount, int);
93 
95 
98  virtual void SetMaximumDepth(int depth);
99  vtkGetMacro(MaximumDepth, int);
101 
106  {
110  FRUSTUM
111  };
112 
114 
117  virtual void SetTextProperty(vtkTextProperty* tprop);
118  vtkGetObjectMacro(TextProperty, vtkTextProperty);
120 
122 
125  virtual void SetPriorities(vtkDataArray* arr);
126  vtkGetObjectMacro(Priorities, vtkDataArray);
128 
130 
133  virtual void SetLabels(vtkAbstractArray* arr);
134  vtkGetObjectMacro(Labels, vtkAbstractArray);
136 
138 
141  virtual void SetOrientations(vtkDataArray* arr);
142  vtkGetObjectMacro(Orientations, vtkDataArray);
144 
146 
149  virtual void SetIconIndices(vtkIntArray* arr);
150  vtkGetObjectMacro(IconIndices, vtkIntArray);
152 
154 
157  virtual void SetSizes(vtkDataArray* arr);
158  vtkGetObjectMacro(Sizes, vtkDataArray);
160 
162 
165  virtual void SetBoundedSizes(vtkDataArray* arr);
166  vtkGetObjectMacro(BoundedSizes, vtkDataArray);
168 
182  double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2]);
183 
194  void GetDiscreteNodeCoordinatesFromWorldPoint(int ijk[3], double pt[3], int level);
195 
207  static bool GetPathForNodalCoordinates(int* path, int ijk[3], int level);
208 
210 
213  vtkIdType GetNumberOfCells() override;
214  using vtkDataSet::GetCell;
215  vtkCell* GetCell(vtkIdType) override;
216  void GetCell(vtkIdType, vtkGenericCell*) override;
217  int GetCellType(vtkIdType) override;
219  void GetCellPoints(vtkIdType, vtkIdList*) override;
220  void GetPointCells(vtkIdType, vtkIdList*) override;
221  using Superclass::FindCell;
223  double*, vtkCell*, vtkGenericCell*, vtkIdType, double, int&, double*, double*) override;
224  int GetMaxCellSize() override;
226 
227  class Implementation;
228  Implementation* GetImplementation() { return this->Impl; }
229 
231 
234  vtkGetObjectMacro(CenterPts, vtkPoints);
236 
238 
243  vtkGetObjectMacro(CoincidentPoints, vtkCoincidentPoints);
245 
247 
252  static void GetAnchorFrustumPlanes(
253  double frustumPlanes[24], vtkRenderer* ren, vtkCoordinate* anchorTransform);
255 
256 protected:
258  ~vtkLabelHierarchy() override;
259 
271 
273 
274  friend class vtkLabelHierarchyFrustumIterator;
275  friend class vtkLabelHierarchyFullSortIterator;
276  friend class implementation;
277 
278 private:
279  vtkLabelHierarchy(const vtkLabelHierarchy&) = delete;
280  void operator=(const vtkLabelHierarchy&) = delete;
281 };
282 
283 VTK_ABI_NAMESPACE_END
284 #endif // vtkLabelHierarchy_h
iterator over vtkLabelHierarchy
contains an octree of labels
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:137
vtkCoincidentPoints * CoincidentPoints
vtkDataArray * Sizes
abstract specification for renderers
Definition: vtkRenderer.h:63
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:121
int vtkIdType
Definition: vtkType.h:363
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:71
int GetCellType(vtkIdType) override
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:150
provides thread-safe access to cells
abstract class to specify cell behavior
Definition: vtkCell.h:50
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:35
vtkIdType FindCell(double x[3], vtkCell *cell, vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
See vtkDataSet for additional information.
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:41
static vtkPointSet * New()
Standard instantiation method.
list of point or cell ids
Definition: vtkIdList.h:25
virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)=0
Topological inquiry to get points defining cell.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
virtual vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)
Locate cell based on global coordinate x and tolerance squared.
represent text properties.
vtkDataArray * Orientations
#define VTK_NEWINSTANCE
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:69
Implementation * Impl
int GetMaxCellSize() override
This method always returns 0, as there are no cells in a vtkPointSet.
Definition: vtkPointSet.h:122
vtkIntArray * IconIndices
void GetPointCells(vtkIdType, vtkIdList *idList) override
Topological inquiry to get cells using point.
Definition: vtkPointSet.h:138
vtkDataArray * BoundedSizes
contains an octree of labels
#define VTK_MARSHALAUTO
vtkCell * GetCell(vtkIdType) override
This method always return a vtkEmptyCell, as there is no cell in a vtkPointSet.
A cell is otherwise valid but has coincident points.
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:30
Implementation * GetImplementation()