ITK  6.0.0
Insight Toolkit
itkReflectiveImageRegionConstIterator.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 itkReflectiveImageRegionConstIterator_h
19#define itkReflectiveImageRegionConstIterator_h
20
22
23namespace itk
24{
53template <typename TImage>
54class ITK_TEMPLATE_EXPORT ReflectiveImageRegionConstIterator : public ImageConstIteratorWithIndex<TImage>
55{
56public:
57
61
66 using IndexType = typename TImage::IndexType;
67
72 using ImageType = TImage;
73
78 using PixelContainer = typename TImage::PixelContainer;
80
87 using SizeType = typename TImage::SizeType;
89
92 using OffsetType = typename TImage::OffsetType;
94
97
100
103 ReflectiveImageRegionConstIterator(TImage * ptr, const RegionType & region);
104
108
117
120 Self &
121 operator=(const Self & it);
122
123 bool
124 IsReflected(unsigned int) const;
125
133 Self &
135
137 void
139
141 bool
142 IsAtBegin() const
143 {
144 return !this->m_Remaining;
145 }
146
149 void
151 {
152 m_BeginOffset = offset;
153 }
154
157 void
158 SetEndOffset(const OffsetType & offset)
159 {
160 m_EndOffset = offset;
161 }
162
165 OffsetType
167 {
168 return m_BeginOffset;
169 }
170
173 OffsetType
175 {
176 return m_EndOffset;
177 }
178
180 void
182
183private:
184 bool m_IsFirstPass[TImage::ImageDimension]{};
185 OffsetType m_BeginOffset{};
186 OffsetType m_EndOffset{};
187};
188} // end namespace itk
189
190#ifndef ITK_MANUAL_INSTANTIATION
191# include "itkReflectiveImageRegionConstIterator.hxx"
192#endif
193
194#endif
A base class for multi-dimensional iterators templated over image type that are designed to efficient...
typename OffsetType::OffsetValueType OffsetValueType
typename SizeType::SizeValueType SizeValueType
typename PixelContainer::Pointer PixelContainerPointer
typename TImage::PixelContainer PixelContainer
Multi-dimensional image iterator which only walks a region.
~ReflectiveImageRegionConstIterator() override=default
ReflectiveImageRegionConstIterator(const Self &it)
ReflectiveImageRegionConstIterator(const ImageConstIteratorWithIndex< TImage > &it)
void FillOffsets(const OffsetValueType &value)
ReflectiveImageRegionConstIterator(TImage *ptr, const RegionType &region)
bool IsReflected(unsigned int) const
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition: itkIntTypes.h:86
long OffsetValueType
Definition: itkIntTypes.h:97