ITK  4.13.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  typedef typename TImage::IndexType IndexType;
65 
70  typedef TImage ImageType;
71 
76  typedef typename TImage::PixelContainer PixelContainer;
77  typedef typename PixelContainer::Pointer PixelContainerPointer;
78 
84  typedef typename TImage::RegionType RegionType;
85  typedef typename TImage::SizeType SizeType;
87 
90  typedef typename TImage::OffsetType OffsetType;
92 
95 
98 
101  ReflectiveImageRegionConstIterator(TImage *ptr, const RegionType & region);
102 
105  ReflectiveImageRegionConstIterator(const Self & it);
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(void) 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
signed long OffsetValueType
Definition: itkIntTypes.h:154
Multi-dimensional image iterator which only walks a region.
unsigned long SizeValueType
Definition: itkIntTypes.h:143
A base class for multi-dimensional iterators templated over image type that are designed to efficient...