OTB  10.0.0
Orfeo Toolbox
otbPolyLineImageIterator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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
Uses the bresenham algorithm to iterate over a polyline on an image (const version).
Uses the bresenham algorithm to iterate over a polyline on an image.
TImage::InternalPixelType InternalPixelType
void Set(const PixelType &value)
PathType::VertexListType VertexListType
TImage::OffsetValueType OffsetValueType
VertexListType::ConstIterator VertexIteratorType
Self & operator=(const Self &it)
TImage::SizeValueType SizeValueType
PolyLineImageIterator(ImageType *imagePtr, PathType *pathPtr)
TImage::IndexValueType IndexValueType
TImage::PixelContainer PixelContainer
PolyLineImageConstIterator< TImage, TPath > Superclass
itk::LineIterator< ImageType > InternalImageIteratorType
PixelContainer::Pointer PixelContainerPointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.