OTB  6.7.0
Orfeo Toolbox
otbSarBrightnessToImageFilter.hxx
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999-2011 Insight Software Consortium
3  * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 #ifndef otbSarBrightnessToImageFilter_hxx
23 #define otbSarBrightnessToImageFilter_hxx
24 
26 
28 
29 namespace otb
30 {
31 
35 template<class TInputImage, class TOutputImage>
38 {
39 }
40 
41 template<class TInputImage, class TOutputImage>
42 void
45 {
46  // will SetInputImage on the function
47  Superclass::BeforeThreadedGenerateData();
48 
50  this->GetInput()->GetMetaDataDictionary());
51 
52  FunctionPointer function = this->GetFunction();
53 
54  function->SetScale(imageMetadataInterface->GetRadiometricCalibrationScale());
55 
56  ParametricFunctionPointer noise = function->GetNoise();
57  noise->SetPointSet(imageMetadataInterface->GetRadiometricCalibrationNoise());
58  noise->SetPolynomalSize(imageMetadataInterface->GetRadiometricCalibrationNoisePolynomialDegree());
59  noise->EvaluateParametricCoefficient();
60 
61  ParametricFunctionPointer antennaPatternNewGain = function->GetAntennaPatternNewGain();
62  antennaPatternNewGain->SetPointSet(imageMetadataInterface->GetRadiometricCalibrationAntennaPatternNewGain());
63  antennaPatternNewGain->SetPolynomalSize(imageMetadataInterface->GetRadiometricCalibrationAntennaPatternNewGainPolynomialDegree());
64  antennaPatternNewGain->EvaluateParametricCoefficient();
65 
66  ParametricFunctionPointer antennaPatternOldGain = function->GetAntennaPatternOldGain();
67  antennaPatternOldGain->SetPointSet(imageMetadataInterface->GetRadiometricCalibrationAntennaPatternOldGain());
68  antennaPatternOldGain->SetPolynomalSize(imageMetadataInterface->GetRadiometricCalibrationAntennaPatternOldGainPolynomialDegree());
69  antennaPatternOldGain->EvaluateParametricCoefficient();
70 
71  ParametricFunctionPointer rangeSpreadLoss = function->GetRangeSpreadLoss();
72  rangeSpreadLoss->SetPointSet(imageMetadataInterface->GetRadiometricCalibrationRangeSpreadLoss());
73  rangeSpreadLoss->SetPolynomalSize(imageMetadataInterface->GetRadiometricCalibrationRangeSpreadLossPolynomialDegree());
74  rangeSpreadLoss->EvaluateParametricCoefficient();
75 
76 #if 0
77  this->Print(std::cout, id);
78 #endif
79 }
80 
81 template<class TInputImage, class TOutputImage>
82 void
84 ::PrintSelf(std::ostream& os, itk::Indent indent) const
85 {
86  Superclass::PrintSelf(os, indent);
87 
88  if (this->GetFunction())
89  {
90  os << indent << "Function:\n";
91  this->GetFunction()->Print(os, indent.GetNextIndent());
92  }
93 }
94 
95 
96 } // end namespace otb
97 
98 #endif
static SarImageMetadataInterfacePointerType CreateIMI(const MetaDataDictionaryType &dict)
Superclass::FunctionPointer FunctionPointer
void PrintSelf(std::ostream &os, itk::Indent indent) const override
FunctionType::ParametricFunctionPointer ParametricFunctionPointer