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 -------------------------------------------------------------------------*/
63 #ifndef vtkLabelHierarchy_h
64 #define vtkLabelHierarchy_h
65 
66 #include "vtkRenderingLabelModule.h" // For export macro
67 #include "vtkPointSet.h"
68 
69 class vtkAbstractArray;
70 class vtkCamera;
72 class vtkDataArray;
73 class vtkIntArray;
75 class vtkPoints;
76 class vtkPolyData;
77 class vtkRenderer;
78 class vtkTextProperty;
79 
81 {
82 public:
83  static vtkLabelHierarchy* New();
85  virtual void PrintSelf( ostream& os, vtkIndent indent );
86 
89  virtual void SetPoints( vtkPoints* );
90 
92  virtual void ComputeHierarchy();
93 
95 
97  vtkSetMacro(TargetLabelCount,int);
98  vtkGetMacro(TargetLabelCount,int);
100 
102 
103  vtkSetMacro(MaximumDepth,int);
104  vtkGetMacro(MaximumDepth,int);
106 
107  //BTX
109 
114  FRUSTUM
115  };
116  //ETX
118 
120 
121  virtual void SetTextProperty(vtkTextProperty* tprop);
122  vtkGetObjectMacro(TextProperty,vtkTextProperty);
124 
126 
127  virtual void SetPriorities(vtkDataArray* arr);
128  vtkGetObjectMacro(Priorities,vtkDataArray);
130 
132 
133  virtual void SetLabels(vtkAbstractArray* arr);
134  vtkGetObjectMacro(Labels,vtkAbstractArray);
136 
138 
139  virtual void SetOrientations(vtkDataArray* arr);
140  vtkGetObjectMacro(Orientations,vtkDataArray);
142 
144 
145  virtual void SetIconIndices(vtkIntArray* arr);
146  vtkGetObjectMacro(IconIndices,vtkIntArray);
148 
150 
151  virtual void SetSizes(vtkDataArray* arr);
152  vtkGetObjectMacro(Sizes,vtkDataArray);
154 
156 
158  virtual void SetBoundedSizes(vtkDataArray* arr);
159  vtkGetObjectMacro(BoundedSizes,vtkDataArray);
161 
162  //BTX
164 
173  vtkLabelHierarchyIterator* NewIterator(
174  int type, vtkRenderer* ren, vtkCamera* cam, double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2] );
175  //ETX
177 
187  void GetDiscreteNodeCoordinatesFromWorldPoint( int ijk[3], double pt[3], int level );
188 
197  static bool GetPathForNodalCoordinates( int* path, int ijk[3], int level );
198 
200 
201  virtual vtkIdType GetNumberOfCells();
202  virtual vtkCell* GetCell(vtkIdType);
203  virtual void GetCell(vtkIdType, vtkGenericCell*);
204  virtual int GetCellType(vtkIdType);
205  virtual void GetCellPoints(vtkIdType, vtkIdList*);
206  virtual void GetPointCells(vtkIdType, vtkIdList*);
207  virtual vtkIdType FindCell(double*, vtkCell*, vtkIdType, double, int&, double*, double*);
208  virtual vtkIdType FindCell(double*, vtkCell*, vtkGenericCell*, vtkIdType, double, int&, double*, double*);
209  virtual int GetMaxCellSize();
211 
212  //BTX
213  class Implementation;
214  Implementation* GetImplementation() { return this->Impl; }
215  //ETX
216 
218 
219  vtkGetObjectMacro(CenterPts,vtkPoints);
221 
223 
226  vtkGetObjectMacro(CoincidentPoints,vtkCoincidentPoints);
228 
229 protected:
231  virtual ~vtkLabelHierarchy();
232 
244 
245  //BTX
247 
248  friend class vtkLabelHierarchyFrustumIterator;
249  friend class vtkLabelHierarchyFullSortIterator;
250  friend class implementation;
251  //ETX
252 
253 private:
254  vtkLabelHierarchy( const vtkLabelHierarchy& ); // Not implemented.
255  void operator = ( const vtkLabelHierarchy& ); // Not implemented.
256 };
257 
258 #endif // vtkLabelHierarchy_h
iterator over vtkLabelHierarchy
contains an octree of labels
virtual vtkIdType GetNumberOfCells()=0
virtual void GetPointCells(vtkIdType ptId, vtkIdList *cellIds)=0
static vtkDataObject * New()
Abstract superclass for all arrays.
virtual void SetPoints(vtkPoints *)
vtkAbstractArray * Labels
vtkDataArray * Priorities
vtkCoincidentPoints * CoincidentPoints
vtkDataArray * Sizes
abstract specification for renderers
Definition: vtkRenderer.h:63
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:44
int vtkIdType
Definition: vtkType.h:275
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
provides thread-safe access to cells
abstract class to specify cell behavior
Definition: vtkCell.h:61
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:49
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKRENDERINGLABEL_EXPORT
virtual int GetMaxCellSize()=0
a virtual camera for 3D rendering
Definition: vtkCamera.h:48
list of point or cell ids
Definition: vtkIdList.h:35
virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)=0
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
represent text properties.
vtkDataArray * Orientations
void PrintSelf(ostream &os, vtkIndent indent)
Implementation * Impl
vtkIntArray * IconIndices
vtkDataArray * BoundedSizes
contains an octree of labels
virtual vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)
vtkTextProperty * TextProperty
virtual vtkCell * GetCell(vtkIdType cellId)=0
represent and manipulate 3D points
Definition: vtkPoints.h:38
virtual int GetCellType(vtkIdType cellId)=0
Implementation * GetImplementation()