ITK  4.2.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 {
51 template< typename TImage >
53 {
54 public:
58 
63  typedef typename TImage::IndexType IndexType;
64 
69  typedef TImage ImageType;
70 
75  typedef typename TImage::PixelContainer PixelContainer;
76  typedef typename PixelContainer::Pointer PixelContainerPointer;
77 
83  typedef typename TImage::RegionType RegionType;
84  typedef typename TImage::SizeType SizeType;
86 
89  typedef typename TImage::OffsetType OffsetType;
91 
94 
97 
100  ReflectiveImageRegionConstIterator(TImage *ptr, const RegionType & region);
101 
104  ReflectiveImageRegionConstIterator(const Self & it);
105 
114 
117  Self & operator=(const Self & it);
118 
119  bool IsReflected(unsigned int) const;
120 
128  Self & operator++();
129 
131  void GoToBegin(void);
132 
134  bool IsAtBegin(void) const
135  {
136  return !this->m_Remaining;
137  }
138 
141  void SetBeginOffset(const OffsetType & offset)
142  { m_BeginOffset = offset; }
143 
146  void SetEndOffset(const OffsetType & offset)
147  { m_EndOffset = offset; }
148 
151  OffsetType GetBeginOffset(const OffsetType & )
152  { return m_BeginOffset; }
153 
156  OffsetType GetEndOffset(const OffsetType & )
157  { return m_EndOffset; }
158 
160  void FillOffsets(const OffsetValueType & value);
161 
162 private:
163  bool m_IsFirstPass[TImage::ImageDimension];
166 };
167 } // end namespace itk
168 
169 #ifndef ITK_MANUAL_INSTANTIATION
170 #include "itkReflectiveImageRegionConstIterator.hxx"
171 #endif
172 
173 #endif
174