VTK
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkLabelHierarchy Class Reference

contains an octree of labels More...

#include <vtkLabelHierarchy.h>

Inheritance diagram for vtkLabelHierarchy:
[legend]
Collaboration diagram for vtkLabelHierarchy:
[legend]

Classes

class  Implementation
 

Public Types

typedef vtkPointSet Superclass
 
enum  IteratorType { FULL_SORT, QUEUE, DEPTH_FIRST, FRUSTUM }
 
- Public Types inherited from vtkPointSet
typedef vtkDataSet Superclass
 
- Public Types inherited from vtkDataSet
enum  FieldDataType { DATA_OBJECT_FIELD =0, POINT_DATA_FIELD =1, CELL_DATA_FIELD =2 }
 
typedef vtkDataObject Superclass
 
- Public Types inherited from vtkDataObject
typedef vtkObject Superclass
 
enum  FieldAssociations {
  FIELD_ASSOCIATION_POINTS, FIELD_ASSOCIATION_CELLS, FIELD_ASSOCIATION_NONE, FIELD_ASSOCIATION_POINTS_THEN_CELLS,
  FIELD_ASSOCIATION_VERTICES, FIELD_ASSOCIATION_EDGES, FIELD_ASSOCIATION_ROWS, NUMBER_OF_ASSOCIATIONS
}
 
enum  AttributeTypes {
  POINT, CELL, FIELD, POINT_THEN_CELL,
  VERTEX, EDGE, ROW, NUMBER_OF_ATTRIBUTE_TYPES
}
 
enum  FieldOperations { FIELD_OPERATION_PRESERVED, FIELD_OPERATION_REINTERPOLATED, FIELD_OPERATION_MODIFIED, FIELD_OPERATION_REMOVED }
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkLabelHierarchyNewInstance () const
 
virtual void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void SetPoints (vtkPoints *)
 
virtual void ComputeHierarchy ()
 
void GetDiscreteNodeCoordinatesFromWorldPoint (int ijk[3], double pt[3], int level)
 
ImplementationGetImplementation ()
 
virtual void SetTargetLabelCount (int)
 
virtual int GetTargetLabelCount ()
 
virtual void SetMaximumDepth (int)
 
virtual int GetMaximumDepth ()
 
virtual void SetTextProperty (vtkTextProperty *tprop)
 
virtual vtkTextPropertyGetTextProperty ()
 
virtual void SetPriorities (vtkDataArray *arr)
 
virtual vtkDataArrayGetPriorities ()
 
virtual void SetLabels (vtkAbstractArray *arr)
 
virtual vtkAbstractArrayGetLabels ()
 
virtual void SetOrientations (vtkDataArray *arr)
 
virtual vtkDataArrayGetOrientations ()
 
virtual void SetIconIndices (vtkIntArray *arr)
 
virtual vtkIntArrayGetIconIndices ()
 
virtual void SetSizes (vtkDataArray *arr)
 
virtual vtkDataArrayGetSizes ()
 
virtual void SetBoundedSizes (vtkDataArray *arr)
 
virtual vtkDataArrayGetBoundedSizes ()
 
vtkLabelHierarchyIteratorNewIterator (int type, vtkRenderer *ren, vtkCamera *cam, double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2])
 
virtual vtkIdType GetNumberOfCells ()
 
virtual vtkCellGetCell (vtkIdType)
 
virtual void GetCell (vtkIdType, vtkGenericCell *)
 
virtual int GetCellType (vtkIdType)
 
virtual void GetCellPoints (vtkIdType, vtkIdList *)
 
virtual void GetPointCells (vtkIdType, vtkIdList *)
 
virtual vtkIdType FindCell (double *, vtkCell *, vtkIdType, double, int &, double *, double *)
 
virtual vtkIdType FindCell (double *, vtkCell *, vtkGenericCell *, vtkIdType, double, int &, double *, double *)
 
virtual int GetMaxCellSize ()
 
virtual vtkPointsGetCenterPts ()
 
virtual vtkCoincidentPointsGetCoincidentPoints ()
 
- Public Member Functions inherited from vtkPointSet
vtkPointSetNewInstance () const
 
void Initialize ()
 
void CopyStructure (vtkDataSet *pd)
 
vtkCellIteratorNewCellIterator ()
 
unsigned long GetMTime ()
 
void ComputeBounds ()
 
void Squeeze ()
 
unsigned long GetActualMemorySize ()
 
vtkIdType GetNumberOfPoints ()
 
doubleGetPoint (vtkIdType ptId)
 
void GetPoint (vtkIdType ptId, double x[3])
 
virtual vtkIdType FindPoint (double x[3])
 
vtkIdType FindPoint (double x, double y, double z)
 
virtual vtkIdType FindCell (double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)
 
virtual vtkIdType FindCell (double x[3], vtkCell *cell, vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)
 
virtual vtkPointsGetPoints ()
 
void ShallowCopy (vtkDataObject *src)
 
void DeepCopy (vtkDataObject *src)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
- Public Member Functions inherited from vtkDataSet
vtkDataSetNewInstance () const
 
virtual void CopyAttributes (vtkDataSet *ds)
 
virtual void GetCellBounds (vtkIdType cellId, double bounds[6])
 
virtual void GetCellTypes (vtkCellTypes *types)
 
vtkCellDataGetCellData ()
 
vtkPointDataGetPointData ()
 
doubleGetBounds ()
 
void GetBounds (double bounds[6])
 
doubleGetCenter ()
 
void GetCenter (double center[3])
 
double GetLength ()
 
virtual void GetScalarRange (double range[2])
 
doubleGetScalarRange ()
 
int CheckAttributes ()
 
virtual vtkFieldDataGetAttributesAsFieldData (int type)
 
virtual vtkIdType GetNumberOfElements (int type)
 
bool HasAnyGhostCells ()
 
bool HasAnyGhostPoints ()
 
vtkUnsignedCharArrayGetPointGhostArray ()
 
void UpdatePointGhostArrayCache ()
 
vtkUnsignedCharArrayAllocatePointGhostArray ()
 
vtkUnsignedCharArrayGetCellGhostArray ()
 
void UpdateCellGhostArrayCache ()
 
vtkUnsignedCharArrayAllocateCellGhostArray ()
 
virtual void GetCellNeighbors (vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds)
 
vtkIdType FindPoint (double x, double y, double z)
 
virtual vtkCellFindAndGetCell (double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)
 
int GetDataObjectType ()
 
virtual void GenerateGhostArray (int zeroExt[6])
 
virtual void GenerateGhostArray (int zeroExt[6], bool cellOnly)
 
virtual bool HasAnyBlankCells ()
 
virtual bool HasAnyBlankPoints ()
 
- Public Member Functions inherited from vtkDataObject
vtkDataObjectNewInstance () const
 
void ReleaseData ()
 
unsigned long GetUpdateTime ()
 
virtual void CopyInformationToPipeline (vtkInformation *vtkNotUsed(info))
 
void DataHasBeenGenerated ()
 
virtual void PrepareForNewData ()
 
virtual int GetExtentType ()
 
virtual void Crop (const int *updateExtent)
 
virtual vtkDataSetAttributesGetAttributes (int type)
 
virtual int GetAttributeTypeForArray (vtkAbstractArray *arr)
 
virtual vtkInformationGetInformation ()
 
virtual void SetInformation (vtkInformation *)
 
virtual int GetDataReleased ()
 
virtual void SetFieldData (vtkFieldData *)
 
virtual vtkFieldDataGetFieldData ()
 
virtual void CopyInformationFromPipeline (vtkInformation *vtkNotUsed(info))
 
void GlobalReleaseDataFlagOn ()
 
void GlobalReleaseDataFlagOff ()
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkLabelHierarchyNew ()
 
static int IsTypeOf (const char *type)
 
static vtkLabelHierarchySafeDownCast (vtkObjectBase *o)
 
static bool GetPathForNodalCoordinates (int *path, int ijk[3], int level)
 
- Static Public Member Functions inherited from vtkPointSet
static int IsTypeOf (const char *type)
 
static vtkPointSetSafeDownCast (vtkObjectBase *o)
 
static vtkPointSetGetData (vtkInformation *info)
 
static vtkPointSetGetData (vtkInformationVector *v, int i=0)
 
- Static Public Member Functions inherited from vtkDataSet
static int IsTypeOf (const char *type)
 
static vtkDataSetSafeDownCast (vtkObjectBase *o)
 
static vtkDataSetGetData (vtkInformation *info)
 
static vtkDataSetGetData (vtkInformationVector *v, int i=0)
 
- Static Public Member Functions inherited from vtkDataObject
static vtkDataObjectNew ()
 
static int IsTypeOf (const char *type)
 
static vtkDataObjectSafeDownCast (vtkObjectBase *o)
 
static const char * GetAssociationTypeAsString (int associationType)
 
static int GetAssociationTypeFromString (const char *associationType)
 
static vtkInformationStringKeyDATA_TYPE_NAME ()
 
static vtkInformationDataObjectKeyDATA_OBJECT ()
 
static vtkInformationIntegerKeyDATA_EXTENT_TYPE ()
 
static vtkInformationIntegerPointerKeyDATA_EXTENT ()
 
static vtkInformationIntegerVectorKeyALL_PIECES_EXTENT ()
 
static vtkInformationIntegerKeyDATA_PIECE_NUMBER ()
 
static vtkInformationIntegerKeyDATA_NUMBER_OF_PIECES ()
 
static vtkInformationIntegerKeyDATA_NUMBER_OF_GHOST_LEVELS ()
 
static vtkInformationDoubleKeyDATA_TIME_STEP ()
 
static vtkInformationInformationVectorKeyPOINT_DATA_VECTOR ()
 
static vtkInformationInformationVectorKeyCELL_DATA_VECTOR ()
 
static vtkInformationInformationVectorKeyVERTEX_DATA_VECTOR ()
 
static vtkInformationInformationVectorKeyEDGE_DATA_VECTOR ()
 
static vtkInformationIntegerKeyFIELD_ARRAY_TYPE ()
 
static vtkInformationIntegerKeyFIELD_ASSOCIATION ()
 
static vtkInformationIntegerKeyFIELD_ATTRIBUTE_TYPE ()
 
static vtkInformationIntegerKeyFIELD_ACTIVE_ATTRIBUTE ()
 
static vtkInformationIntegerKeyFIELD_NUMBER_OF_COMPONENTS ()
 
static vtkInformationIntegerKeyFIELD_NUMBER_OF_TUPLES ()
 
static vtkInformationIntegerKeyFIELD_OPERATION ()
 
static vtkInformationDoubleVectorKeyFIELD_RANGE ()
 
static vtkInformationIntegerVectorKeyPIECE_EXTENT ()
 
static vtkInformationStringKeyFIELD_NAME ()
 
static vtkInformationDoubleVectorKeyORIGIN ()
 
static vtkInformationDoubleVectorKeySPACING ()
 
static vtkInformationDoubleVectorKeyBOUNDING_BOX ()
 
static vtkInformationDataObjectKeySIL ()
 
static vtkInformationGetActiveFieldInformation (vtkInformation *info, int fieldAssociation, int attributeType)
 
static vtkInformationGetNamedFieldInformation (vtkInformation *info, int fieldAssociation, const char *name)
 
static void RemoveNamedFieldInformation (vtkInformation *info, int fieldAssociation, const char *name)
 
static vtkInformationSetActiveAttribute (vtkInformation *info, int fieldAssociation, const char *attributeName, int attributeType)
 
static void SetActiveAttributeInfo (vtkInformation *info, int fieldAssociation, int attributeType, const char *name, int arrayType, int numComponents, int numTuples)
 
static void SetPointDataActiveScalarInfo (vtkInformation *info, int arrayType, int numComponents)
 
static vtkDataObjectGetData (vtkInformation *info)
 
static vtkDataObjectGetData (vtkInformationVector *v, int i=0)
 
static void SetGlobalReleaseDataFlag (int val)
 
static int GetGlobalReleaseDataFlag ()
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkLabelHierarchy ()
 
virtual ~vtkLabelHierarchy ()
 
- Protected Member Functions inherited from vtkPointSet
 vtkPointSet ()
 
 ~vtkPointSet ()
 
virtual void ReportReferences (vtkGarbageCollector *)
 
- Protected Member Functions inherited from vtkDataSet
 vtkDataSet ()
 
 ~vtkDataSet ()
 
virtual void ComputeScalarRange ()
 
bool IsAnyBitSet (vtkUnsignedCharArray *a, int bitFlag)
 
- Protected Member Functions inherited from vtkDataObject
 vtkDataObject ()
 
 ~vtkDataObject ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

int TargetLabelCount
 
int MaximumDepth
 
vtkDataArrayPriorities
 
vtkAbstractArrayLabels
 
vtkDataArrayOrientations
 
vtkIntArrayIconIndices
 
vtkDataArraySizes
 
vtkDataArrayBoundedSizes
 
vtkCoincidentPointsCoincidentPoints
 
vtkPointsCenterPts
 
vtkTextPropertyTextProperty
 
ImplementationImpl
 
- Protected Attributes inherited from vtkPointSet
vtkPointsPoints
 
vtkPointLocatorLocator
 
- Protected Attributes inherited from vtkDataSet
vtkCellDataCellData
 
vtkPointDataPointData
 
vtkCallbackCommandDataObserver
 
vtkTimeStamp ComputeTime
 
double Bounds [6]
 
double Center [3]
 
double ScalarRange [2]
 
vtkTimeStamp ScalarRangeComputeTime
 
vtkUnsignedCharArrayPointGhostArray
 
vtkUnsignedCharArrayCellGhostArray
 
- Protected Attributes inherited from vtkDataObject
vtkFieldDataFieldData
 
int DataReleased
 
vtkTimeStamp UpdateTime
 
vtkInformationInformation
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Friends

class vtkLabelHierarchyFrustumIterator
 
class vtkLabelHierarchyFullSortIterator
 
class implementation
 

Detailed Description

contains an octree of labels

This class represents labels in a hierarchy used to denote rendering priority. A binary tree of labels is maintained that subdivides the bounds of the of the label anchors spatially. Which level of the tree a label occupies determines its priority; those at higher levels of the tree will be more likely to render than those at lower levels of the tree.

Pass vtkLabelHierarchy objects to a vtkLabelPlacementMapper filter for dynamic, non-overlapping, per-frame placement of labels.

Note that if we have a d-dimensional binary tree and we want a fixed number $n$ of labels in each node (all nodes, not just leaves), we can compute the depth of tree required assuming a uniform distribution of points. Given a total of $N$ points we know that $\frac{N}{|T|} = n$, where $|T|$ is the cardinality of the tree (i.e., the number of nodes it contains). Because we have a uniform distribution, the tree will be uniformly subdivided and thus $|T| = 1 + 2^d + \left(2^d\right)^2 + \cdots + \left(2^d\right)^k$, where $d$ is the dimensionality of the input points (fixed at 3 for now). As $k$ becomes large, $|T|\approx 2 \left(2^d\right)^k$. Using this approximation, we can solve for $k$:

\[ k = \frac{\log{\frac{N}{2n}}}{\log{2^d}} \]

Given a set of $N$ input label anchors, we'll compute $k$ and then bin the anchors into tree nodes at level $k$ of the tree. After this, all the nodes will be in the leaves of the tree and those leaves will be at the $k$-th level; no anchors will be in levels $1, 2, \ldots, k-1$. To fix that, we'll choose to move some anchors upwards. The exact number to move upwards depends on TargetLabelCount. We'll move as many up as required to have TargetLabelCount at each node.

You should avoid situations where MaximumDepth does not allow for TargetLabelCount or fewer entries at each node. The MaximumDepth is a hard limit while TargetLabelCount is a suggested optimum. You will end up with many more than TargetLabelCount entries per node and things will be sloooow.

Tests:
vtkLabelHierarchy (Tests)

Definition at line 80 of file vtkLabelHierarchy.h.

Member Typedef Documentation

Definition at line 84 of file vtkLabelHierarchy.h.

Member Enumeration Documentation

Enumeration of iterator types.

Enumerator
FULL_SORT 
QUEUE 
DEPTH_FIRST 
FRUSTUM 

Definition at line 110 of file vtkLabelHierarchy.h.

Constructor & Destructor Documentation

vtkLabelHierarchy::vtkLabelHierarchy ( )
protected
virtual vtkLabelHierarchy::~vtkLabelHierarchy ( )
protectedvirtual

Member Function Documentation

static vtkLabelHierarchy* vtkLabelHierarchy::New ( )
static
static int vtkLabelHierarchy::IsTypeOf ( const char *  type)
static
virtual int vtkLabelHierarchy::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPointSet.

static vtkLabelHierarchy* vtkLabelHierarchy::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkLabelHierarchy::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkPointSet.

vtkLabelHierarchy* vtkLabelHierarchy::NewInstance ( ) const
virtual void vtkLabelHierarchy::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkPointSet.

virtual void vtkLabelHierarchy::SetPoints ( vtkPoints )
virtual

Override SetPoints so we can reset the hierarchy when the points change.

Reimplemented from vtkPointSet.

virtual void vtkLabelHierarchy::ComputeHierarchy ( )
virtual

Fill the hierarchy with the input labels.

virtual void vtkLabelHierarchy::SetTargetLabelCount ( int  )
virtual

The number of labels that is ideally present at any octree node. It is best if this is a multiple of $2^d$.

virtual int vtkLabelHierarchy::GetTargetLabelCount ( )
virtual

The number of labels that is ideally present at any octree node. It is best if this is a multiple of $2^d$.

virtual void vtkLabelHierarchy::SetMaximumDepth ( int  )
virtual

The maximum depth of the octree.

virtual int vtkLabelHierarchy::GetMaximumDepth ( )
virtual

The maximum depth of the octree.

virtual void vtkLabelHierarchy::SetTextProperty ( vtkTextProperty tprop)
virtual

The default text property assigned to labels in this hierarchy.

virtual vtkTextProperty* vtkLabelHierarchy::GetTextProperty ( )
virtual

The default text property assigned to labels in this hierarchy.

virtual void vtkLabelHierarchy::SetPriorities ( vtkDataArray arr)
virtual

Set/get the array specifying the importance (priority) of each label.

virtual vtkDataArray* vtkLabelHierarchy::GetPriorities ( )
virtual

Set/get the array specifying the importance (priority) of each label.

virtual void vtkLabelHierarchy::SetLabels ( vtkAbstractArray arr)
virtual

Set/get the array specifying the text of each label.

virtual vtkAbstractArray* vtkLabelHierarchy::GetLabels ( )
virtual

Set/get the array specifying the text of each label.

virtual void vtkLabelHierarchy::SetOrientations ( vtkDataArray arr)
virtual

Set/get the array specifying the orientation of each label.

virtual vtkDataArray* vtkLabelHierarchy::GetOrientations ( )
virtual

Set/get the array specifying the orientation of each label.

virtual void vtkLabelHierarchy::SetIconIndices ( vtkIntArray arr)
virtual

Set/get the array specifying the icon index of each label.

virtual vtkIntArray* vtkLabelHierarchy::GetIconIndices ( )
virtual

Set/get the array specifying the icon index of each label.

virtual void vtkLabelHierarchy::SetSizes ( vtkDataArray arr)
virtual

Set/get the array specifying the size of each label.

virtual vtkDataArray* vtkLabelHierarchy::GetSizes ( )
virtual

Set/get the array specifying the size of each label.

virtual void vtkLabelHierarchy::SetBoundedSizes ( vtkDataArray arr)
virtual

Set/get the array specifying the maximum width and height in world coordinates of each label.

virtual vtkDataArray* vtkLabelHierarchy::GetBoundedSizes ( )
virtual

Set/get the array specifying the maximum width and height in world coordinates of each label.

vtkLabelHierarchyIterator* vtkLabelHierarchy::NewIterator ( int  type,
vtkRenderer ren,
vtkCamera cam,
double  frustumPlanes[24],
bool  positionsAsNormals,
float  bucketSize[2] 
)

Returns an iterator for this data object. positionsAsNormals should only be true when labels are on a sphere centered at the origin (3D world).

Parameters
type- the type should be one of FULL_SORT, QUEUE, DEPTH_FIRST, or FRUSTUM.
ren- the current renderer (used for viewport information)
cam- the current camera.
frustumPlanes- should be the output of the camera's frustum planes.
positionsAsNormals- throws out octree nodes on the opposite side of the origin.
bucketSize- an array of 2 integers describing the width and height of label placer buckets.
void vtkLabelHierarchy::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. This is used to find other octree nodes at the same level that are within the search radius for candidate labels to be placed. It is called with pt set to the camera eye point and pythagorean quadruples increasingly distant from the origin are added to ijk to identify octree nodes whose labels should be placed.

Parameters
[out]ijk- discrete coordinates of the octree node at level containing pt.
[in]pt- input world point coordinates
[in]level- input octree level to be considered
static bool vtkLabelHierarchy::GetPathForNodalCoordinates ( int path,
int  ijk[3],
int  level 
)
static

Given a level of the tree and ijk coordinates in a lattice, compute a path down the tree to reach the corresponding lattice node. If the lattice coordinates are outside the tree, this returns false. Otherwise it returns true. This does not guarantee that the path exists in the hierarchy.

Parameters
[out]path- a vector of level integers specifying which child to descend at each level to reach ijk
[in]ijk- discrete coordinates of the octree node at level
[in]level- input octree level to be considered
virtual vtkIdType vtkLabelHierarchy::GetNumberOfCells ( )
virtual

Inherited members (from vtkDataSet)

Implements vtkDataSet.

virtual vtkCell* vtkLabelHierarchy::GetCell ( vtkIdType  )
virtual

Inherited members (from vtkDataSet)

Implements vtkDataSet.

virtual void vtkLabelHierarchy::GetCell ( vtkIdType  ,
vtkGenericCell  
)
virtual

Inherited members (from vtkDataSet)

Implements vtkDataSet.

virtual int vtkLabelHierarchy::GetCellType ( vtkIdType  )
virtual

Inherited members (from vtkDataSet)

Implements vtkDataSet.

virtual void vtkLabelHierarchy::GetCellPoints ( vtkIdType  ,
vtkIdList  
)
virtual

Inherited members (from vtkDataSet)

Implements vtkDataSet.

virtual void vtkLabelHierarchy::GetPointCells ( vtkIdType  ,
vtkIdList  
)
virtual

Inherited members (from vtkDataSet)

Implements vtkDataSet.

virtual vtkIdType vtkLabelHierarchy::FindCell ( double ,
vtkCell ,
vtkIdType  ,
double  ,
int ,
double ,
double  
)
virtual

Inherited members (from vtkDataSet)

virtual vtkIdType vtkLabelHierarchy::FindCell ( double ,
vtkCell ,
vtkGenericCell ,
vtkIdType  ,
double  ,
int ,
double ,
double  
)
virtual

Inherited members (from vtkDataSet)

virtual int vtkLabelHierarchy::GetMaxCellSize ( )
virtual

Inherited members (from vtkDataSet)

Implements vtkDataSet.

Implementation* vtkLabelHierarchy::GetImplementation ( )
inline

Definition at line 214 of file vtkLabelHierarchy.h.

virtual vtkPoints* vtkLabelHierarchy::GetCenterPts ( )
virtual

Provide access to original coordinates of sets of coincident points

virtual vtkCoincidentPoints* vtkLabelHierarchy::GetCoincidentPoints ( )
virtual

Provide access to the set of coincident points that have been perturbed by the hierarchy in order to render labels for each without overlap.

Friends And Related Function Documentation

friend class vtkLabelHierarchyFrustumIterator
friend

Definition at line 248 of file vtkLabelHierarchy.h.

friend class vtkLabelHierarchyFullSortIterator
friend

Definition at line 249 of file vtkLabelHierarchy.h.

friend class implementation
friend

Definition at line 250 of file vtkLabelHierarchy.h.

Member Data Documentation

int vtkLabelHierarchy::TargetLabelCount
protected

Definition at line 233 of file vtkLabelHierarchy.h.

int vtkLabelHierarchy::MaximumDepth
protected

Definition at line 234 of file vtkLabelHierarchy.h.

vtkDataArray* vtkLabelHierarchy::Priorities
protected

Definition at line 235 of file vtkLabelHierarchy.h.

vtkAbstractArray* vtkLabelHierarchy::Labels
protected

Definition at line 236 of file vtkLabelHierarchy.h.

vtkDataArray* vtkLabelHierarchy::Orientations
protected

Definition at line 237 of file vtkLabelHierarchy.h.

vtkIntArray* vtkLabelHierarchy::IconIndices
protected

Definition at line 238 of file vtkLabelHierarchy.h.

vtkDataArray* vtkLabelHierarchy::Sizes
protected

Definition at line 239 of file vtkLabelHierarchy.h.

vtkDataArray* vtkLabelHierarchy::BoundedSizes
protected

Definition at line 240 of file vtkLabelHierarchy.h.

vtkCoincidentPoints* vtkLabelHierarchy::CoincidentPoints
protected

Definition at line 241 of file vtkLabelHierarchy.h.

vtkPoints* vtkLabelHierarchy::CenterPts
protected

Definition at line 242 of file vtkLabelHierarchy.h.

vtkTextProperty* vtkLabelHierarchy::TextProperty
protected

Definition at line 243 of file vtkLabelHierarchy.h.

Implementation* vtkLabelHierarchy::Impl
protected

Definition at line 246 of file vtkLabelHierarchy.h.


The documentation for this class was generated from the following file: