OTB  9.0.0
Orfeo Toolbox
otbPolyLineImageIterator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbPolyLineImageIterator_h
22 #define otbPolyLineImageIterator_h
23 
25 
26 namespace otb
27 {
43 template <class TImage, class TPath>
44 class ITK_EXPORT PolyLineImageIterator : public PolyLineImageConstIterator<TImage, TPath>
45 {
46 public:
50 
51  itkStaticConstMacro(ImageIteratorDimension, unsigned int, TImage::ImageDimension);
52 
53  typedef typename TImage::IndexType IndexType;
54  typedef typename TImage::IndexValueType IndexValueType;
55  typedef typename TImage::OffsetType OffsetType;
56  typedef typename TImage::OffsetValueType OffsetValueType;
57  typedef typename TImage::SizeType SizeType;
58  typedef typename TImage::SizeValueType SizeValueType;
59  typedef typename TImage::RegionType RegionType;
60  typedef typename TImage::SpacingType SpacingType;
61  typedef typename TImage::PointType PointType;
62  typedef TImage ImageType;
63  typedef TPath PathType;
64  typedef typename PathType::VertexType VertexType;
65  typedef typename PathType::VertexListType VertexListType;
66  typedef typename VertexListType::ConstIterator VertexIteratorType;
67  typedef itk::LineIterator<ImageType> InternalImageIteratorType;
68  typedef typename TImage::PixelContainer PixelContainer;
69  typedef typename PixelContainer::Pointer PixelContainerPointer;
70  typedef typename TImage::InternalPixelType InternalPixelType;
71  typedef typename TImage::PixelType PixelType;
72  typedef typename TImage::AccessorType AccessorType;
73 
75  void Set(const PixelType& value)
76  {
77  this->m_InternalImageIterator.Set(value);
78  }
79 
84  {
85  return this->m_InternalImageIterator.Value();
86  }
87  Self& operator=(const Self& it)
88  {
89  this->Superclass::operator=(it);
90  return *this;
91  }
93 
95  PolyLineImageIterator(ImageType* imagePtr, PathType* pathPtr) : Superclass(imagePtr, pathPtr){};
96 
99  {
100  }
101 };
102 } // End namespace otb
103 
104 #endif
otb::PolyLineImageIterator::ImageType
TImage ImageType
Definition: otbPolyLineImageIterator.h:62
otb::PolyLineImageIterator::SizeType
TImage::SizeType SizeType
Definition: otbPolyLineImageIterator.h:57
otb::PolyLineImageIterator::OffsetValueType
TImage::OffsetValueType OffsetValueType
Definition: otbPolyLineImageIterator.h:56
otb::PolyLineImageIterator::PathType
TPath PathType
Definition: otbPolyLineImageIterator.h:63
otb::PolyLineImageIterator::operator=
Self & operator=(const Self &it)
Definition: otbPolyLineImageIterator.h:87
otb::PolyLineImageConstIterator::ImageType
TImage ImageType
Definition: otbPolyLineImageConstIterator.h:63
otb::PolyLineImageIterator::Superclass
PolyLineImageConstIterator< TImage, TPath > Superclass
Definition: otbPolyLineImageIterator.h:49
otb::PolyLineImageIterator::Self
PolyLineImageIterator Self
Definition: otbPolyLineImageIterator.h:48
otb::PolyLineImageIterator::IndexValueType
TImage::IndexValueType IndexValueType
Definition: otbPolyLineImageIterator.h:54
otb::PolyLineImageIterator::VertexType
PathType::VertexType VertexType
Definition: otbPolyLineImageIterator.h:64
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::PolyLineImageIterator::RegionType
TImage::RegionType RegionType
Definition: otbPolyLineImageIterator.h:59
otb::PolyLineImageIterator::PixelContainer
TImage::PixelContainer PixelContainer
Definition: otbPolyLineImageIterator.h:68
otb::PolyLineImageIterator::Set
void Set(const PixelType &value)
Definition: otbPolyLineImageIterator.h:75
otb::PolyLineImageIterator::SizeValueType
TImage::SizeValueType SizeValueType
Definition: otbPolyLineImageIterator.h:58
otb::PolyLineImageIterator
Uses the bresenham algorithm to iterate over a polyline on an image.
Definition: otbPolyLineImageIterator.h:44
otb::PolyLineImageIterator::~PolyLineImageIterator
~PolyLineImageIterator() override
Definition: otbPolyLineImageIterator.h:98
otb::PolyLineImageConstIterator
Uses the bresenham algorithm to iterate over a polyline on an image (const version).
Definition: otbPolyLineImageConstIterator.h:46
otb::PolyLineImageConstIterator::PathType
TPath PathType
Definition: otbPolyLineImageConstIterator.h:64
otb::PolyLineImageIterator::VertexListType
PathType::VertexListType VertexListType
Definition: otbPolyLineImageIterator.h:65
otb::PolyLineImageConstIterator::PixelType
TImage::PixelType PixelType
Definition: otbPolyLineImageConstIterator.h:72
otb::PolyLineImageIterator::PixelContainerPointer
PixelContainer::Pointer PixelContainerPointer
Definition: otbPolyLineImageIterator.h:69
otb::PolyLineImageIterator::PolyLineImageIterator
PolyLineImageIterator(ImageType *imagePtr, PathType *pathPtr)
Definition: otbPolyLineImageIterator.h:95
otb::PolyLineImageIterator::InternalImageIteratorType
itk::LineIterator< ImageType > InternalImageIteratorType
Definition: otbPolyLineImageIterator.h:67
otb::PolyLineImageIterator::OffsetType
TImage::OffsetType OffsetType
Definition: otbPolyLineImageIterator.h:55
otb::PolyLineImageIterator::AccessorType
TImage::AccessorType AccessorType
Definition: otbPolyLineImageIterator.h:72
otb::PolyLineImageIterator::Value
PixelType & Value(void)
Definition: otbPolyLineImageIterator.h:83
otb::PolyLineImageIterator::VertexIteratorType
VertexListType::ConstIterator VertexIteratorType
Definition: otbPolyLineImageIterator.h:66
otb::PolyLineImageIterator::IndexType
TImage::IndexType IndexType
Definition: otbPolyLineImageIterator.h:53
otb::PolyLineImageIterator::PixelType
TImage::PixelType PixelType
Definition: otbPolyLineImageIterator.h:71
otbPolyLineImageConstIterator.h
otb::PolyLineImageIterator::InternalPixelType
TImage::InternalPixelType InternalPixelType
Definition: otbPolyLineImageIterator.h:70
otb::PolyLineImageIterator::PointType
TImage::PointType PointType
Definition: otbPolyLineImageIterator.h:61
otb::PolyLineImageIterator::SpacingType
TImage::SpacingType SpacingType
Definition: otbPolyLineImageIterator.h:60