ITK
6.0.0
Insight Toolkit
|
#include <itkOctreeNode.h>
A data structure representing a node in an Octree.
OctreeNode is the basic building block of an octree. It is rarely used by itself, and commonly used by the Octree class.
OctreeNodes have two states: 1) They are a Colored node and the m_Branch is a sentinel value indicating the color, or 2) they are a branch node, and m_Branch is a dynamically allocated array of 8 pointers to OctreeNodes. In the second state, the 8 child OctreeNodes are instantiated by the parent node.
Definition at line 46 of file itkOctreeNode.h.
Public Types | |
using | LeafIdentifierEnum = OctreeEnums::LeafIdentifier |
Public Member Functions | |
long | GetColor () const |
bool | IsNodeColored () const |
OctreeNode () | |
void | SetBranch (OctreeNodeBranch *NewBranch) |
void | SetColor (int color) |
void | SetParentOctree (OctreeBase *parent) |
virtual | ~OctreeNode () |
OctreeNode & | GetChild (const LeafIdentifierEnum ChildID) const |
OctreeNode & | GetChild (const LeafIdentifierEnum ChildID) |
Private Member Functions | |
void | RemoveChildren () |
Private Attributes | |
OctreeNodeBranch * | m_Branch {} |
OctreeBase * | m_Parent {} |
Definition at line 62 of file itkOctreeNode.h.
itk::OctreeNode::OctreeNode | ( | ) |
Default constructor
|
virtual |
Default destructor
OctreeNode & itk::OctreeNode::GetChild | ( | const LeafIdentifierEnum | ChildID | ) |
Returns the value of the specified Child for this OctreeNode
ChildID | The numerical identifier of the desired child. |
OctreeNode & itk::OctreeNode::GetChild | ( | const LeafIdentifierEnum | ChildID | ) | const |
Returns the value of the specified Child for this OctreeNode
ChildID | The numerical identifier of the desired child. |
long itk::OctreeNode::GetColor | ( | ) | const |
Determines the color value of the specified Child for this OctreeNode
bool itk::OctreeNode::IsNodeColored | ( | ) | const |
Determines if the child is a leaf node (colored), or a branch node (uncolored)
|
private |
Removes all children from this node down, and sets the value value of the children to background.
void itk::OctreeNode::SetBranch | ( | OctreeNodeBranch * | NewBranch | ) |
Sets the color value of the specified Child for this OctreeNode
void itk::OctreeNode::SetColor | ( | int | color | ) |
Sets the color value of the specified Child for this OctreeNode
color | The desired color of this node. |
|
inline |
Definition at line 125 of file itkOctreeNode.h.
|
private |
Each element holds COLOR or pointer to another octree node
Definition at line 142 of file itkOctreeNode.h.
|
private |
Definition at line 143 of file itkOctreeNode.h.