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 -------------------------------------------------------------------------*/
64 #ifndef vtkLabelHierarchy_h
65 #define vtkLabelHierarchy_h
66 
67 #include "vtkRenderingLabelModule.h" // For export macro
68 #include "vtkPointSet.h"
69 
70 class vtkAbstractArray;
71 class vtkCamera;
73 class vtkDataArray;
74 class vtkIntArray;
76 class vtkPoints;
77 class vtkPolyData;
78 class vtkRenderer;
79 class vtkTextProperty;
80 
81 class VTKRENDERINGLABEL_EXPORT vtkLabelHierarchy : public vtkPointSet
82 {
83 public:
86  void PrintSelf( ostream& os, vtkIndent indent ) override;
87 
91  void SetPoints( vtkPoints* ) override;
92 
96  virtual void ComputeHierarchy();
97 
99 
103  vtkSetMacro(TargetLabelCount,int);
104  vtkGetMacro(TargetLabelCount,int);
106 
108 
111  vtkSetMacro(MaximumDepth,int);
112  vtkGetMacro(MaximumDepth,int);
114 
122  FRUSTUM
123  };
124 
126 
129  virtual void SetTextProperty(vtkTextProperty* tprop);
130  vtkGetObjectMacro(TextProperty,vtkTextProperty);
132 
134 
137  virtual void SetPriorities(vtkDataArray* arr);
138  vtkGetObjectMacro(Priorities,vtkDataArray);
140 
142 
145  virtual void SetLabels(vtkAbstractArray* arr);
146  vtkGetObjectMacro(Labels,vtkAbstractArray);
148 
150 
153  virtual void SetOrientations(vtkDataArray* arr);
154  vtkGetObjectMacro(Orientations,vtkDataArray);
156 
158 
161  virtual void SetIconIndices(vtkIntArray* arr);
162  vtkGetObjectMacro(IconIndices,vtkIntArray);
164 
166 
169  virtual void SetSizes(vtkDataArray* arr);
170  vtkGetObjectMacro(Sizes,vtkDataArray);
172 
174 
177  virtual void SetBoundedSizes(vtkDataArray* arr);
178  vtkGetObjectMacro(BoundedSizes,vtkDataArray);
180 
193  int type, vtkRenderer* ren, vtkCamera* cam, double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2] );
194 
205  void GetDiscreteNodeCoordinatesFromWorldPoint( int ijk[3], double pt[3], int level );
206 
217  static bool GetPathForNodalCoordinates( int* path, int ijk[3], int level );
218 
220 
224  using vtkDataSet::GetCell;
226  void GetCell(vtkIdType, vtkGenericCell*) override;
227  int GetCellType(vtkIdType) override;
230  vtkIdType FindCell(double*, vtkCell*, vtkIdType, double, int&, double*, double*) override;
231  vtkIdType FindCell(double*, vtkCell*, vtkGenericCell*, vtkIdType, double, int&, double*, double*) override;
232  int GetMaxCellSize() override;
234 
235  class Implementation;
236  Implementation* GetImplementation() { return this->Impl; }
237 
239 
242  vtkGetObjectMacro(CenterPts,vtkPoints);
244 
246 
251  vtkGetObjectMacro(CoincidentPoints,vtkCoincidentPoints);
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 #endif // vtkLabelHierarchy_h
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:40
vtkLabelHierarchy::FindCell
vtkIdType FindCell(double *, vtkCell *, vtkGenericCell *, vtkIdType, double, int &, double *, double *) override
vtkLabelHierarchy::Implementation
Definition: vtkLabelHierarchyPrivate.h:12
vtkLabelHierarchy::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkLabelHierarchy::Labels
vtkAbstractArray * Labels
Definition: vtkLabelHierarchy.h:261
vtkLabelHierarchy::ComputeHierarchy
virtual void ComputeHierarchy()
Fill the hierarchy with the input labels.
vtkLabelHierarchy::Sizes
vtkDataArray * Sizes
Definition: vtkLabelHierarchy.h:264
vtkLabelHierarchy
contains an octree of labels
Definition: vtkLabelHierarchy.h:82
vtkLabelHierarchy::SetPoints
void SetPoints(vtkPoints *) override
Override SetPoints so we can reset the hierarchy when the points change.
vtkPointSet.h
vtkLabelHierarchy::SetBoundedSizes
virtual void SetBoundedSizes(vtkDataArray *arr)
Set/get the array specifying the maximum width and height in world coordinates of each label.
vtkX3D::type
@ type
Definition: vtkX3D.h:516
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkLabelHierarchy::SetSizes
virtual void SetSizes(vtkDataArray *arr)
Set/get the array specifying the size of each label.
vtkLabelHierarchy::Priorities
vtkDataArray * Priorities
Definition: vtkLabelHierarchy.h:260
vtkLabelHierarchy::CenterPts
vtkPoints * CenterPts
Definition: vtkLabelHierarchy.h:267
vtkLabelHierarchy::DEPTH_FIRST
@ DEPTH_FIRST
Definition: vtkLabelHierarchy.h:121
vtkLabelHierarchy::FindCell
vtkIdType FindCell(double *, vtkCell *, vtkIdType, double, int &, double *, double *) override
vtkLabelHierarchy::FULL_SORT
@ FULL_SORT
Definition: vtkLabelHierarchy.h:119
vtkLabelHierarchy::SetPriorities
virtual void SetPriorities(vtkDataArray *arr)
Set/get the array specifying the importance (priority) of each label.
vtkLabelHierarchy::GetDiscreteNodeCoordinatesFromWorldPoint
void GetDiscreteNodeCoordinatesFromWorldPoint(int ijk[3], double pt[3], int level)
Given a depth in the hierarchy (level) and a point pt in world space, compute ijk.
vtkLabelHierarchy::GetCell
vtkCell * GetCell(vtkIdType) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkLabelHierarchyIterator
iterator over vtkLabelHierarchy
Definition: vtkLabelHierarchyIterator.h:41
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkLabelHierarchy::~vtkLabelHierarchy
~vtkLabelHierarchy() override
vtkLabelHierarchy::GetCellPoints
void GetCellPoints(vtkIdType, vtkIdList *) override
Topological inquiry to get points defining cell.
vtkLabelHierarchy::New
static vtkLabelHierarchy * New()
vtkCoincidentPoints
contains an octree of labels
Definition: vtkCoincidentPoints.h:40
vtkLabelHierarchy::NewIterator
vtkLabelHierarchyIterator * NewIterator(int type, vtkRenderer *ren, vtkCamera *cam, double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2])
Returns an iterator for this data object.
vtkLabelHierarchy::CoincidentPoints
vtkCoincidentPoints * CoincidentPoints
Definition: vtkLabelHierarchy.h:266
vtkX3D::level
@ level
Definition: vtkX3D.h:395
vtkLabelHierarchy::TargetLabelCount
int TargetLabelCount
Definition: vtkLabelHierarchy.h:258
vtkLabelHierarchy::GetPathForNodalCoordinates
static bool GetPathForNodalCoordinates(int *path, int ijk[3], int level)
Given a level of the tree and ijk coordinates in a lattice, compute a path down the tree to reach the...
vtkLabelHierarchy::GetCell
void GetCell(vtkIdType, vtkGenericCell *) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkLabelHierarchy::Orientations
vtkDataArray * Orientations
Definition: vtkLabelHierarchy.h:262
vtkLabelHierarchy::GetCellType
int GetCellType(vtkIdType) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:60
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:46
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:51
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:37
vtkLabelHierarchy::IconIndices
vtkIntArray * IconIndices
Definition: vtkLabelHierarchy.h:263
vtkLabelHierarchy::GetPointCells
void GetPointCells(vtkIdType, vtkIdList *) override
Topological inquiry to get cells using point.
vtkLabelHierarchy::QUEUE
@ QUEUE
Definition: vtkLabelHierarchy.h:120
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:79
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:40
vtkLabelHierarchy::Impl
Implementation * Impl
Definition: vtkLabelHierarchy.h:270
vtkLabelHierarchy::SetLabels
virtual void SetLabels(vtkAbstractArray *arr)
Set/get the array specifying the text of each label.
vtkLabelHierarchy::BoundedSizes
vtkDataArray * BoundedSizes
Definition: vtkLabelHierarchy.h:265
vtkLabelHierarchy::MaximumDepth
int MaximumDepth
Definition: vtkLabelHierarchy.h:259
vtkPointSet
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:43
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:40
vtkLabelHierarchy::GetImplementation
Implementation * GetImplementation()
Definition: vtkLabelHierarchy.h:236
vtkLabelHierarchy::SetIconIndices
virtual void SetIconIndices(vtkIntArray *arr)
Set/get the array specifying the icon index of each label.
vtkLabelHierarchy::SetTextProperty
virtual void SetTextProperty(vtkTextProperty *tprop)
The default text property assigned to labels in this hierarchy.
vtkLabelHierarchy::TextProperty
vtkTextProperty * TextProperty
Definition: vtkLabelHierarchy.h:268
VTK_NEWINSTANCE
#define VTK_NEWINSTANCE
Definition: vtkWrappingHints.h:39
vtkLabelHierarchy::GetNumberOfCells
vtkIdType GetNumberOfCells() override
Inherited members (from vtkDataSet)
vtkLabelHierarchy::GetMaxCellSize
int GetMaxCellSize() override
Convenience method returns largest cell size in dataset.
vtkLabelHierarchy::vtkLabelHierarchy
vtkLabelHierarchy()
vtkLabelHierarchy::IteratorType
IteratorType
Enumeration of iterator types.
Definition: vtkLabelHierarchy.h:118
vtkLabelHierarchy::SetOrientations
virtual void SetOrientations(vtkDataArray *arr)
Set/get the array specifying the orientation of each label.
vtkDataSet::GetCell
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.