OTB  10.0.0
Orfeo Toolbox
otbContinuousMinimumMaximumImageCalculator.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 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:
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
Compute the continuous maximum and the minimum of an image.
ContinuousMinimumMaximumImageCalculator(const Self &)=delete
~ContinuousMinimumMaximumImageCalculator() override=default
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:92
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.