1 #ifndef __vtkLabelHierarchyPrivate_h
2 #define __vtkLabelHierarchyPrivate_h
7 #include "octree/octree"
79 if (0 == this->Hierarchy)
81 vtkGenericWarningMacro(
"error: NULL this->Hierarchy in PriorityComparator" );
87 vtkGenericWarningMacro(
"error: NULL this->Hierarchy->GetImplementation() in PriorityComparator" );
95 class LabelSet :
public vtkstd::multiset<vtkIdType,PriorityComparator>
103 for (
int i = 0; i < 3; ++ i )
114 for (
int i = 0; i < 3; ++ i )
125 for (
int i = 0; i < 3; ++ i )
135 #if ! ( defined(_MSC_VER) && (_MSC_VER < 1300) )
136 vtkstd::multiset<vtkIdType,PriorityComparator>::operator = ( rhs );
140 for (
int i = 0; i < 3; ++ i )
156 this->insert( anchor );
211 for (
int i = 0; i < 3; ++ i )
213 this->
Center[i] = center[i];
220 double sz2 = this->Size / 2.;
222 for (
int i = 0; i <
self->num_children(); ++ i )
224 for (
int j = 0; j < 2; ++ j )
226 x[j] = this->
Center[j] + ( ( i & (1<<j) ) ? 0.5 : -0.5 ) * sz2 ;
229 (*self)[i].value().SetGeometry( x, sz2 );
235 double sz2 = this->Size / 2.;
237 for (
int i = 0; i <
self->num_children(); ++ i )
239 for (
int j = 0; j < 3; ++ j )
241 x[j] = this->
Center[j] + ( ( i & (1<<j) ) ? 0.5 : -0.5 ) * sz2 ;
243 (*self)[i].value().SetGeometry( x, sz2 );
249 self->add_children( emptyNode );
250 this->SetChildGeometry(
self );
255 self->add_children( emptyNode );
256 this->SetChildGeometry(
self );
259 #endif // __vtkLabelHierarchyPrivate_h
LabelSet & operator=(const LabelSet &rhs)
void PrepareSortedAnchors(LabelSet &anchors)
void AddChildren(octree< LabelSet, 2 >::octree_node_pointer self, LabelSet &emptyNode)
static vtkLabelHierarchy * Current
void DemoteAnchors(int level)
void Insert(vtkIdType anchor)
void FillHierarchyRoot(LabelSet &anchors)
PriorityComparator(const PriorityComparator &src)
LabelSet(vtkLabelHierarchy *hierarchy)
HierarchyType3::size_type ActualDepth
bool ComparePriorities(vtkIdType a, vtkIdType b)
record modification and/or execution time
vtkIdType GetTotalAnchorCount() const
octree< LabelSet, 2 >::iterator HierarchyIterator2
void DropAnchor3(vtkIdType anchor)
void BinAnchorsToLevel(int level)
void SetGeometry(const double center[3], double length)
HierarchyType3 * Hierarchy3
void SmudgeAnchor3(HierarchyCursor3 &cursor, vtkIdType anchor, double *x)
const double * GetCenter() const
HierarchyType2 * Hierarchy2
PriorityComparator & operator=(const PriorityComparator &rhs)
abstract superclass for arrays of numeric data
void SetChildGeometry(octree< LabelSet, 2 >::octree_node_pointer self)
bool operator()(const vtkIdType &a, const vtkIdType &b)
void SmudgeAnchor2(HierarchyCursor2 &cursor, vtkIdType anchor, double *x)
vtkLabelHierarchy * Hierarchy
octree< LabelSet, 2 > HierarchyType2
LabelSet(const LabelSet &src)
vtkIdType GetLocalAnchorCount() const
double GetTuple1(vtkIdType i)
octree< LabelSet > HierarchyType3
void RecursiveNodeDivide(HierarchyCursor2 &cursor)
virtual vtkDataArray * GetPriorities()
contains an octree of labels
octree< LabelSet >::iterator HierarchyIterator3
octree< LabelSet >::cursor HierarchyCursor3
void DropAnchor2(vtkIdType anchor)
Implementation * GetImplementation()
PriorityComparator(vtkLabelHierarchy *h)
vtkTimeStamp HierarchyTime
octree< LabelSet, 2 >::cursor HierarchyCursor2