ITK  5.3.0
Insight Toolkit
itkCorrespondenceDataStructureIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkCorrespondenceDataStructureIterator_h
19 #define itkCorrespondenceDataStructureIterator_h
20 
21 #include "itkMacro.h"
22 
23 namespace itk
24 {
31 template <typename TStructureType>
32 class ITK_TEMPLATE_EXPORT CorrespondenceDataStructureIterator
33 {
34 public:
37 
39  static unsigned int
41  {
42  return TStructureType::dim;
43  }
44 
46  bool
47  IsAtEnd() const;
48 
50  void
52  {
53  GoToNext();
54  }
55 
57  void
59  {
60  GoToNext();
61  }
62 
65  void
66  GoToNext();
67 
69  void
70  GoToNextBaseGroup();
71 
73  void
74  Reset();
75 
77  CorrespondenceDataStructureIterator(TStructureType * StructurePtr);
78 
80  virtual ~CorrespondenceDataStructureIterator() = default;
81 
82  using CorrespondingListType = typename TStructureType::CorrespondingListType;
83  using ItemType = typename TStructureType::ItemType;
84  using SecondaryNodeListType = typename TStructureType::SecondaryNodeListType;
85  using NodeListType = typename TStructureType::NodeListType;
86 
87  using CorrespondingListIterator = typename CorrespondingListType::iterator;
88  using SecondaryNodeListIterator = typename SecondaryNodeListType::iterator;
89  using NodeListIterator = typename NodeListType::iterator;
90 
94  {
95  return m_CorrespondingListPointer;
96  }
97 
100 
101  typename TStructureType::NodeListType::iterator m_NodeListIterator;
102 
103 protected:
105  bool m_IsAtEnd;
106  TStructureType * m_Structure;
111 };
112 } // end namespace itk
113 
114 #ifndef ITK_MANUAL_INSTANTIATION
115 # include "itkCorrespondenceDataStructureIterator.hxx"
116 #endif
117 
118 #endif
itk::CorrespondenceDataStructureIterator::m_SecondaryListIterator
SecondaryNodeListIterator m_SecondaryListIterator
Definition: itkCorrespondenceDataStructureIterator.h:99
itk::CorrespondenceDataStructureIterator::operator++
void operator++(int)
Definition: itkCorrespondenceDataStructureIterator.h:58
itk::CorrespondenceDataStructureIterator::m_NodeListIterator
TStructureType::NodeListType::iterator m_NodeListIterator
Definition: itkCorrespondenceDataStructureIterator.h:101
itk::CorrespondenceDataStructureIterator::m_IsAtEnd
bool m_IsAtEnd
Definition: itkCorrespondenceDataStructureIterator.h:105
itk::CorrespondenceDataStructureIterator::operator++
void operator++()
Definition: itkCorrespondenceDataStructureIterator.h:51
itk::CorrespondenceDataStructureIterator::m_CorrespondingNodePointer
ItemType * m_CorrespondingNodePointer
Definition: itkCorrespondenceDataStructureIterator.h:107
itk::CorrespondenceDataStructureIterator::NodeListType
typename TStructureType::NodeListType NodeListType
Definition: itkCorrespondenceDataStructureIterator.h:85
itk::CorrespondenceDataStructureIterator::CorrespondingListType
typename TStructureType::CorrespondingListType CorrespondingListType
Definition: itkCorrespondenceDataStructureIterator.h:82
itk::CorrespondenceDataStructureIterator::m_SecondaryListPointer
SecondaryNodeListType * m_SecondaryListPointer
Definition: itkCorrespondenceDataStructureIterator.h:109
itk::CorrespondenceDataStructureIterator::SecondaryNodeListIterator
typename SecondaryNodeListType::iterator SecondaryNodeListIterator
Definition: itkCorrespondenceDataStructureIterator.h:88
itk::CorrespondenceDataStructureIterator::NodeListIterator
typename NodeListType::iterator NodeListIterator
Definition: itkCorrespondenceDataStructureIterator.h:89
itk::CorrespondenceDataStructureIterator::m_CorrespondingListPointer
CorrespondingListType * m_CorrespondingListPointer
Definition: itkCorrespondenceDataStructureIterator.h:108
itk::CorrespondenceDataStructureIterator::m_CorrespondingListIterator
CorrespondingListIterator m_CorrespondingListIterator
Definition: itkCorrespondenceDataStructureIterator.h:98
itk::CorrespondenceDataStructureIterator::m_NodeListPointer
NodeListType * m_NodeListPointer
Definition: itkCorrespondenceDataStructureIterator.h:110
itkMacro.h
itk::CorrespondenceDataStructureIterator::GetCorrespondingListPointer
CorrespondingListType * GetCorrespondingListPointer()
Definition: itkCorrespondenceDataStructureIterator.h:93
itk::CorrespondenceDataStructureIterator::GetIteratorDimension
static unsigned int GetIteratorDimension()
Definition: itkCorrespondenceDataStructureIterator.h:40
itk::CorrespondenceDataStructureIterator::ItemType
typename TStructureType::ItemType ItemType
Definition: itkCorrespondenceDataStructureIterator.h:83
itk::CorrespondenceDataStructureIterator::SecondaryNodeListType
typename TStructureType::SecondaryNodeListType SecondaryNodeListType
Definition: itkCorrespondenceDataStructureIterator.h:84
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::CorrespondenceDataStructureIterator::m_Structure
TStructureType * m_Structure
Definition: itkCorrespondenceDataStructureIterator.h:106
itk::CorrespondenceDataStructureIterator
An iterator designed to easily traverse an CorrespondenceDataStructure.
Definition: itkCorrespondenceDataStructureIterator.h:32
itk::CorrespondenceDataStructureIterator::CorrespondingListIterator
typename CorrespondingListType::iterator CorrespondingListIterator
Definition: itkCorrespondenceDataStructureIterator.h:87