ITK  4.13.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();
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 
68 
69  typedef typename TStructureType::CorrespondingListType CorrespondingListType;
70  typedef typename TStructureType::ItemType ItemType;
71  typedef typename TStructureType::SecondaryNodeListType SecondaryNodeListType;
72  typedef typename TStructureType::NodeListType NodeListType;
73 
74  typedef typename CorrespondingListType::iterator CorrespondingListIterator;
75  typedef typename SecondaryNodeListType::iterator SecondaryNodeListIterator;
76  typedef typename NodeListType::iterator NodeListIterator;
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
An iterator designed to easily traverse an CorrespondenceDataStructure.
TStructureType::SecondaryNodeListType SecondaryNodeListType
TStructureType::CorrespondingListType CorrespondingListType