ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkCorrespondenceDataStructureIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 GetIteratorDimension()
40  {
41  return TStructureType::dim;
42  }
43 
45  bool IsAtEnd() const;
46 
48  void operator++(){ GoToNext(); }
49 
51  void operator++(int){ GoToNext(); }
52 
55  void GoToNext();
56 
58  void GoToNextBaseGroup();
59 
61  void Reset();
62 
64  CorrespondenceDataStructureIterator(TStructureType *StructurePtr);
65 
67  virtual ~CorrespondenceDataStructureIterator() = default;
68 
69  using CorrespondingListType = typename TStructureType::CorrespondingListType;
70  using ItemType = typename TStructureType::ItemType;
71  using SecondaryNodeListType = typename TStructureType::SecondaryNodeListType;
72  using NodeListType = typename TStructureType::NodeListType;
73 
74  using CorrespondingListIterator = typename CorrespondingListType::iterator;
75  using SecondaryNodeListIterator = typename SecondaryNodeListType::iterator;
76  using NodeListIterator = typename NodeListType::iterator;
77 
80  {
81  return m_CorrespondingListPointer;
82  }
83 
86 
87  typename TStructureType::NodeListType::iterator m_NodeListIterator;
88 
89 protected:
90 
92  bool m_IsAtEnd;
93  TStructureType * m_Structure;
98 };
99 } // end namespace itk
100 
101 #ifndef ITK_MANUAL_INSTANTIATION
102 #include "itkCorrespondenceDataStructureIterator.hxx"
103 #endif
104 
105 #endif
TStructureType::NodeListType::iterator m_NodeListIterator
typename CorrespondingListType::iterator CorrespondingListIterator
typename SecondaryNodeListType::iterator SecondaryNodeListIterator
typename TStructureType::CorrespondingListType CorrespondingListType
An iterator designed to easily traverse an CorrespondenceDataStructure.
typename TStructureType::SecondaryNodeListType SecondaryNodeListType