18 #ifndef itkLevelOrderTreeIterator_h 19 #define itkLevelOrderTreeIterator_h 33 template<
typename TTreeType >
50 LevelOrderTreeIterator(TreeType *tree,
int startLevel,
int endLevel,
const TreeNodeType *start = ITK_NULLPTR);
86 const ValueType &
Next();
97 int GetLevel(
const TreeNodeType *node)
const;
101 mutable std::queue< const TreeNodeType * >
m_Queue;
106 #ifndef ITK_MANUAL_INSTANTIATION 107 #include "itkLevelOrderTreeIterator.hxx" Iterate over a tree in level order.
TTreeType::TreeNodeType TreeNodeType
virtual ~LevelOrderTreeIterator()
const TreeNodeType * FindNextNode() const
int GetStartLevel() const
LevelOrderTreeIterator Self
TreeIteratorBase< TTreeType > * Clone()
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
std::queue< const TreeNodeType * > m_Queue
TTreeType::ValueType ValueType
Superclass::TreeNodeType TreeNodeType
const Self & operator=(const Self &iterator)
Superclass::NodeType NodeType
Self & operator=(const Self &iterator)
This class provides the base implementation for tree iterators.
const TreeNodeType * FindNextNodeHelp() const
LevelOrderTreeIterator(TreeType *tree, int endLevel=INT_MAX, const TreeNodeType *start=nullptr)
TreeIteratorBase< TTreeType > Superclass