|
virtual int | IsA (const char *type) |
|
vtkLabelHierarchy * | NewInstance () 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) |
|
Implementation * | GetImplementation () |
|
|
virtual void | SetTargetLabelCount (int) |
|
virtual int | GetTargetLabelCount () |
|
|
virtual void | SetMaximumDepth (int) |
|
virtual int | GetMaximumDepth () |
|
|
virtual void | SetTextProperty (vtkTextProperty *tprop) |
|
virtual vtkTextProperty * | GetTextProperty () |
|
|
virtual void | SetPriorities (vtkDataArray *arr) |
|
virtual vtkDataArray * | GetPriorities () |
|
|
virtual void | SetLabels (vtkAbstractArray *arr) |
|
virtual vtkAbstractArray * | GetLabels () |
|
|
virtual void | SetOrientations (vtkDataArray *arr) |
|
virtual vtkDataArray * | GetOrientations () |
|
|
virtual void | SetIconIndices (vtkIntArray *arr) |
|
virtual vtkIntArray * | GetIconIndices () |
|
|
virtual void | SetSizes (vtkDataArray *arr) |
|
virtual vtkDataArray * | GetSizes () |
|
|
virtual void | SetBoundedSizes (vtkDataArray *arr) |
|
virtual vtkDataArray * | GetBoundedSizes () |
|
|
vtkLabelHierarchyIterator * | NewIterator (int type, vtkRenderer *ren, vtkCamera *cam, double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2]) |
|
|
virtual vtkIdType | GetNumberOfCells () |
|
virtual vtkCell * | GetCell (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 vtkPoints * | GetCenterPts () |
|
|
virtual vtkCoincidentPoints * | GetCoincidentPoints () |
|
vtkPointSet * | NewInstance () const |
|
void | Initialize () |
|
void | CopyStructure (vtkDataSet *pd) |
|
vtkCellIterator * | NewCellIterator () |
|
unsigned long | GetMTime () |
|
void | ComputeBounds () |
|
void | Squeeze () |
|
unsigned long | GetActualMemorySize () |
|
vtkIdType | GetNumberOfPoints () |
|
double * | GetPoint (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 vtkPoints * | GetPoints () |
|
void | ShallowCopy (vtkDataObject *src) |
|
void | DeepCopy (vtkDataObject *src) |
|
virtual void | Register (vtkObjectBase *o) |
|
virtual void | UnRegister (vtkObjectBase *o) |
|
vtkDataSet * | NewInstance () const |
|
virtual void | CopyAttributes (vtkDataSet *ds) |
|
virtual void | GetCellBounds (vtkIdType cellId, double bounds[6]) |
|
virtual void | GetCellTypes (vtkCellTypes *types) |
|
vtkCellData * | GetCellData () |
|
vtkPointData * | GetPointData () |
|
double * | GetBounds () |
|
void | GetBounds (double bounds[6]) |
|
double * | GetCenter () |
|
void | GetCenter (double center[3]) |
|
double | GetLength () |
|
virtual void | GetScalarRange (double range[2]) |
|
double * | GetScalarRange () |
|
int | CheckAttributes () |
|
virtual vtkFieldData * | GetAttributesAsFieldData (int type) |
|
virtual vtkIdType | GetNumberOfElements (int type) |
|
bool | HasAnyGhostCells () |
|
bool | HasAnyGhostPoints () |
|
vtkUnsignedCharArray * | GetPointGhostArray () |
|
void | UpdatePointGhostArrayCache () |
|
vtkUnsignedCharArray * | AllocatePointGhostArray () |
|
vtkUnsignedCharArray * | GetCellGhostArray () |
|
void | UpdateCellGhostArrayCache () |
|
vtkUnsignedCharArray * | AllocateCellGhostArray () |
|
virtual void | GetCellNeighbors (vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds) |
|
vtkIdType | FindPoint (double x, double y, double z) |
|
virtual vtkCell * | FindAndGetCell (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 () |
|
vtkDataObject * | NewInstance () 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 vtkDataSetAttributes * | GetAttributes (int type) |
|
virtual int | GetAttributeTypeForArray (vtkAbstractArray *arr) |
|
virtual vtkInformation * | GetInformation () |
|
virtual void | SetInformation (vtkInformation *) |
|
virtual int | GetDataReleased () |
|
virtual void | SetFieldData (vtkFieldData *) |
|
virtual vtkFieldData * | GetFieldData () |
|
virtual void | CopyInformationFromPipeline (vtkInformation *vtkNotUsed(info)) |
|
void | GlobalReleaseDataFlagOn () |
|
void | GlobalReleaseDataFlagOff () |
|
vtkObject * | NewInstance () 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) |
|
vtkCommand * | GetCommand (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) |
|
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 vtkLabelHierarchy * | New () |
|
static int | IsTypeOf (const char *type) |
|
static vtkLabelHierarchy * | SafeDownCast (vtkObjectBase *o) |
|
static bool | GetPathForNodalCoordinates (int *path, int ijk[3], int level) |
|
static int | IsTypeOf (const char *type) |
|
static vtkPointSet * | SafeDownCast (vtkObjectBase *o) |
|
static vtkPointSet * | GetData (vtkInformation *info) |
|
static vtkPointSet * | GetData (vtkInformationVector *v, int i=0) |
|
static int | IsTypeOf (const char *type) |
|
static vtkDataSet * | SafeDownCast (vtkObjectBase *o) |
|
static vtkDataSet * | GetData (vtkInformation *info) |
|
static vtkDataSet * | GetData (vtkInformationVector *v, int i=0) |
|
static vtkDataObject * | New () |
|
static int | IsTypeOf (const char *type) |
|
static vtkDataObject * | SafeDownCast (vtkObjectBase *o) |
|
static const char * | GetAssociationTypeAsString (int associationType) |
|
static int | GetAssociationTypeFromString (const char *associationType) |
|
static vtkInformationStringKey * | DATA_TYPE_NAME () |
|
static vtkInformationDataObjectKey * | DATA_OBJECT () |
|
static vtkInformationIntegerKey * | DATA_EXTENT_TYPE () |
|
static vtkInformationIntegerPointerKey * | DATA_EXTENT () |
|
static vtkInformationIntegerVectorKey * | ALL_PIECES_EXTENT () |
|
static vtkInformationIntegerKey * | DATA_PIECE_NUMBER () |
|
static vtkInformationIntegerKey * | DATA_NUMBER_OF_PIECES () |
|
static vtkInformationIntegerKey * | DATA_NUMBER_OF_GHOST_LEVELS () |
|
static vtkInformationDoubleKey * | DATA_TIME_STEP () |
|
static vtkInformationInformationVectorKey * | POINT_DATA_VECTOR () |
|
static vtkInformationInformationVectorKey * | CELL_DATA_VECTOR () |
|
static vtkInformationInformationVectorKey * | VERTEX_DATA_VECTOR () |
|
static vtkInformationInformationVectorKey * | EDGE_DATA_VECTOR () |
|
static vtkInformationIntegerKey * | FIELD_ARRAY_TYPE () |
|
static vtkInformationIntegerKey * | FIELD_ASSOCIATION () |
|
static vtkInformationIntegerKey * | FIELD_ATTRIBUTE_TYPE () |
|
static vtkInformationIntegerKey * | FIELD_ACTIVE_ATTRIBUTE () |
|
static vtkInformationIntegerKey * | FIELD_NUMBER_OF_COMPONENTS () |
|
static vtkInformationIntegerKey * | FIELD_NUMBER_OF_TUPLES () |
|
static vtkInformationIntegerKey * | FIELD_OPERATION () |
|
static vtkInformationDoubleVectorKey * | FIELD_RANGE () |
|
static vtkInformationIntegerVectorKey * | PIECE_EXTENT () |
|
static vtkInformationStringKey * | FIELD_NAME () |
|
static vtkInformationDoubleVectorKey * | ORIGIN () |
|
static vtkInformationDoubleVectorKey * | SPACING () |
|
static vtkInformationDoubleVectorKey * | BOUNDING_BOX () |
|
static vtkInformationDataObjectKey * | SIL () |
|
static vtkInformation * | GetActiveFieldInformation (vtkInformation *info, int fieldAssociation, int attributeType) |
|
static vtkInformation * | GetNamedFieldInformation (vtkInformation *info, int fieldAssociation, const char *name) |
|
static void | RemoveNamedFieldInformation (vtkInformation *info, int fieldAssociation, const char *name) |
|
static vtkInformation * | SetActiveAttribute (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 vtkDataObject * | GetData (vtkInformation *info) |
|
static vtkDataObject * | GetData (vtkInformationVector *v, int i=0) |
|
static void | SetGlobalReleaseDataFlag (int val) |
|
static int | GetGlobalReleaseDataFlag () |
|
static int | IsTypeOf (const char *type) |
|
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
|
static vtkObject * | New () |
|
static void | BreakOnError () |
|
static void | SetGlobalWarningDisplay (int val) |
|
static void | GlobalWarningDisplayOn () |
|
static void | GlobalWarningDisplayOff () |
|
static int | GetGlobalWarningDisplay () |
|
static int | IsTypeOf (const char *name) |
|
static vtkObjectBase * | New () |
|
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 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 points we know that , where 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 , where is the dimensionality of the input points (fixed at 3 for now). As becomes large, . Using this approximation, we can solve for :
Given a set of input label anchors, we'll compute and then bin the anchors into tree nodes at level of the tree. After this, all the nodes will be in the leaves of the tree and those leaves will be at the -th level; no anchors will be in levels . 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.