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
71class vtkCamera;
73class vtkDataArray;
74class vtkIntArray;
76class vtkPoints;
77class vtkPolyData;
78class vtkRenderer;
79class vtkTextProperty;
80
81class VTKRENDERINGLABEL_EXPORT vtkLabelHierarchy : public vtkPointSet
82{
83public:
86 virtual void PrintSelf( ostream& os, vtkIndent indent );
87
91 virtual void SetPoints( vtkPoints* );
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
226 virtual int GetCellType(vtkIdType);
229 virtual vtkIdType FindCell(double*, vtkCell*, vtkIdType, double, int&, double*, double*);
230 virtual vtkIdType FindCell(double*, vtkCell*, vtkGenericCell*, vtkIdType, double, int&, double*, double*);
231 virtual int GetMaxCellSize();
233
234 class Implementation;
235 Implementation* GetImplementation() { return this->Impl; }
236
238
241 vtkGetObjectMacro(CenterPts,vtkPoints);
243
245
250 vtkGetObjectMacro(CoincidentPoints,vtkCoincidentPoints);
252
253protected:
256
268
270
271 friend class vtkLabelHierarchyFrustumIterator;
272 friend class vtkLabelHierarchyFullSortIterator;
273 friend class implementation;
274
275private:
276 vtkLabelHierarchy( const vtkLabelHierarchy& ) VTK_DELETE_FUNCTION;
277 void operator = ( const vtkLabelHierarchy& ) VTK_DELETE_FUNCTION;
278};
279
280#endif // vtkLabelHierarchy_h
Abstract superclass for all arrays.
a virtual camera for 3D rendering
Definition: vtkCamera.h:51
abstract class to specify cell behavior
Definition: vtkCell.h:60
contains an octree of labels
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
provides thread-safe access to cells
list of point or cell ids
Definition: vtkIdList.h:37
a simple class to control print indentation
Definition: vtkIndent.h:40
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:46
iterator over vtkLabelHierarchy
contains an octree of labels
virtual void SetPriorities(vtkDataArray *arr)
Set/get the array specifying the importance (priority) of each label.
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...
vtkDataArray * Priorities
virtual void SetBoundedSizes(vtkDataArray *arr)
Set/get the array specifying the maximum width and height in world coordinates of each label.
virtual void SetTextProperty(vtkTextProperty *tprop)
The default text property assigned to labels in this hierarchy.
virtual void GetCell(vtkIdType, vtkGenericCell *)
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
virtual void GetPointCells(vtkIdType, vtkIdList *)
Topological inquiry to get cells using point.
Implementation * Impl
virtual void SetOrientations(vtkDataArray *arr)
Set/get the array specifying the orientation of each label.
virtual vtkIdType GetNumberOfCells()
Inherited members (from vtkDataSet)
virtual vtkIdType FindCell(double *, vtkCell *, vtkGenericCell *, vtkIdType, double, int &, double *, double *)
virtual ~vtkLabelHierarchy()
IteratorType
Enumeration of iterator types.
virtual void SetIconIndices(vtkIntArray *arr)
Set/get the array specifying the icon index of each label.
virtual vtkIdType FindCell(double *, vtkCell *, vtkIdType, double, int &, double *, double *)
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkDataArray * Sizes
virtual int GetCellType(vtkIdType)
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
virtual void SetLabels(vtkAbstractArray *arr)
Set/get the array specifying the text of each label.
vtkTextProperty * TextProperty
vtkCoincidentPoints * CoincidentPoints
virtual void SetSizes(vtkDataArray *arr)
Set/get the array specifying the size of each label.
vtkDataArray * BoundedSizes
virtual void ComputeHierarchy()
Fill the hierarchy with the input labels.
virtual int GetMaxCellSize()
Convenience method returns largest cell size in dataset.
vtkAbstractArray * Labels
vtkIntArray * IconIndices
virtual void GetCellPoints(vtkIdType, vtkIdList *)
Topological inquiry to get points defining cell.
static vtkLabelHierarchy * New()
virtual vtkCell * GetCell(vtkIdType)
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkDataArray * Orientations
Implementation * GetImplementation()
VTK_NEWINSTANCE vtkLabelHierarchyIterator * NewIterator(int type, vtkRenderer *ren, vtkCamera *cam, double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2])
Returns an iterator for this data object.
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.
virtual void SetPoints(vtkPoints *)
Override SetPoints so we can reset the hierarchy when the points change.
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:43
represent and manipulate 3D points
Definition: vtkPoints.h:40
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
abstract specification for renderers
Definition: vtkRenderer.h:64
represent text properties.
@ level
Definition: vtkX3D.h:395
@ type
Definition: vtkX3D.h:516
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287
#define VTK_NEWINSTANCE