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 ) override;
84 
88  void SetPoints( vtkPoints* ) 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() override;
221  using vtkDataSet::GetCell;
222  vtkCell* GetCell(vtkIdType) override;
223  void GetCell(vtkIdType, vtkGenericCell*) override;
224  int GetCellType(vtkIdType) override;
225  void GetCellPoints(vtkIdType, vtkIdList*) override;
226  void GetPointCells(vtkIdType, vtkIdList*) override;
227  vtkIdType FindCell(double*, vtkCell*, vtkIdType, double, int&, double*, double*) override;
228  vtkIdType FindCell(double*, vtkCell*, vtkGenericCell*, vtkIdType, double, int&, double*, double*) override;
229  int GetMaxCellSize() 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() override;
254 
266 
268 
269  friend class vtkLabelHierarchyFrustumIterator;
270  friend class vtkLabelHierarchyFullSortIterator;
271  friend class implementation;
272 
273 private:
274  vtkLabelHierarchy( const vtkLabelHierarchy& ) = delete;
275  void operator = ( const vtkLabelHierarchy& ) = delete;
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.
virtual void GetPointCells(vtkIdType ptId, vtkIdList *cellIds)=0
Topological inquiry to get cells using point.
vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
See vtkDataSet for additional information.
static vtkDataObject * New()
Abstract superclass for all arrays.
virtual void SetPoints(vtkPoints *)
Specify point array to define point coordinates.
vtkAbstractArray * Labels
vtkDataArray * Priorities
vtkCoincidentPoints * CoincidentPoints
vtkDataArray * Sizes
abstract specification for renderers
Definition: vtkRenderer.h:57
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:39
int vtkIdType
Definition: vtkType.h:347
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
virtual int GetMaxCellSize()=0
Convenience method returns largest cell size in dataset.
a virtual camera for 3D rendering
Definition: vtkCamera.h:44
list of point or cell ids
Definition: vtkIdList.h:30
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:48
represent text properties.
vtkDataArray * Orientations
#define VTK_NEWINSTANCE
Implementation * Impl
vtkIntArray * IconIndices
vtkDataArray * BoundedSizes
contains an octree of labels
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:33
virtual int GetCellType(vtkIdType cellId)=0
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
Implementation * GetImplementation()