OTB  9.0.0
Orfeo Toolbox
otbSubsampledImageRegionIterator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  * Copyright (C) 2007-2012 Institut Mines Telecom / Telecom Bretagne
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 
23 #ifndef otbSubsampledImageRegionIterator_h
24 #define otbSubsampledImageRegionIterator_h
25 
27 
28 namespace otb
29 {
30 
45 template <class TImage>
47 {
48 public:
52 
55 
56  itkStaticConstMacro(ImageIteratorDimension, unsigned int, Superclass::ImageIteratorDimension);
57 
58  // typedef redefinition from superclass
59  typedef typename Superclass::IndexType IndexType;
60  typedef typename Superclass::SizeType SizeType;
61  typedef typename Superclass::RegionType RegionType;
62  typedef typename Superclass::OffsetType OffsetType;
63  typedef typename Superclass::ImageType ImageType;
64  typedef typename Superclass::PixelContainer PixelContainer;
65  typedef typename Superclass::PixelContainerPointer PixelContainerPointer;
66  typedef typename Superclass::InternalPixelType InternalPixelType;
67  typedef typename Superclass::PixelType PixelType;
68  typedef typename Superclass::AccessorType AccessorType;
69  typedef typename Superclass::IndexValueType IndexValueType;
70 
71  // Constructors
73  {
74  }
75 
77  {
78  }
79 
80  SubsampledImageRegionIterator(const itk::ImageIterator<TImage>& it) : SubsampledImageRegionConstIterator<TImage>(it)
81  {
82  }
83 
84  SubsampledImageRegionIterator(const itk::ImageConstIterator<TImage>& it) : SubsampledImageRegionConstIterator<TImage>(it)
85  {
86  }
87 
89  void Set(const PixelType& value) const
90  {
91  this->m_PixelAccessorFunctor.Set(*(const_cast<InternalPixelType*>(this->m_Buffer + this->m_Offset)), value);
92  }
93 
95  {
96  return *(const_cast<InternalPixelType*>(this->m_Buffer + this->m_Offset));
97  }
98 
99 }; // end of class
100 
101 } // end of namespace otb
102 
103 #endif
otbSubsampledImageRegionConstIterator.h
otb::SubsampledImageRegionConstIterator::ImageType
Superclass::ImageType ImageType
Definition: otbSubsampledImageRegionConstIterator.h:74
otb::SubsampledImageRegionConstIterator::PixelType
Superclass::PixelType PixelType
Definition: otbSubsampledImageRegionConstIterator.h:91
otb::SubsampledImageRegionIterator::RegionType
Superclass::RegionType RegionType
Definition: otbSubsampledImageRegionIterator.h:61
otb::SubsampledImageRegionConstIterator::RegionType
Superclass::RegionType RegionType
Definition: otbSubsampledImageRegionConstIterator.h:70
otb::SubsampledImageRegionIterator::OffsetType
Superclass::OffsetType OffsetType
Definition: otbSubsampledImageRegionIterator.h:62
otb::SubsampledImageRegionConstIterator::InternalPixelType
Superclass::InternalPixelType InternalPixelType
Definition: otbSubsampledImageRegionConstIterator.h:88
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::SubsampledImageRegionIterator::SubsampledImageRegionIterator
SubsampledImageRegionIterator()
Definition: otbSubsampledImageRegionIterator.h:72
otb::SubsampledImageRegionIterator::PixelType
Superclass::PixelType PixelType
Definition: otbSubsampledImageRegionIterator.h:67
otb::SubsampledImageRegionIterator::ImageType
Superclass::ImageType ImageType
Definition: otbSubsampledImageRegionIterator.h:63
otb::SubsampledImageRegionIterator::PixelContainer
Superclass::PixelContainer PixelContainer
Definition: otbSubsampledImageRegionIterator.h:64
otb::SubsampledImageRegionIterator::Self
SubsampledImageRegionIterator Self
Definition: otbSubsampledImageRegionIterator.h:50
otb::SubsampledImageRegionIterator::PixelContainerPointer
Superclass::PixelContainerPointer PixelContainerPointer
Definition: otbSubsampledImageRegionIterator.h:65
otb::SubsampledImageRegionIterator::AccessorType
Superclass::AccessorType AccessorType
Definition: otbSubsampledImageRegionIterator.h:68
otb::SubsampledImageRegionIterator::SubsampledImageRegionIterator
SubsampledImageRegionIterator(const itk::ImageConstIterator< TImage > &it)
Definition: otbSubsampledImageRegionIterator.h:84
otb::SubsampledImageRegionIterator
Regular subsample iterator over an image.
Definition: otbSubsampledImageRegionIterator.h:46
otb::SubsampledImageRegionIterator::SubsampledImageRegionIterator
SubsampledImageRegionIterator(const ImageType *ptr, const RegionType &region)
Definition: otbSubsampledImageRegionIterator.h:76
otb::SubsampledImageRegionIterator::SubsampledImageRegionIterator
SubsampledImageRegionIterator(const itk::ImageIterator< TImage > &it)
Definition: otbSubsampledImageRegionIterator.h:80
otb::SubsampledImageRegionIterator::IndexValueType
Superclass::IndexValueType IndexValueType
Definition: otbSubsampledImageRegionIterator.h:69
otb::SubsampledImageRegionIterator::Set
void Set(const PixelType &value) const
Definition: otbSubsampledImageRegionIterator.h:89
otb::SubsampledImageRegionConstIterator
Regular subsample iterator over an image.
Definition: otbSubsampledImageRegionConstIterator.h:44
otb::SubsampledImageRegionIterator::SizeType
Superclass::SizeType SizeType
Definition: otbSubsampledImageRegionIterator.h:60
otb::SubsampledImageRegionIterator::Value
PixelType & Value(void)
Definition: otbSubsampledImageRegionIterator.h:94
otb::SubsampledImageRegionIterator::IndexType
Superclass::IndexType IndexType
Definition: otbSubsampledImageRegionIterator.h:59
otb::SubsampledImageRegionIterator::Superclass
SubsampledImageRegionConstIterator< TImage > Superclass
Definition: otbSubsampledImageRegionIterator.h:51
otb::SubsampledImageRegionIterator::InternalPixelType
Superclass::InternalPixelType InternalPixelType
Definition: otbSubsampledImageRegionIterator.h:66