ITK
4.13.0
Insight Segmentation and Registration 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 sentinal 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 45 of file itkOctreeNode.h.
Public Member Functions | |
long int | GetColor () const |
bool | IsNodeColored () const |
OctreeNode () | |
void | SetBranch (OctreeNodeBranch *NewBranch) |
void | SetColor (int NodeColor) |
void | SetParentOctree (OctreeBase *parent) |
virtual | ~OctreeNode () |
OctreeNode & | GetChild (const enum LeafIdentifier ChildID) const |
OctreeNode & | GetChild (const enum LeafIdentifier ChildID) |
Private Member Functions | |
void | RemoveChildren () |
Private Attributes | |
OctreeNodeBranch * | m_Branch |
OctreeBase * | m_Parent |
itk::OctreeNode::OctreeNode | ( | ) |
Default constructor
|
virtual |
Default destructor
OctreeNode& itk::OctreeNode::GetChild | ( | const enum LeafIdentifier | ChildID | ) | const |
Returns the value of the specified Child for this OctreeNode
ChildID | The numerical identifier of the desired child. |
OctreeNode& itk::OctreeNode::GetChild | ( | const enum LeafIdentifier | ChildID | ) |
Returns the value of the specified Child for this OctreeNode
ChildID | The numerical identifier of the desired child. |
long int 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 | NodeColor | ) |
Sets the color value of the specified Child for this OctreeNode
NodeColor | The desired color of this node. |
|
inline |
Definition at line 102 of file itkOctreeNode.h.
|
private |
Each element holds COLOR or pointer to another octree node
Definition at line 119 of file itkOctreeNode.h.
|
private |
Definition at line 120 of file itkOctreeNode.h.