1#ifndef vtkLabelHierarchyPrivate_h
2#define vtkLabelHierarchyPrivate_h
6#include "octree/octree"
71 if (0 == this->Hierarchy)
73 vtkGenericWarningMacro(
"error: NULL this->Hierarchy in PriorityComparator" );
79 vtkGenericWarningMacro(
"error: NULL this->Hierarchy->GetImplementation() in PriorityComparator" );
87 class LabelSet :
public std::multiset<vtkIdType,PriorityComparator>
95 for (
int i = 0; i < 3; ++ i )
106 for (
int i = 0; i < 3; ++ i )
117 for (
int i = 0; i < 3; ++ i )
127 std::multiset<vtkIdType,PriorityComparator>::operator = ( rhs );
130 for (
int i = 0; i < 3; ++ i )
146 this->insert( anchor );
201 for (
int i = 0; i < 3; ++ i )
210 double sz2 = this->Size / 2.;
212 for (
int i = 0; i < self->num_children(); ++ i )
214 for (
int j = 0; j < 2; ++ j )
216 x[j] = this->
Center[j] + ( ( i & (1<<j) ) ? 0.5 : -0.5 ) * sz2 ;
219 (*self)[i].value().SetGeometry( x, sz2 );
225 double sz2 = this->Size / 2.;
227 for (
int i = 0; i < self->num_children(); ++ i )
229 for (
int j = 0; j < 3; ++ j )
231 x[j] = this->
Center[j] + ( ( i & (1<<j) ) ? 0.5 : -0.5 ) * sz2 ;
233 (*self)[i].value().SetGeometry( x, sz2 );
239 self->add_children( emptyNode );
240 this->SetChildGeometry( self );
245 self->add_children( emptyNode );
246 this->SetChildGeometry( self );
abstract superclass for arrays of numeric data
double GetTuple1(vtkIdType tupleIdx)
These methods are included as convenience for the wrappers.
LabelSet(const LabelSet &src)
void Insert(vtkIdType anchor)
void AddChildren(octree< LabelSet, 2 >::octree_node_pointer self, LabelSet &emptyNode)
LabelSet(vtkLabelHierarchy *hierarchy)
vtkIdType GetTotalAnchorCount() const
LabelSet & operator=(const LabelSet &rhs)
const double * GetCenter() const
void SetChildGeometry(octree< LabelSet, 2 >::octree_node_pointer self)
void SetGeometry(const double center[3], double length)
vtkIdType GetLocalAnchorCount() const
HierarchyType3 * Hierarchy3
vtkTimeStamp HierarchyTime
void SmudgeAnchor3(HierarchyCursor3 &cursor, vtkIdType anchor, double *x)
void DemoteAnchors(int level)
void SmudgeAnchor2(HierarchyCursor2 &cursor, vtkIdType anchor, double *x)
bool ComparePriorities(vtkIdType a, vtkIdType b)
octree< LabelSet, 2 > HierarchyType2
octree< LabelSet > HierarchyType3
octree< LabelSet, 2 >::cursor HierarchyCursor2
void DropAnchor3(vtkIdType anchor)
void FillHierarchyRoot(LabelSet &anchors)
HierarchyType2 * Hierarchy2
void RecursiveNodeDivide(HierarchyCursor2 &cursor)
HierarchyType3::size_type ActualDepth
void DropAnchor2(vtkIdType anchor)
void RecursiveNodeDivide(HierarchyCursor3 &cursor)
octree< LabelSet >::cursor HierarchyCursor3
void PrepareSortedAnchors(LabelSet &anchors)
octree< LabelSet >::iterator HierarchyIterator3
octree< LabelSet, 2 >::iterator HierarchyIterator2
static vtkLabelHierarchy * Current
void BinAnchorsToLevel(int level)
contains an octree of labels
Implementation * GetImplementation()
virtual vtkDataArray * GetPriorities()
record modification and/or execution time
PriorityComparator(vtkLabelHierarchy *h)
bool operator()(const vtkIdType &a, const vtkIdType &b) const
PriorityComparator(const PriorityComparator &src)
vtkLabelHierarchy * Hierarchy
PriorityComparator & operator=(const PriorityComparator &rhs)