Orfeo Toolbox  3.16
otbPolyLineImageConstIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #ifndef __otbPolyLineImageConstIterator_h
19 #define __otbPolyLineImageConstIterator_h
20 
21 #include "itkIndex.h"
22 #include "itkImage.h"
23 #include "itkLineIterator.h"
24 
25 namespace otb
26 {
40 template <class TImage, class TPath>
42 {
43 public:
46 
47  itkStaticConstMacro(ImageIteratorDimension, unsigned int,
48  TImage::ImageDimension);
49 
50  typedef typename TImage::IndexType IndexType;
51  typedef typename TImage::IndexValueType IndexValueType;
52  typedef typename TImage::OffsetType OffsetType;
53  typedef typename TImage::OffsetValueType OffsetValueType;
54  typedef typename TImage::SizeType SizeType;
55  typedef typename TImage::SizeValueType SizeValueType;
56  typedef typename TImage::RegionType RegionType;
57  typedef typename TImage::SpacingType SpacingType;
58  typedef typename TImage::PointType PointType;
59  typedef TImage ImageType;
60  typedef TPath PathType;
61  typedef typename PathType::VertexType VertexType;
62  typedef typename PathType::VertexListType VertexListType;
63  typedef typename VertexListType::ConstIterator VertexIteratorType;
65  typedef typename TImage::PixelContainer PixelContainer;
66  typedef typename PixelContainer::Pointer PixelContainerPointer;
67  typedef typename TImage::InternalPixelType InternalPixelType;
68  typedef typename TImage::PixelType PixelType;
69  typedef typename TImage::AccessorType AccessorType;
70 
72  itkTypeMacro(PolyLineImageConstIterator, None);
73 
75  static unsigned int GetImageIteratorDimension()
76  {
77  return TImage::ImageDimension;
78  }
80  const IndexType GetIndex()
81  {
82  return m_InternalImageIterator.GetIndex();
83  }
85  const PixelType& Get(void) const
86  {
87  return m_InternalImageIterator.Get();
88  }
90  bool IsAtEnd()
91  {
92  return (m_InternalVertexIterator == m_Path->GetVertexList()->End())
93  && m_InternalImageIterator.IsAtEnd();
94  }
96  void GoToBegin();
98  void operator ++();
101  Self& operator =(const Self& it);
103  PolyLineImageConstIterator(const ImageType * imagePtr, const PathType * pathPtr);
106 
107 protected: //made protected so other iterators can access
108 
110  typename ImageType::ConstWeakPointer m_Image;
111 
113  typename PathType::ConstPointer m_Path;
116 };
117 
118 } // End namespace otb
119 #ifndef OTB_MANUAL_INSTANTIATION
121 #endif
122 
123 #endif

Generated at Sun May 19 2013 00:44:24 for Orfeo Toolbox with doxygen 1.8.3.1