Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::OctreeNode Class Reference

#include <itkOctreeNode.h>

Collaboration diagram for itk::OctreeNode:

Collaboration graph
[legend]
List of all members.

Detailed Description

OctreeNode data structure, 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.
Author:
Hans J. Johnson This class is the basic building block of an octree. It is rarely used by itself, and commonly used by the Octree class.

Definition at line 37 of file itkOctreeNode.h.

Public Member Functions

int GetColor (void) const
bool IsNodeColored (void) const
 OctreeNode (void)
void SetBranch (OctreeNodeBranch *NewBranch)
void SetColor (int NodeColor)
void SetParentOctree (OctreeBase *parent)
virtual ~OctreeNode (void)
OctreeNodeGetChild (const enum LeafIdentifier ChildID)
OctreeNodeGetChild (const enum LeafIdentifier ChildID) const


Constructor & Destructor Documentation

itk::OctreeNode::OctreeNode ( void   ) 

Default constructor

Author:
Hans J. Johnson
Postcondition:
After construction, it is assumed all children of this node are colored with values of 0.

virtual itk::OctreeNode::~OctreeNode ( void   )  [virtual]

Default destructor

Author:
Hans J. Johnson


Member Function Documentation

OctreeNode& itk::OctreeNode::GetChild ( const enum LeafIdentifier  ChildID  ) 

OctreeNode& itk::OctreeNode::GetChild ( const enum LeafIdentifier  ChildID  )  const

Returns the value of the specified Child for for this OctreeNode

Author:
Hans J. Johnson
Parameters:
ChildID The numerical identifier of the desired child.
Returns:
A pointer to the Disired child. NOTE: This is always an instance of an OctreeNode.

int itk::OctreeNode::GetColor ( void   )  const

Determines the color value of the specified Child for for this OctreeNode

Author:
Hans J. Johnson
Parameters:
ChildID The numerical identifier of the desired child.
Returns:
A value between 0 and 255 to indicate the color of the Disired child.
Precondition:
Must determine that the specified node is colored (Use IsNodeColored() member function. Behavior is undefined when the child is another Octree.

bool itk::OctreeNode::IsNodeColored ( void   )  const

Determines if the child is a leaf node (colored), or a branch node (uncolored)

Author:
Hans J. Johnson
Parameters:
ChildID The numerical identifier of the desired child.
Returns:
true if it is colored, false if it is not

void itk::OctreeNode::SetBranch ( OctreeNodeBranch NewBranch  ) 

Sets the color value of the specified Child for for this OctreeNode

Author:
Hans J. Johnson
Parameters:
ChildID The numerical identifier of the desired child.
NodeColor The disired color of this node.
Postcondition:
All children of the specified child are removed, and the child is set to the desired value.

Referenced by itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetTree().

void itk::OctreeNode::SetColor ( int  NodeColor  ) 

Sets the color value of the specified Child for for this OctreeNode

Author:
Hans J. Johnson
Parameters:
ChildID The numerical identifier of the desired child.
NodeColor The disired color of this node.
Postcondition:
All children of the specified child are removed, and the child is set to the desired value.

Referenced by itk::Octree< TPixel, ColorTableSize, MappingFunctionType >::SetColor().

void itk::OctreeNode::SetParentOctree ( OctreeBase parent  )  [inline]

Definition at line 105 of file itkOctreeNode.h.


The documentation for this class was generated from the following file:
Generated at Wed Jul 30 08:12:15 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000