|
ITK
5.1.0
Insight Toolkit
|
Go to the documentation of this file.
18 #ifndef itkRootTreeIterator_h
19 #define itkRootTreeIterator_h
25 template <
typename TTreeType>
63 template <
typename TTreeType>
71 this->
m_Root = tree->GetRoot();
77 template <
typename TTreeType>
85 template <
typename TTreeType>
89 if (const_cast<TreeNodeType *>(FindNextNode()) !=
nullptr)
98 template <
typename TTreeType>
102 this->m_Position = const_cast<TreeNodeType *>(FindNextNode());
103 return this->m_Position->Get();
108 template <
typename TTreeType>
112 if (this->m_Position ==
nullptr)
116 if (this->m_Position == this->m_Root)
120 return this->m_Position->GetParent();
125 template <
typename TTreeType>
Represents a node in a tree.
typename Superclass::NodeType NodeType
This class provides the base implementation for tree iterators.
const ValueType & Next() override
const TreeNodeType * FindNextNode() const
typename TTreeType::TreeNodeType TreeNodeType
TreeIteratorBase< TTreeType > * Clone() override
NodeType GetType() const override
bool HasNext() const override
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
TreeNodeType * m_Position
typename TTreeType::ValueType ValueType
typename Superclass::TreeNodeType TreeNodeType
const TreeNodeType * m_Root
TreeIteratorBaseNodeEnum NodeType
RootTreeIterator(TreeType *tree, const TreeNodeType *start=nullptr)