|  | VTK
    9.0.1
    | 
 
 
 
Go to the documentation of this file.    1 #ifndef vtkLabelHierarchyPrivate_h 
    2 #define vtkLabelHierarchyPrivate_h 
    6 #include "octree/octree" 
   61       if (
nullptr == this->Hierarchy)
 
   63         vtkGenericWarningMacro(
"error: NULL this->Hierarchy in PriorityComparator");
 
   69         vtkGenericWarningMacro(
 
   70           "error: NULL this->Hierarchy->GetImplementation() in PriorityComparator");
 
   78   class LabelSet : 
public std::multiset<vtkIdType, PriorityComparator>
 
   86       for (
int i = 0; i < 3; ++i)
 
   97       for (
int i = 0; i < 3; ++i)
 
  108       for (
int i = 0; i < 3; ++i)
 
  118         std::multiset<vtkIdType, PriorityComparator>::operator=(rhs);
 
  121         for (
int i = 0; i < 3; ++i)
 
  137       this->insert(anchor);
 
  194   for (
int i = 0; i < 3; ++i)
 
  202   octree<LabelSet, 2>::octree_node_pointer 
self)
 
  204   double sz2 = this->Size / 2.;
 
  206   for (
int i = 0; i < 
self->num_children(); ++i)
 
  208     for (
int j = 0; j < 2; ++j)
 
  210       x[j] = this->
Center[j] + ((i & (1 << j)) ? 0.5 : -0.5) * sz2;
 
  213     (*self)[i].value().SetGeometry(x, sz2);
 
  218   octree<LabelSet, 3>::octree_node_pointer 
self)
 
  220   double sz2 = this->Size / 2.;
 
  222   for (
int i = 0; i < 
self->num_children(); ++i)
 
  224     for (
int j = 0; j < 3; ++j)
 
  226       x[j] = this->
Center[j] + ((i & (1 << j)) ? 0.5 : -0.5) * sz2;
 
  228     (*self)[i].value().SetGeometry(x, sz2);
 
  233   octree<LabelSet, 2>::octree_node_pointer 
self, 
LabelSet& emptyNode)
 
  235   self->add_children(emptyNode);
 
  236   this->SetChildGeometry(
self);
 
  240   octree<LabelSet, 3>::octree_node_pointer 
self, 
LabelSet& emptyNode)
 
  242   self->add_children(emptyNode);
 
  243   this->SetChildGeometry(
self);
 
  246 #endif // vtkLabelHierarchyPrivate_h 
 
void DropAnchor2(vtkIdType anchor)
bool operator()(const vtkIdType &a, const vtkIdType &b) const
PriorityComparator & operator=(const PriorityComparator &rhs)
PriorityComparator(const PriorityComparator &src)
octree< LabelSet >::cursor HierarchyCursor3
void DropAnchor3(vtkIdType anchor)
HierarchyType2 * Hierarchy2
contains an octree of labels
void SmudgeAnchor2(HierarchyCursor2 &cursor, vtkIdType anchor, double *x)
vtkIdType GetLocalAnchorCount() const
record modification and/or execution time
void AddChildren(octree< LabelSet, 2 >::octree_node_pointer self, LabelSet &emptyNode)
bool ComparePriorities(vtkIdType a, vtkIdType b)
octree< LabelSet, 2 >::iterator HierarchyIterator2
abstract superclass for arrays of numeric data
void SetChildGeometry(octree< LabelSet, 2 >::octree_node_pointer self)
void PrepareSortedAnchors(LabelSet &anchors)
vtkTimeStamp HierarchyTime
void RecursiveNodeDivide(HierarchyCursor2 &cursor)
void SetGeometry(const double center[3], double length)
LabelSet & operator=(const LabelSet &rhs)
HierarchyType3::size_type ActualDepth
HierarchyType3 * Hierarchy3
PriorityComparator(vtkLabelHierarchy *h)
const double * GetCenter() const
LabelSet(const LabelSet &src)
vtkIdType GetTotalAnchorCount() const
LabelSet(vtkLabelHierarchy *hierarchy)
virtual vtkDataArray * GetPriorities()
void BinAnchorsToLevel(int level)
vtkLabelHierarchy * Hierarchy
void Insert(vtkIdType anchor)
static vtkLabelHierarchy * Current
octree< LabelSet >::iterator HierarchyIterator3
octree< LabelSet > HierarchyType3
Implementation * GetImplementation()
void SmudgeAnchor3(HierarchyCursor3 &cursor, vtkIdType anchor, double *x)
octree< LabelSet, 2 > HierarchyType2
octree< LabelSet, 2 >::cursor HierarchyCursor2
void FillHierarchyRoot(LabelSet &anchors)
void DemoteAnchors(int level)
double GetTuple1(vtkIdType tupleIdx)
These methods are included as convenience for the wrappers.