OTB  6.7.0
Orfeo Toolbox
otbContinuousMinimumMaximumImageCalculator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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>
66  public itk::Object
67 {
68 public:
74 
76  itkNewMacro(Self);
77 
80 
82  typedef TInputImage ImageType;
83 
85  typedef typename TInputImage::Pointer ImagePointer;
86 
88  typedef typename TInputImage::ConstPointer ImageConstPointer;
89 
91  typedef typename TInputImage::PixelType PixelType;
92 
95 
98 
101 
103  typedef typename TInputImage::RegionType RegionType;
104 
106  itkSetConstObjectMacro(Image, ImageType);
107 
109  void ComputeMinimum(void);
110 
112  void ComputeMaximum(void);
113 
115  void Compute(void);
116 
118  itkGetMacro(Minimum, PixelType);
119 
121  itkGetMacro(Maximum, PixelType);
122 
124  itkGetConstReferenceMacro(IndexOfMinimum, IndexType);
125 
127  itkGetConstReferenceMacro(IndexOfMaximum, IndexType);
128 
130  itkGetConstReferenceMacro(ContinuousIndexOfMinimum, ContinuousIndexType);
131 
133  itkGetConstReferenceMacro(ContinuousIndexOfMaximum, ContinuousIndexType);
134 
136  void SetRegion(const RegionType& region);
137 
138 protected:
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 
162 } // end namespace otb
163 
164 #ifndef OTB_MANUAL_INSTANTIATION
166 #endif
167 
168 #endif
Compute the continuous maximum and the minimum of an image.
itk::Index< Monteverdi_DIMENSION > IndexType
Definition: mvdTypes.h:133
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:89
VectorImageType::PointType PointType
Definition: mvdTypes.h:189