OTB  10.0.0
Orfeo Toolbox
otbSarBrightnessFunction.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 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);
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);
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
Compute the brightness value. .
itk::NumericTraits< InputType >::AbsType RealType
Calculate the backscatter for the given pixel.
itk::ImageFunction< TInputImage, typename itk::NumericTraits< typename TInputImage::PixelType >::AbsType, TCoordRep > Superclass
itkGetObjectMacro(Noise, ParametricFunctionType)
ParametricFunctionType::Pointer ParametricFunctionPointer
FunctorType::RealType FunctorRealType
Superclass::OutputType OutputType
ParametricFunctionPointer m_RangeSpreadLoss
OutputType Evaluate(const PointType &point) const override
ParametricFunctionPointer m_AntennaPatternOldGain
itkGetObjectMacro(AntennaPatternOldGain, ParametricFunctionType)
itk::SmartPointer< Self > Pointer
itkGetObjectMacro(AntennaPatternNewGain, ParametricFunctionType)
Superclass::ContinuousIndexType ContinuousIndexType
itk::SmartPointer< const Self > ConstPointer
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &cindex) const override
SarBrightnessFunction(const Self &)=delete
void operator=(const Self &)=delete
ParametricFunctionPointer m_AntennaPatternNewGain
otb::SarParametricMapFunction< InputImageType > ParametricFunctionType
itkGetObjectMacro(RangeSpreadLoss, ParametricFunctionType)
InputImageType::PixelType InputPixelType
ParametricFunctionPointer m_Noise
ParametricFunctionType::ConstPointer ParametricFunctionConstPointer
otb::Functor::SarBrightnessFunctor< RealType, RealType > FunctorType
Evaluates a parametric bidimensionnal polynomial model from a PointSet.
itk::SmartPointer< const Self > ConstPointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.