Orfeo Toolbox  4.0
itkShapedNeighborhoodIterator.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 __itkShapedNeighborhoodIterator_h
19 #define __itkShapedNeighborhoodIterator_h
20 
21 #include <vector>
22 #include <list>
24 
25 namespace itk
26 {
150 template< typename TImage, typename TBoundaryCondition =
151  ZeroFluxNeumannBoundaryCondition< TImage > >
153  public ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >
154 {
155 public:
157  typedef typename TImage::InternalPixelType InternalPixelType;
158  typedef typename TImage::PixelType PixelType;
159 
161  itkStaticConstMacro(Dimension, unsigned int, TImage::ImageDimension);
162 
167 
172  typedef typename Superclass::SizeType SizeType;
183 
185  struct Iterator:public ConstIterator {
186  Iterator() {}
188 
191  {
193  return *this;
194  }
195 
196  // Promote to public
197  void Set(const PixelType & v) const
199  };
200 
203  {
204  m_BeginIterator = Iterator(this);
205  m_EndIterator = Iterator(this);
207  }
208 
211 
215  const ImageType *ptr,
216  const RegionType & region
217  ):Superclass(radius, const_cast< ImageType * >( ptr ),
218  region)
219  {
220  m_BeginIterator = Iterator(this);
221  m_EndIterator = Iterator(this);
223  }
224 
225  // Expose the following methods from the superclass. This is a restricted
226  // subset of the methods available for NeighborhoodIterator.
227  using Superclass::SetPixel;
229 
230 
232  Self & operator=(const Self & orig)
233  {
234  Superclass::operator=(orig);
235 
236  // Reset begin and end pointer locations
239  return *this;
240  }
241 
243  virtual void PrintSelf(std::ostream &, Indent) const;
244 
248  Iterator & End() { return m_EndIterator; }
249 
252  const ConstIterator & End() const
253  { return this->m_ConstEndIterator; }
254 
256  {
260  }
261 
262 protected:
263 
266  // purposely not implemented
267 
269 
271  {
275  }
276 
278  {
282  }
283 
286 };
287 } // namespace itk
288 
289 #ifndef ITK_MANUAL_INSTANTIATION
291 #endif
292 
293 #endif

Generated at Sat Mar 8 2014 15:31:08 for Orfeo Toolbox with doxygen 1.8.3.1