OTB  9.0.0
Orfeo Toolbox
otbSarBrightnessFunction.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 otbSarBrightnessFunction_h
22 #define otbSarBrightnessFunction_h
23 
26 
27 
28 namespace otb
29 {
30 
48 template <class TInputImage, class TCoordRep = float>
49 class ITK_EXPORT SarBrightnessFunction
50  : public itk::ImageFunction<TInputImage, typename itk::NumericTraits<typename TInputImage::PixelType>::AbsType, TCoordRep>
51 {
52 public:
55  typedef itk::ImageFunction<TInputImage, typename itk::NumericTraits<typename TInputImage::PixelType>::AbsType, TCoordRep> Superclass;
56  typedef itk::SmartPointer<Self> Pointer;
57  typedef itk::SmartPointer<const Self> ConstPointer;
58 
60  itkTypeMacro(SarBrightnessFunction, itk::ImageFunction);
61 
63  itkNewMacro(Self);
64 
66  typedef TInputImage InputImageType;
67  typedef typename InputImageType::PixelType InputPixelType;
68  typedef typename Superclass::OutputType OutputType;
69  typedef typename Superclass::IndexType IndexType;
70  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
71  typedef typename Superclass::PointType PointType;
72 
73  itkStaticConstMacro(ImageDimension, unsigned int, InputImageType::ImageDimension);
74 
75 
77  typedef double RealType;
80 
84 
86  OutputType EvaluateAtIndex(const IndexType& index) const override;
87 
89  OutputType Evaluate(const PointType& point) const override
90  {
91  IndexType index;
92  this->ConvertPointToNearestIndex(point, index);
93  return this->EvaluateAtIndex(index);
94  }
96  {
97  IndexType index;
98  this->ConvertContinuousIndexToNearestIndex(cindex, index);
99  return this->EvaluateAtIndex(index);
100  }
102 
107  void SetInputImage(const InputImageType* ptr) override;
108 
109 
111  itkSetMacro(Scale, FunctorRealType);
112  itkGetMacro(Scale, FunctorRealType);
114 
116  itkSetObjectMacro(Noise, ParametricFunctionType);
117  itkGetConstObjectMacro(Noise, ParametricFunctionType);
118  itkGetObjectMacro(Noise, ParametricFunctionType);
120 
122  itkSetMacro(EnableNoise, bool);
123  itkGetMacro(EnableNoise, bool);
125 
127  itkSetObjectMacro(AntennaPatternNewGain, ParametricFunctionType);
128  itkGetConstObjectMacro(AntennaPatternNewGain, ParametricFunctionType);
129  itkGetObjectMacro(AntennaPatternNewGain, ParametricFunctionType);
131 
133  itkSetObjectMacro(AntennaPatternOldGain, ParametricFunctionType);
134  itkGetObjectMacro(AntennaPatternOldGain, ParametricFunctionType);
135  itkGetConstObjectMacro(AntennaPatternOldGain, ParametricFunctionType);
137 
139  itkSetObjectMacro(RangeSpreadLoss, ParametricFunctionType);
140  itkGetConstObjectMacro(RangeSpreadLoss, ParametricFunctionType);
141  itkGetObjectMacro(RangeSpreadLoss, ParametricFunctionType);
143 
144 
145 protected:
148  {
149  }
150  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
151 
152 private:
153  SarBrightnessFunction(const Self&) = delete;
154  void operator=(const Self&) = delete;
155 
162 };
163 
164 } // end namespace otb
165 
166 #ifndef OTB_MANUAL_INSTANTIATION
168 #endif
169 
170 #endif
otb::SarBrightnessFunction::m_EnableNoise
bool m_EnableNoise
Definition: otbSarBrightnessFunction.h:158
otb::SarBrightnessFunction::Superclass
itk::ImageFunction< TInputImage, typename itk::NumericTraits< typename TInputImage::PixelType >::AbsType, TCoordRep > Superclass
Definition: otbSarBrightnessFunction.h:55
otb::SarBrightnessFunction::m_Scale
FunctorRealType m_Scale
Definition: otbSarBrightnessFunction.h:156
otb::SarBrightnessFunction::ParametricFunctionPointer
ParametricFunctionType::Pointer ParametricFunctionPointer
Definition: otbSarBrightnessFunction.h:82
otb::SarBrightnessFunction::m_AntennaPatternOldGain
ParametricFunctionPointer m_AntennaPatternOldGain
Definition: otbSarBrightnessFunction.h:160
otb::SarBrightnessFunction::ContinuousIndexType
Superclass::ContinuousIndexType ContinuousIndexType
Definition: otbSarBrightnessFunction.h:70
otb::SarBrightnessFunction::RealType
double RealType
Definition: otbSarBrightnessFunction.h:77
otb::Functor::SarBrightnessFunctor
Compute the brightness value. .
Definition: otbSarBrightnessFunctor.h:42
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otbSarBrightnessFunctor.h
otb::SarParametricMapFunction::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSarParametricMapFunction.h:51
otb::SarBrightnessFunction::m_AntennaPatternNewGain
ParametricFunctionPointer m_AntennaPatternNewGain
Definition: otbSarBrightnessFunction.h:159
otb::SarBrightnessFunction::m_Noise
ParametricFunctionPointer m_Noise
Definition: otbSarBrightnessFunction.h:157
otb::SarBrightnessFunction::OutputType
Superclass::OutputType OutputType
Definition: otbSarBrightnessFunction.h:68
otb::SarBrightnessFunction::InputImageType
TInputImage InputImageType
Definition: otbSarBrightnessFunction.h:63
otb::SarBrightnessFunction::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSarBrightnessFunction.h:56
otb::SarBrightnessFunction::ParametricFunctionConstPointer
ParametricFunctionType::ConstPointer ParametricFunctionConstPointer
Definition: otbSarBrightnessFunction.h:83
otb::SarParametricMapFunction::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSarParametricMapFunction.h:50
otb::SarBrightnessFunction::~SarBrightnessFunction
~SarBrightnessFunction() override
Definition: otbSarBrightnessFunction.h:147
otb::SarBrightnessFunction::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSarBrightnessFunction.h:57
otb::SarBrightnessFunction::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbSarBrightnessFunction.h:67
otb::Functor::SarBrightnessFunctor::RealType
itk::NumericTraits< InputType >::AbsType RealType
Definition: otbSarBrightnessFunctor.h:47
otbSarBrightnessFunction.hxx
otb::SarBrightnessFunction
Calculate the backscatter for the given pixel.
Definition: otbSarBrightnessFunction.h:49
otbSarParametricMapFunction.h
otb::SarParametricMapFunction
Evaluates a parametric bidimensionnal polynomial model from a PointSet.
Definition: otbSarParametricMapFunction.h:43
otb::SarBrightnessFunction::m_RangeSpreadLoss
ParametricFunctionPointer m_RangeSpreadLoss
Definition: otbSarBrightnessFunction.h:161
otb::SarBrightnessFunction::ParametricFunctionType
otb::SarParametricMapFunction< InputImageType > ParametricFunctionType
Definition: otbSarBrightnessFunction.h:81
otb::SarBrightnessFunction::FunctorRealType
FunctorType::RealType FunctorRealType
Definition: otbSarBrightnessFunction.h:79
otb::SarBrightnessFunction::Self
SarBrightnessFunction Self
Definition: otbSarBrightnessFunction.h:54
otb::SarBrightnessFunction::EvaluateAtContinuousIndex
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &cindex) const override
Definition: otbSarBrightnessFunction.h:95
otb::SarBrightnessFunction::Evaluate
OutputType Evaluate(const PointType &point) const override
Definition: otbSarBrightnessFunction.h:89
otb::SarBrightnessFunction::PointType
Superclass::PointType PointType
Definition: otbSarBrightnessFunction.h:71
otb::SarBrightnessFunction::FunctorType
otb::Functor::SarBrightnessFunctor< RealType, RealType > FunctorType
Definition: otbSarBrightnessFunction.h:78
otb::SarBrightnessFunction::IndexType
Superclass::IndexType IndexType
Definition: otbSarBrightnessFunction.h:69