ITK  6.0.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 * https://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
23namespace itk
24{
31template <typename TStructureType>
32class ITK_TEMPLATE_EXPORT CorrespondenceDataStructureIterator
33{
34public:
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
67
69 void
71
73 void
75
77 CorrespondenceDataStructureIterator(TStructureType * StructurePtr);
78
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
98 CorrespondingListIterator m_CorrespondingListIterator{};
99 SecondaryNodeListIterator m_SecondaryListIterator{};
100
101 typename TStructureType::NodeListType::iterator m_NodeListIterator{};
102
103protected:
105 bool m_IsAtEnd{};
106 TStructureType * m_Structure{};
107 ItemType * m_CorrespondingNodePointer{};
108 CorrespondingListType * m_CorrespondingListPointer{};
109 SecondaryNodeListType * m_SecondaryListPointer{};
110 NodeListType * m_NodeListPointer{};
111};
112} // end namespace itk
113
114#ifndef ITK_MANUAL_INSTANTIATION
115# include "itkCorrespondenceDataStructureIterator.hxx"
116#endif
117
118#endif
An iterator designed to easily traverse an CorrespondenceDataStructure.
typename TStructureType::CorrespondingListType CorrespondingListType
typename CorrespondingListType::iterator CorrespondingListIterator
virtual ~CorrespondenceDataStructureIterator()=default
CorrespondenceDataStructureIterator(TStructureType *StructurePtr)
typename TStructureType::SecondaryNodeListType SecondaryNodeListType
typename SecondaryNodeListType::iterator SecondaryNodeListIterator
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....