19 #ifndef __otbSarRadiometricCalibrationFunction_txx
20 #define __otbSarRadiometricCalibrationFunction_txx
24 #include "itkNumericTraits.h"
32 template <
class TInputImage,
class TCoordRep>
37 m_Noise = ParametricFunctionType::New();
38 m_AntennaPatternNewGain = ParametricFunctionType::New();
39 m_AntennaPatternOldGain = ParametricFunctionType::New();
40 m_IncidenceAngle = ParametricFunctionType::New();
41 m_RangeSpreadLoss = ParametricFunctionType::New();
43 m_Noise->SetConstantValue(0.0);
45 m_AntennaPatternNewGain->SetConstantValue(1.0);
46 m_AntennaPatternOldGain->SetConstantValue(1.0);
47 m_IncidenceAngle->SetConstantValue(
CONST_PI_2);
48 m_RangeSpreadLoss->SetConstantValue(1.0);
54 template <
class TInputImage,
class TCoordRep>
60 Superclass::SetInputImage(ptr);
61 m_Noise->SetInputImage(ptr);
62 m_IncidenceAngle->SetInputImage(ptr);
63 m_AntennaPatternNewGain->SetInputImage(ptr);
64 m_AntennaPatternOldGain->SetInputImage(ptr);
65 m_RangeSpreadLoss->SetInputImage(ptr);
71 template <
class TInputImage,
class TCoordRep>
76 this->Superclass::PrintSelf(os, indent);
82 template <
class TInputImage,
class TCoordRep>
89 this->GetInputImage()->TransformPhysicalPointToIndex(point, index);
91 if (!this->GetInputImage())
93 itkDebugMacro( <<
"ERROR with GetInputImage()");
94 return (itk::NumericTraits<OutputType>::max());
97 if (!this->IsInsideBuffer(index))
99 itkDebugMacro( <<
"ERROR with IsInsideBuffer");
100 return (itk::NumericTraits<OutputType>::max());
106 functor.
SetNoise(static_cast<FunctorRealType>(m_Noise->Evaluate(point)));
111 functor.
SetIncidenceAngle(static_cast<FunctorRealType>(m_IncidenceAngle->Evaluate(point)));
112 functor.
SetRangeSpreadLoss(static_cast<FunctorRealType>(m_RangeSpreadLoss->Evaluate(point)));
114 const RealType value =
static_cast<RealType>(vcl_abs(this->GetInputImage()->GetPixel(index)));