OTB  9.0.0
Orfeo Toolbox
otbContinuousMinimumMaximumImageCalculator.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 otbContinuousMinimumMaximumImageCalculator_h
22 #define otbContinuousMinimumMaximumImageCalculator_h
23 
24 #include "itkObject.h"
25 #include "itkObjectFactory.h"
26 #include "itkNumericTraits.h"
27 
28 namespace otb
29 {
64 template <class TInputImage>
65 class ITK_EXPORT ContinuousMinimumMaximumImageCalculator : public itk::Object
66 {
67 public:
70  typedef itk::Object Superclass;
71  typedef itk::SmartPointer<Self> Pointer;
72  typedef itk::SmartPointer<const Self> ConstPointer;
73 
75  itkNewMacro(Self);
76 
79 
81  typedef TInputImage ImageType;
82 
84  typedef typename TInputImage::Pointer ImagePointer;
85 
87  typedef typename TInputImage::ConstPointer ImageConstPointer;
88 
90  typedef typename TInputImage::PixelType PixelType;
91 
93  typedef typename itk::NumericTraits<PixelType>::RealType RealPixelType;
94 
96  typedef typename TInputImage::IndexType IndexType;
97 
99  typedef typename TInputImage::PointType ContinuousIndexType;
100 
102  typedef typename TInputImage::RegionType RegionType;
103 
105  itkSetConstObjectMacro(Image, ImageType);
106 
108  void ComputeMinimum(void);
109 
111  void ComputeMaximum(void);
112 
114  void Compute(void);
115 
117  itkGetMacro(Minimum, PixelType);
118 
120  itkGetMacro(Maximum, PixelType);
121 
123  itkGetConstReferenceMacro(IndexOfMinimum, IndexType);
124 
126  itkGetConstReferenceMacro(IndexOfMaximum, IndexType);
127 
129  itkGetConstReferenceMacro(ContinuousIndexOfMinimum, ContinuousIndexType);
130 
132  itkGetConstReferenceMacro(ContinuousIndexOfMaximum, ContinuousIndexType);
133 
135  void SetRegion(const RegionType& region);
136 
137 protected:
139  ~ContinuousMinimumMaximumImageCalculator() override = default;
140 
141  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
142 
146 
152 
155 
156 private:
158  void operator=(const Self&) = delete;
159 };
160 
161 } // end namespace otb
162 
163 #ifndef OTB_MANUAL_INSTANTIATION
165 #endif
166 
167 #endif
otb::ContinuousMinimumMaximumImageCalculator::m_RegionSetByUser
bool m_RegionSetByUser
Definition: otbContinuousMinimumMaximumImageCalculator.h:154
otb::ContinuousMinimumMaximumImageCalculator::RealPixelType
itk::NumericTraits< PixelType >::RealType RealPixelType
Definition: otbContinuousMinimumMaximumImageCalculator.h:93
otb::ContinuousMinimumMaximumImageCalculator::m_IndexOfMaximum
IndexType m_IndexOfMaximum
Definition: otbContinuousMinimumMaximumImageCalculator.h:148
otbContinuousMinimumMaximumImageCalculator.hxx
otb::ContinuousMinimumMaximumImageCalculator::m_Image
ImageConstPointer m_Image
Definition: otbContinuousMinimumMaximumImageCalculator.h:151
otb::ContinuousMinimumMaximumImageCalculator::m_ContinuousIndexOfMaximum
ContinuousIndexType m_ContinuousIndexOfMaximum
Definition: otbContinuousMinimumMaximumImageCalculator.h:150
otb::ContinuousMinimumMaximumImageCalculator::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbContinuousMinimumMaximumImageCalculator.h:72
otb::ContinuousMinimumMaximumImageCalculator::Self
ContinuousMinimumMaximumImageCalculator Self
Definition: otbContinuousMinimumMaximumImageCalculator.h:69
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Image
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:89
otb::ContinuousMinimumMaximumImageCalculator::m_Maximum
PixelType m_Maximum
Definition: otbContinuousMinimumMaximumImageCalculator.h:144
otb::ContinuousMinimumMaximumImageCalculator::ImageType
TInputImage ImageType
Definition: otbContinuousMinimumMaximumImageCalculator.h:78
otb::ContinuousMinimumMaximumImageCalculator::ContinuousIndexType
TInputImage::PointType ContinuousIndexType
Definition: otbContinuousMinimumMaximumImageCalculator.h:99
otb::ContinuousMinimumMaximumImageCalculator::m_ContinuousImage
ImageConstPointer m_ContinuousImage
Definition: otbContinuousMinimumMaximumImageCalculator.h:145
otb::ContinuousMinimumMaximumImageCalculator::m_ContinuousIndexOfMinimum
ContinuousIndexType m_ContinuousIndexOfMinimum
Definition: otbContinuousMinimumMaximumImageCalculator.h:149
otb::ContinuousMinimumMaximumImageCalculator::m_IndexOfMinimum
IndexType m_IndexOfMinimum
Definition: otbContinuousMinimumMaximumImageCalculator.h:147
otb::ContinuousMinimumMaximumImageCalculator::Superclass
itk::Object Superclass
Definition: otbContinuousMinimumMaximumImageCalculator.h:70
otb::ContinuousMinimumMaximumImageCalculator::ImagePointer
TInputImage::Pointer ImagePointer
Definition: otbContinuousMinimumMaximumImageCalculator.h:84
otb::ContinuousMinimumMaximumImageCalculator::PixelType
TInputImage::PixelType PixelType
Definition: otbContinuousMinimumMaximumImageCalculator.h:90
otb::ContinuousMinimumMaximumImageCalculator::IndexType
TInputImage::IndexType IndexType
Definition: otbContinuousMinimumMaximumImageCalculator.h:96
otb::ContinuousMinimumMaximumImageCalculator::ImageConstPointer
TInputImage::ConstPointer ImageConstPointer
Definition: otbContinuousMinimumMaximumImageCalculator.h:87
otb::ContinuousMinimumMaximumImageCalculator::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbContinuousMinimumMaximumImageCalculator.h:71
otb::ContinuousMinimumMaximumImageCalculator::m_Minimum
PixelType m_Minimum
Definition: otbContinuousMinimumMaximumImageCalculator.h:143
otb::ContinuousMinimumMaximumImageCalculator
Compute the continuous maximum and the minimum of an image.
Definition: otbContinuousMinimumMaximumImageCalculator.h:65
otb::ContinuousMinimumMaximumImageCalculator::RegionType
TInputImage::RegionType RegionType
Definition: otbContinuousMinimumMaximumImageCalculator.h:102
otb::ContinuousMinimumMaximumImageCalculator::m_Region
RegionType m_Region
Definition: otbContinuousMinimumMaximumImageCalculator.h:153