OTB  9.0.0
Orfeo Toolbox
otbSarRadiometricCalibrationFunction.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 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);
122  itkGetObjectMacro(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);
145  itkGetObjectMacro(IncidenceAngle, ParametricFunctionType);
147 
149  itkSetObjectMacro(RangeSpreadLoss, ParametricFunctionType);
150  itkGetConstObjectMacro(RangeSpreadLoss, ParametricFunctionType);
151  itkGetObjectMacro(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:
203  SarRadiometricCalibrationFunction(const Self&) = delete;
204  void operator=(const Self&) = delete;
205 
221 };
222 
223 } // end namespace otb
224 
225 #ifndef OTB_MANUAL_INSTANTIATION
227 #endif
228 
229 #endif
otb::Sentinel1ThermalNoiseLookupData::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSentinel1ThermalNoiseLookupData.h:68
otb::SarRadiometricCalibrationFunction::Evaluate
OutputType Evaluate(const PointType &point) const override
Definition: otbSarRadiometricCalibrationFunction.h:92
otb::SarRadiometricCalibrationFunction::LookupDataPointer
SarCalibrationLookupData::Pointer LookupDataPointer
Definition: otbSarRadiometricCalibrationFunction.h:172
otb::SarRadiometricCalibrationFunction::m_Scale
RealType m_Scale
Definition: otbSarRadiometricCalibrationFunction.h:206
otb::SarRadiometricCalibrationFunction::ParametricFunctionPointer
ParametricFunctionType::Pointer ParametricFunctionPointer
Definition: otbSarRadiometricCalibrationFunction.h:82
otb::SarRadiometricCalibrationFunction::m_AntennaPatternOldGain
ParametricFunctionPointer m_AntennaPatternOldGain
Definition: otbSarRadiometricCalibrationFunction.h:216
otb::SarRadiometricCalibrationFunction::IndexType
Superclass::IndexType IndexType
Definition: otbSarRadiometricCalibrationFunction.h:70
otb::SarRadiometricCalibrationFunction::m_ApplyRescalingFactor
bool m_ApplyRescalingFactor
Definition: otbSarRadiometricCalibrationFunction.h:213
otb::SarRadiometricCalibrationFunction::RealType
double RealType
Definition: otbSarRadiometricCalibrationFunction.h:77
otb::SarCalibrationLookupData::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSarCalibrationLookupData.h:45
otbMath.h
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::SarRadiometricCalibrationFunction::m_NoiseLut
LookupDataPointer m_NoiseLut
Definition: otbSarRadiometricCalibrationFunction.h:220
otb::SarParametricMapFunction::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSarParametricMapFunction.h:51
otb::SarRadiometricCalibrationFunction::m_IncidenceAngle
ParametricFunctionPointer m_IncidenceAngle
Definition: otbSarRadiometricCalibrationFunction.h:217
otb::SarRadiometricCalibrationFunction::PointType
Superclass::PointType PointType
Definition: otbSarRadiometricCalibrationFunction.h:72
otb::SarRadiometricCalibrationFunction::~SarRadiometricCalibrationFunction
~SarRadiometricCalibrationFunction() override
Definition: otbSarRadiometricCalibrationFunction.h:193
otb::SarRadiometricCalibrationFunction::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSarRadiometricCalibrationFunction.h:57
otbSarCalibrationLookupData.h
otb::SarRadiometricCalibrationFunction::Self
SarRadiometricCalibrationFunction Self
Definition: otbSarRadiometricCalibrationFunction.h:55
otb::SarParametricMapFunction::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSarParametricMapFunction.h:50
otb::SarRadiometricCalibrationFunction::ParametricFunctionType
otb::SarParametricMapFunction< InputImageType > ParametricFunctionType
Definition: otbSarRadiometricCalibrationFunction.h:81
otb::SarRadiometricCalibrationFunction::m_RescalingFactor
RealType m_RescalingFactor
Definition: otbSarRadiometricCalibrationFunction.h:208
otb::SarRadiometricCalibrationFunction::m_ApplyRangeSpreadLossCorrection
bool m_ApplyRangeSpreadLossCorrection
Definition: otbSarRadiometricCalibrationFunction.h:211
otb::SarRadiometricCalibrationFunction::m_Noise
ParametricFunctionPointer m_Noise
Definition: otbSarRadiometricCalibrationFunction.h:214
otb::SarRadiometricCalibrationFunction::m_RangeSpreadLoss
ParametricFunctionPointer m_RangeSpreadLoss
Definition: otbSarRadiometricCalibrationFunction.h:218
otb::SarRadiometricCalibrationFunction::m_AntennaPatternNewGain
ParametricFunctionPointer m_AntennaPatternNewGain
Definition: otbSarRadiometricCalibrationFunction.h:215
otbSarParametricMapFunction.h
otb::SarRadiometricCalibrationFunction::InputImageType
TInputImage InputImageType
Definition: otbSarRadiometricCalibrationFunction.h:64
otb::Sentinel1ThermalNoiseLookupData
Calculate the Sentinel 1 thermal noise contribution for the given pixel.
Definition: otbSentinel1ThermalNoiseLookupData.h:61
otb::SarRadiometricCalibrationFunction::OutputType
Superclass::OutputType OutputType
Definition: otbSarRadiometricCalibrationFunction.h:69
otb::SarRadiometricCalibrationFunction::ParametricFunctionConstPointer
ParametricFunctionType::ConstPointer ParametricFunctionConstPointer
Definition: otbSarRadiometricCalibrationFunction.h:83
otb::SarRadiometricCalibrationFunction::m_ApplyAntennaPatternGain
bool m_ApplyAntennaPatternGain
Definition: otbSarRadiometricCalibrationFunction.h:209
otb::SarParametricMapFunction
Evaluates a parametric bidimensionnal polynomial model from a PointSet.
Definition: otbSarParametricMapFunction.h:43
otb::SarRadiometricCalibrationFunction::ContinuousIndexType
Superclass::ContinuousIndexType ContinuousIndexType
Definition: otbSarRadiometricCalibrationFunction.h:71
otb::SarRadiometricCalibrationFunction::m_ApplyIncidenceAngleCorrection
bool m_ApplyIncidenceAngleCorrection
Definition: otbSarRadiometricCalibrationFunction.h:210
otb::SarRadiometricCalibrationFunction::m_Lut
LookupDataPointer m_Lut
Definition: otbSarRadiometricCalibrationFunction.h:219
otb::SarRadiometricCalibrationFunction::SetCalibrationLookupData
void SetCalibrationLookupData(LookupDataPointer lut)
Definition: otbSarRadiometricCalibrationFunction.h:177
otbSarRadiometricCalibrationFunction.hxx
otb::SarRadiometricCalibrationFunction::SetNoiseLookupData
void SetNoiseLookupData(LookupDataPointer lut)
Definition: otbSarRadiometricCalibrationFunction.h:183
otb::SarRadiometricCalibrationFunction::m_ApplyLookupDataCorrection
bool m_ApplyLookupDataCorrection
Definition: otbSarRadiometricCalibrationFunction.h:212
otb::SarRadiometricCalibrationFunction
Calculate the backscatter for the given pixel.
Definition: otbSarRadiometricCalibrationFunction.h:50
otb::SarRadiometricCalibrationFunction::Superclass
itk::ImageFunction< TInputImage, typename itk::NumericTraits< typename TInputImage::PixelType >::AbsType, TCoordRep > Superclass
Definition: otbSarRadiometricCalibrationFunction.h:56
otb::SarRadiometricCalibrationFunction::m_EnableNoise
bool m_EnableNoise
Definition: otbSarRadiometricCalibrationFunction.h:207
otb::SarRadiometricCalibrationFunction::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbSarRadiometricCalibrationFunction.h:68
otb::SarRadiometricCalibrationFunction::EvaluateAtContinuousIndex
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &cindex) const override
Definition: otbSarRadiometricCalibrationFunction.h:100
otb::SarRadiometricCalibrationFunction::Sentinel1ThermalNoiseLookupPointerType
typename Sentinel1ThermalNoiseLookupType::Pointer Sentinel1ThermalNoiseLookupPointerType
Definition: otbSarRadiometricCalibrationFunction.h:86
otbSentinel1ThermalNoiseLookupData.h
otb::SarRadiometricCalibrationFunction::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSarRadiometricCalibrationFunction.h:58