18 #ifndef itkInOrderTreeIterator_h 19 #define itkInOrderTreeIterator_h 25 template<
typename TTreeType >
52 const ValueType &
Next();
64 template<
typename TTreeType >
70 template<
typename TTreeType >
76 template<
typename TTreeType >
84 template<
typename TTreeType >
87 if ( const_cast< TreeNodeType * >(
FindNextNode() ) != ITK_NULLPTR )
96 template<
typename TTreeType >
106 template<
typename TTreeType >
128 int childPosition = parent->ChildPosition(child);
129 int lastChildPosition = parent->CountChildren() - 1;
131 while ( childPosition < lastChildPosition )
133 TreeNodeType *help = parent->GetChild(childPosition + 1);
134 if ( help != ITK_NULLPTR )
141 while ( parent->HasParent() )
144 parent = parent->GetParent();
147 if ( parent->ChildPosition(this->m_Root) >= 0 )
151 childPosition = parent->ChildPosition(child);
152 lastChildPosition = parent->CountChildren() - 1;
154 while ( childPosition < lastChildPosition )
156 TreeNodeType *help = parent->GetChild(childPosition + 1);
157 if ( help != ITK_NULLPTR )
167 template<
typename TTreeType >
TTreeType::TreeNodeType TreeNodeType
TTreeType::ValueType ValueType
Superclass::NodeType NodeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
Superclass::TreeNodeType TreeNodeType
TreeIteratorBase< TTreeType > * Clone()
const TreeNodeType * FindNextNode() const
InOrderTreeIterator(TreeType &start)
This class provides the base implementation for tree iterators.
TreeIteratorBase< TTreeType > Superclass
TreeNodeType * m_Position