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 "vtkPointSet.h"
65 #include "vtkRenderingLabelModule.h" // For export macro
66 
67 class vtkAbstractArray;
68 class vtkCamera;
70 class vtkCoordinate;
71 class vtkDataArray;
72 class vtkIntArray;
74 class vtkPoints;
75 class vtkPolyData;
76 class vtkRenderer;
77 class vtkTextProperty;
78 
79 class VTKRENDERINGLABEL_EXPORT vtkLabelHierarchy : public vtkPointSet
80 {
81 public:
82  static vtkLabelHierarchy* New();
84  void PrintSelf(ostream& os, vtkIndent indent) override;
85 
89  void SetPoints(vtkPoints*) override;
90 
94  virtual void ComputeHierarchy();
95 
97 
101  vtkSetMacro(TargetLabelCount, int);
102  vtkGetMacro(TargetLabelCount, int);
104 
106 
109  vtkSetMacro(MaximumDepth, int);
110  vtkGetMacro(MaximumDepth, int);
112 
117  {
121  FRUSTUM
122  };
123 
125 
128  virtual void SetTextProperty(vtkTextProperty* tprop);
129  vtkGetObjectMacro(TextProperty, vtkTextProperty);
131 
133 
136  virtual void SetPriorities(vtkDataArray* arr);
137  vtkGetObjectMacro(Priorities, vtkDataArray);
139 
141 
144  virtual void SetLabels(vtkAbstractArray* arr);
145  vtkGetObjectMacro(Labels, vtkAbstractArray);
147 
149 
152  virtual void SetOrientations(vtkDataArray* arr);
153  vtkGetObjectMacro(Orientations, vtkDataArray);
155 
157 
160  virtual void SetIconIndices(vtkIntArray* arr);
161  vtkGetObjectMacro(IconIndices, vtkIntArray);
163 
165 
168  virtual void SetSizes(vtkDataArray* arr);
169  vtkGetObjectMacro(Sizes, vtkDataArray);
171 
173 
176  virtual void SetBoundedSizes(vtkDataArray* arr);
177  vtkGetObjectMacro(BoundedSizes, vtkDataArray);
179 
193  double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2]);
194 
205  void GetDiscreteNodeCoordinatesFromWorldPoint(int ijk[3], double pt[3], int level);
206 
218  static bool GetPathForNodalCoordinates(int* path, int ijk[3], int level);
219 
221 
224  vtkIdType GetNumberOfCells() override;
225  using vtkDataSet::GetCell;
226  vtkCell* GetCell(vtkIdType) override;
227  void GetCell(vtkIdType, vtkGenericCell*) override;
228  int GetCellType(vtkIdType) override;
229  void GetCellPoints(vtkIdType, vtkIdList*) override;
230  void GetPointCells(vtkIdType, vtkIdList*) override;
231  vtkIdType FindCell(double*, vtkCell*, vtkIdType, double, int&, double*, double*) override;
233  double*, vtkCell*, vtkGenericCell*, vtkIdType, double, int&, double*, double*) override;
234  int GetMaxCellSize() override;
236 
237  class Implementation;
238  Implementation* GetImplementation() { return this->Impl; }
239 
241 
244  vtkGetObjectMacro(CenterPts, vtkPoints);
246 
248 
253  vtkGetObjectMacro(CoincidentPoints, vtkCoincidentPoints);
255 
257 
262  static void GetAnchorFrustumPlanes(
263  double frustumPlanes[24], vtkRenderer* ren, vtkCoordinate* anchorTransform);
265 
266 protected:
268  ~vtkLabelHierarchy() override;
269 
281 
283 
284  friend class vtkLabelHierarchyFrustumIterator;
285  friend class vtkLabelHierarchyFullSortIterator;
286  friend class implementation;
287 
288 private:
289  vtkLabelHierarchy(const vtkLabelHierarchy&) = delete;
290  void operator=(const vtkLabelHierarchy&) = delete;
291 };
292 
293 #endif // vtkLabelHierarchy_h
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkLabelHierarchy::Implementation
Definition: vtkLabelHierarchyPrivate.h:11
vtkPointSet::FindCell
vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Locate cell based on global coordinate x and tolerance squared.
vtkLabelHierarchy::Labels
vtkAbstractArray * Labels
Definition: vtkLabelHierarchy.h:273
vtkLabelHierarchy::Sizes
vtkDataArray * Sizes
Definition: vtkLabelHierarchy.h:276
vtkLabelHierarchy
contains an octree of labels
Definition: vtkLabelHierarchy.h:79
vtkPointSet.h
vtkX3D::type
Definition: vtkX3D.h:522
vtkIdType
int vtkIdType
Definition: vtkType.h:343
vtkLabelHierarchy::Priorities
vtkDataArray * Priorities
Definition: vtkLabelHierarchy.h:272
vtkLabelHierarchy::CenterPts
vtkPoints * CenterPts
Definition: vtkLabelHierarchy.h:279
vtkLabelHierarchy::DEPTH_FIRST
Definition: vtkLabelHierarchy.h:120
vtkLabelHierarchy::FULL_SORT
Definition: vtkLabelHierarchy.h:118
vtkPointSet::SetPoints
virtual void SetPoints(vtkPoints *)
Specify point array to define point coordinates.
vtkLabelHierarchyIterator
iterator over vtkLabelHierarchy
Definition: vtkLabelHierarchyIterator.h:40
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
vtkCoincidentPoints
contains an octree of labels
Definition: vtkCoincidentPoints.h:39
vtkLabelHierarchy::CoincidentPoints
vtkCoincidentPoints * CoincidentPoints
Definition: vtkLabelHierarchy.h:278
vtkX3D::level
Definition: vtkX3D.h:401
vtkPointSet::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkLabelHierarchy::TargetLabelCount
int TargetLabelCount
Definition: vtkLabelHierarchy.h:270
vtkLabelHierarchy::Orientations
vtkDataArray * Orientations
Definition: vtkLabelHierarchy.h:274
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:56
vtkDataSet::GetPointCells
virtual void GetPointCells(vtkIdType ptId, vtkIdList *cellIds)=0
Topological inquiry to get cells using point.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:39
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:45
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:30
vtkCoordinate
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:76
vtkLabelHierarchy::IconIndices
vtkIntArray * IconIndices
Definition: vtkLabelHierarchy.h:275
vtkLabelHierarchy::QUEUE
Definition: vtkLabelHierarchy.h:119
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:75
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:33
vtkDataSet::GetCellPoints
virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)=0
Topological inquiry to get points defining cell.
vtkLabelHierarchy::Impl
Implementation * Impl
Definition: vtkLabelHierarchy.h:282
vtkLabelHierarchy::BoundedSizes
vtkDataArray * BoundedSizes
Definition: vtkLabelHierarchy.h:277
vtkLabelHierarchy::MaximumDepth
int MaximumDepth
Definition: vtkLabelHierarchy.h:271
vtkPointSet
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:62
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:58
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:36
vtkLabelHierarchy::GetImplementation
Implementation * GetImplementation()
Definition: vtkLabelHierarchy.h:238
vtkLabelHierarchy::TextProperty
vtkTextProperty * TextProperty
Definition: vtkLabelHierarchy.h:280
vtkDataSet::GetNumberOfCells
virtual vtkIdType GetNumberOfCells()=0
Determine the number of cells composing the dataset.
VTK_NEWINSTANCE
#define VTK_NEWINSTANCE
Definition: vtkWrappingHints.h:42
vtkDataSet::GetCellType
virtual int GetCellType(vtkIdType cellId)=0
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkLabelHierarchy::IteratorType
IteratorType
Enumeration of iterator types.
Definition: vtkLabelHierarchy.h:116
vtkDataSet::GetMaxCellSize
virtual int GetMaxCellSize()=0
Convenience method returns largest cell size in dataset.
vtkDataObject::New
static vtkDataObject * New()
vtkDataSet::GetCell
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.