OTB  10.0.0
Orfeo Toolbox
otbSentinel1ThermalNoiseLookupData.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 otbSentinel1ThermalNoiseLookupData_h
22 #define otbSentinel1ThermalNoiseLookupData_h
23 
25 
26 namespace otb
27 {
28 
35 {
37  int lastAzimuthLine = 0;
39  int lastRangeSample = 0;
40 
41  std::vector<int> lines;
42  std::vector<float> vect;
43 };
44 
62 {
63 public:
64 
67  using Superclass = itk::LightObject;
68  using Pointer = itk::SmartPointer<Self>;
69  using ConstPointer = itk::SmartPointer<const Self>;
70 
71  using IndexValueType = itk::IndexValueType ;
72 
74  itkNewMacro(Self);
75 
77  itkTypeMacro(Sentinel1ThermalNoiseLookupData, itk::LightObject);
78 
80  void InitParameters(double firstLineTime,
81  double lastLineTime,
82  int numOfLines,
83  std::vector<Sentinel1CalibrationStruct> const& rangeNoiseVectorList,
84  std::vector<Sentinel1AzimuthNoiseStruct> const& azimuthNoiseVectorList);
85 
87  double GetValue(const IndexValueType x, const IndexValueType y) const override;
88 
89 protected:
92 
93 private:
95  double GetRangeNoise(const IndexValueType x, const IndexValueType y) const;
96 
98  double GetAzimuthNoise(const IndexValueType x, const IndexValueType y) const;
99 
100  int GetRangeVectorIndex(int y) const;
101 
102  int GetAzimuthVectorIndex(int x, int y) const;
103 
104  int GetPixelIndex(int x, const std::vector<int> & vec) const;
105 
107  double m_FirstLineTime = 0.;
108 
110  double m_LastLineTime = 0.;
111 
113  double m_LineTimeInterval = 0.;
114 
115  int m_NumOfLines = 0;
116  int m_RangeCount = 0;
117  int m_AzimuthCount = 0;
118 
120  std::vector<Sentinel1CalibrationStruct> m_RangeNoiseVectorList;
121 
123  std::vector<Sentinel1AzimuthNoiseStruct> m_AzimuthNoiseVectorList;
124 };
125 
126 }
127 
128 #endif
itk::SmartPointer< const Self > ConstPointer
Calculate the Sentinel 1 thermal noise contribution for the given pixel.
std::vector< Sentinel1CalibrationStruct > m_RangeNoiseVectorList
double GetValue(const IndexValueType x, const IndexValueType y) const override
double GetAzimuthNoise(const IndexValueType x, const IndexValueType y) const
double GetRangeNoise(const IndexValueType x, const IndexValueType y) const
void InitParameters(double firstLineTime, double lastLineTime, int numOfLines, std::vector< Sentinel1CalibrationStruct > const &rangeNoiseVectorList, std::vector< Sentinel1AzimuthNoiseStruct > const &azimuthNoiseVectorList)
std::vector< Sentinel1AzimuthNoiseStruct > m_AzimuthNoiseVectorList
int GetAzimuthVectorIndex(int x, int y) const
int GetPixelIndex(int x, const std::vector< int > &vec) const
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.