ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkReflectiveImageRegionConstIterator.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 itkReflectiveImageRegionConstIterator_h
19 #define itkReflectiveImageRegionConstIterator_h
20 
22 
23 namespace itk
24 {
52 template< typename TImage >
53 class ITK_TEMPLATE_EXPORT ReflectiveImageRegionConstIterator:public ImageConstIteratorWithIndex< TImage >
54 {
55 public:
59 
64  using IndexType = typename TImage::IndexType;
65 
70  using ImageType = TImage;
71 
76  using PixelContainer = typename TImage::PixelContainer;
77  using PixelContainerPointer = typename PixelContainer::Pointer;
78 
84  using RegionType = typename TImage::RegionType;
85  using SizeType = typename TImage::SizeType;
87 
90  using OffsetType = typename TImage::OffsetType;
92 
95 
97  ~ReflectiveImageRegionConstIterator() override = default;
98 
101  ReflectiveImageRegionConstIterator(TImage *ptr, const RegionType & region);
102 
106 
115 
118  Self & operator=(const Self & it);
119 
120  bool IsReflected(unsigned int) const;
121 
129  Self & operator++();
130 
132  void GoToBegin();
133 
135  bool IsAtBegin() const
136  {
137  return !this->m_Remaining;
138  }
139 
142  void SetBeginOffset(const OffsetType & offset)
143  { m_BeginOffset = offset; }
144 
147  void SetEndOffset(const OffsetType & offset)
148  { m_EndOffset = offset; }
149 
153  { return m_BeginOffset; }
154 
158  { return m_EndOffset; }
159 
161  void FillOffsets(const OffsetValueType & value);
162 
163 private:
164  bool m_IsFirstPass[TImage::ImageDimension];
167 };
168 } // end namespace itk
169 
170 #ifndef ITK_MANUAL_INSTANTIATION
171 #include "itkReflectiveImageRegionConstIterator.hxx"
172 #endif
173 
174 #endif
typename SizeType::SizeValueType SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
typename PixelContainer::Pointer PixelContainerPointer
Multi-dimensional image iterator which only walks a region.
typename OffsetType::OffsetValueType OffsetValueType
A base class for multi-dimensional iterators templated over image type that are designed to efficient...
typename TImage::PixelContainer PixelContainer
signed long OffsetValueType
Definition: itkIntTypes.h:94