OTB  10.0.0
Orfeo Toolbox
otbSarRadiometricCalibrationFunction.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 otbSarRadiometricCalibrationFunction_h
22 #define otbSarRadiometricCalibrationFunction_h
23 
26 
28 
29 #include "otbMath.h"
30 namespace otb
31 {
49 template <class TInputImage, class TCoordRep = float>
51  : public itk::ImageFunction<TInputImage, typename itk::NumericTraits<typename TInputImage::PixelType>::AbsType, TCoordRep>
52 {
53 public:
56  typedef itk::ImageFunction<TInputImage, typename itk::NumericTraits<typename TInputImage::PixelType>::AbsType, TCoordRep> Superclass;
57  typedef itk::SmartPointer<Self> Pointer;
58  typedef itk::SmartPointer<const Self> ConstPointer;
59 
61  itkTypeMacro(SarRadiometricCalibrationFunction, itk::ImageFunction);
62 
64  itkNewMacro(Self);
65 
67  typedef TInputImage InputImageType;
68  typedef typename InputImageType::PixelType InputPixelType;
69  typedef typename Superclass::OutputType OutputType;
70  typedef typename Superclass::IndexType IndexType;
71  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
72  typedef typename Superclass::PointType PointType;
73 
74  itkStaticConstMacro(ImageDimension, unsigned int, InputImageType::ImageDimension);
75 
77  typedef double RealType;
78  // typedef otb::Functor::SarRadiometricCalibrationFunctor<RealType, RealType> FunctorType;
79  // typedef typename FunctorType::RealType FunctorRealType;
80 
84 
87 
89  OutputType EvaluateAtIndex(const IndexType& index) const override;
90 
92  OutputType Evaluate(const PointType& point) const override
93  {
94  IndexType index;
95  this->ConvertPointToNearestIndex(point, index);
96  return this->EvaluateAtIndex(index);
97  }
99 
101  {
102  IndexType index;
103  this->ConvertContinuousIndexToNearestIndex(cindex, index);
104  return this->EvaluateAtIndex(index);
105  }
106 
111  void SetInputImage(const InputImageType* ptr) override;
112 
113 
115  itkSetMacro(Scale, RealType);
116  itkGetMacro(Scale, RealType);
118 
120  itkSetObjectMacro(Noise, ParametricFunctionType);
121  itkGetConstObjectMacro(Noise, ParametricFunctionType);
124 
126  itkSetMacro(EnableNoise, bool);
127  itkGetMacro(EnableNoise, bool);
129 
131  itkSetObjectMacro(AntennaPatternNewGain, ParametricFunctionType);
132  itkGetConstObjectMacro(AntennaPatternNewGain, ParametricFunctionType);
133  itkGetObjectMacro(AntennaPatternNewGain, ParametricFunctionType);
135 
137  itkSetObjectMacro(AntennaPatternOldGain, ParametricFunctionType);
138  itkGetObjectMacro(AntennaPatternOldGain, ParametricFunctionType);
139  itkGetConstObjectMacro(AntennaPatternOldGain, ParametricFunctionType);
141 
143  itkSetObjectMacro(IncidenceAngle, ParametricFunctionType);
144  itkGetConstObjectMacro(IncidenceAngle, ParametricFunctionType);
147 
149  itkSetObjectMacro(RangeSpreadLoss, ParametricFunctionType);
150  itkGetConstObjectMacro(RangeSpreadLoss, ParametricFunctionType);
153 
155  itkSetMacro(RescalingFactor, RealType);
156 
158  itkSetMacro(ApplyAntennaPatternGain, bool);
159  itkGetMacro(ApplyAntennaPatternGain, bool);
161 
162  itkSetMacro(ApplyIncidenceAngleCorrection, bool);
163  itkGetMacro(ApplyIncidenceAngleCorrection, bool);
164 
165  itkSetMacro(ApplyRangeSpreadLossCorrection, bool);
166  itkGetMacro(ApplyRangeSpreadLossCorrection, bool);
167 
168  itkSetMacro(ApplyLookupDataCorrection, bool);
169  itkGetMacro(ApplyLookupDataCorrection, bool);
170 
171  itkSetMacro(ApplyRescalingFactor, bool);
172  itkGetMacro(ApplyRescalingFactor, bool);
173 
175 
178  {
179  m_Lut = lut;
180  }
181 
184  {
185  m_NoiseLut = lut;
186  }
187 
188 protected:
191 
194  {
195  }
196 
198  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
199 
202 private:
204  void operator=(const Self&) = delete;
205 
221 };
222 
223 } // end namespace otb
224 
225 #ifndef OTB_MANUAL_INSTANTIATION
227 #endif
228 
229 #endif
Evaluates a parametric bidimensionnal polynomial model from a PointSet.
itk::SmartPointer< const Self > ConstPointer
Calculate the backscatter for the given pixel.
itkGetObjectMacro(Noise, ParametricFunctionType)
typename Sentinel1ThermalNoiseLookupType::Pointer Sentinel1ThermalNoiseLookupPointerType
otb::SarParametricMapFunction< InputImageType > ParametricFunctionType
itkGetObjectMacro(IncidenceAngle, ParametricFunctionType)
ParametricFunctionType::ConstPointer ParametricFunctionConstPointer
SarRadiometricCalibrationFunction(const Self &)=delete
void operator=(const Self &)=delete
itkGetObjectMacro(RangeSpreadLoss, ParametricFunctionType)
itkGetObjectMacro(AntennaPatternOldGain, ParametricFunctionType)
OutputType Evaluate(const PointType &point) const override
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &cindex) const override
itk::ImageFunction< TInputImage, typename itk::NumericTraits< typename TInputImage::PixelType >::AbsType, TCoordRep > Superclass
itkGetObjectMacro(AntennaPatternNewGain, ParametricFunctionType)
Calculate the Sentinel 1 thermal noise contribution for the given pixel.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.