ITK
4.4.0
Insight Segmentation and Registration Toolkit
|
#include <itkLevelOrderTreeIterator.h>
Iterate over a tree in level order.
Definition at line 34 of file itkLevelOrderTreeIterator.h.
Public Types | |
typedef Superclass::NodeType | NodeType |
typedef LevelOrderTreeIterator | Self |
typedef TreeIteratorBase < TTreeType > | Superclass |
typedef Superclass::TreeNodeType | TreeNodeType |
typedef TTreeType | TreeType |
typedef TTreeType::ValueType | ValueType |
Public Types inherited from itk::TreeIteratorBase< TTreeType > | |
typedef TreeNodeType::ChildIdentifier | ChildIdentifier |
enum | NodeType { UNDEFIND = 0, PREORDER = 1, INORDER = 2, POSTORDER = 3, LEVELORDER = 4, CHILD = 5, ROOT = 6, LEAF = 7 } |
typedef TreeIteratorBase | Self |
typedef TTreeType::TreeNodeType | TreeNodeType |
typedef TTreeType::ValueType | ValueType |
Public Member Functions | |
TreeIteratorBase< TTreeType > * | Clone () |
int | GetEndLevel () const |
int | GetLevel () const |
int | GetStartLevel () const |
NodeType | GetType () const |
LevelOrderTreeIterator (TreeType *tree, int endLevel=INT_MAX, const TreeNodeType *start=NULL) | |
LevelOrderTreeIterator (TreeType *tree, int startLevel, int endLevel, const TreeNodeType *start=NULL) | |
virtual | ~LevelOrderTreeIterator () |
const Self & | operator= (const Self &iterator) |
Public Member Functions inherited from itk::TreeIteratorBase< TTreeType > | |
virtual bool | Add (ValueType element) |
virtual bool | Add (int position, ValueType element) |
virtual bool | Add (TTreeType &subTree) |
virtual int | ChildPosition (ValueType element) const |
virtual TreeIteratorBase < TTreeType > * | Children () |
virtual int | Count () |
virtual int | CountChildren () const |
virtual bool | Disconnect () |
virtual const ValueType & | Get () const |
virtual TreeIteratorBase < TTreeType > * | GetChild (int number) const |
virtual TreeNodeType * | GetNode () |
virtual const TreeNodeType * | GetNode () const |
const TreeNodeType * | GetParent () const |
TreeNodeType * | GetRoot () |
const TreeNodeType * | GetRoot () const |
virtual TTreeType * | GetSubTree () const |
TTreeType * | GetTree () const |
void | GoToBegin () |
virtual bool | GoToChild (ChildIdentifier number=0) |
void | GoToEnd () |
virtual bool | GoToParent () |
virtual bool | HasChild (int number=0) const |
virtual bool | HasParent () const |
bool | IsAtBegin (void) const |
bool | IsAtEnd (void) const |
virtual bool | IsLeaf () const |
virtual bool | IsRoot () const |
virtual TreeIteratorBase < TTreeType > * | Parents () |
bool | Remove () |
virtual bool | RemoveChild (int number) |
void | Set (ValueType element) |
virtual | ~TreeIteratorBase () |
Self & | operator++ () |
void | operator++ (int) |
const Self & | operator= (const Self &iterator) |
Protected Member Functions | |
bool | HasNext () const |
const ValueType & | Next () |
Protected Member Functions inherited from itk::TreeIteratorBase< TTreeType > | |
TreeIteratorBase (TTreeType *tree, const TreeNodeType *start) | |
TreeIteratorBase (const TTreeType *tree, const TreeNodeType *start) | |
Private Member Functions | |
const TreeNodeType * | FindNextNode () const |
const TreeNodeType * | FindNextNodeHelp () const |
int | GetLevel (const TreeNodeType *node) const |
Private Attributes | |
int | m_EndLevel |
std::queue< const TreeNodeType * > | m_Queue |
int | m_StartLevel |
Additional Inherited Members | |
Protected Attributes inherited from itk::TreeIteratorBase< TTreeType > | |
TreeNodeType * | m_Begin |
TreeNodeType * | m_End |
TreeNodeType * | m_Position |
const TreeNodeType * | m_Root |
TTreeType * | m_Tree |
typedef Superclass::NodeType itk::LevelOrderTreeIterator< TTreeType >::NodeType |
Definition at line 44 of file itkLevelOrderTreeIterator.h.
typedef LevelOrderTreeIterator itk::LevelOrderTreeIterator< TTreeType >::Self |
Typedefs
Definition at line 39 of file itkLevelOrderTreeIterator.h.
typedef TreeIteratorBase< TTreeType > itk::LevelOrderTreeIterator< TTreeType >::Superclass |
Definition at line 40 of file itkLevelOrderTreeIterator.h.
typedef Superclass::TreeNodeType itk::LevelOrderTreeIterator< TTreeType >::TreeNodeType |
Definition at line 43 of file itkLevelOrderTreeIterator.h.
typedef TTreeType itk::LevelOrderTreeIterator< TTreeType >::TreeType |
Definition at line 41 of file itkLevelOrderTreeIterator.h.
typedef TTreeType::ValueType itk::LevelOrderTreeIterator< TTreeType >::ValueType |
Definition at line 42 of file itkLevelOrderTreeIterator.h.
itk::LevelOrderTreeIterator< TTreeType >::LevelOrderTreeIterator | ( | TreeType * | tree, |
int | endLevel = INT_MAX , |
||
const TreeNodeType * | start = NULL |
||
) |
Constructor with end level specification
itk::LevelOrderTreeIterator< TTreeType >::LevelOrderTreeIterator | ( | TreeType * | tree, |
int | startLevel, | ||
int | endLevel, | ||
const TreeNodeType * | start = NULL |
||
) |
Constructor with end level specification
|
inlinevirtual |
Definition at line 52 of file itkLevelOrderTreeIterator.h.
|
virtual |
Clone function
Implements itk::TreeIteratorBase< TTreeType >.
|
private |
|
private |
int itk::LevelOrderTreeIterator< TTreeType >::GetEndLevel | ( | ) | const |
Get the end level
int itk::LevelOrderTreeIterator< TTreeType >::GetLevel | ( | ) | const |
Get the current level
|
private |
int itk::LevelOrderTreeIterator< TTreeType >::GetStartLevel | ( | ) | const |
Get the start level
|
virtual |
Get the type of the iterator
Implements itk::TreeIteratorBase< TTreeType >.
|
protectedvirtual |
Return true if the next node exists
Implements itk::TreeIteratorBase< TTreeType >.
|
protectedvirtual |
Return the next node
Implements itk::TreeIteratorBase< TTreeType >.
|
inline |
operator =
Definition at line 70 of file itkLevelOrderTreeIterator.h.
References itk::LevelOrderTreeIterator< TTreeType >::m_EndLevel, itk::LevelOrderTreeIterator< TTreeType >::m_Queue, itk::LevelOrderTreeIterator< TTreeType >::m_StartLevel, and itk::TreeIteratorBase< TTreeType >::operator=().
|
private |
Definition at line 100 of file itkLevelOrderTreeIterator.h.
Referenced by itk::LevelOrderTreeIterator< TTreeType >::operator=().
|
mutableprivate |
Definition at line 101 of file itkLevelOrderTreeIterator.h.
Referenced by itk::LevelOrderTreeIterator< TTreeType >::operator=().
|
private |
Definition at line 99 of file itkLevelOrderTreeIterator.h.
Referenced by itk::LevelOrderTreeIterator< TTreeType >::operator=().