OTB  10.0.0
Orfeo Toolbox
otbSentinel1CalibrationLookupData.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 otbSentinel1CalibrationLookupData_h
22 #define otbSentinel1CalibrationLookupData_h
23 
25 
26 
27 namespace otb
28 {
29 
37 {
38 public:
39  double timeMJD;
40  double deltaMJD; // time difference to previous MJD in the list
41  int line;
42  std::vector<int> pixels;
43  std::vector<double> deltaPixels;
44  std::vector<float> vect;
45 
47  void ToKeywordlist(MetaData::Keywordlist & kwl, const std::string & prefix) const;
48 
50  static Sentinel1CalibrationStruct FromKeywordlist(const MetaData::Keywordlist & kwl, const std::string & prefix);
51 };
52 
61 {
62 public:
63 
67  typedef itk::SmartPointer<Self> Pointer;
68  typedef itk::SmartPointer<const Self> ConstPointer;
69 
71  itkNewMacro(Self);
72 
75 
76  typedef itk::IndexValueType IndexValueType;
77 
79 
80  ~Sentinel1CalibrationLookupData() override = default;
81 
82  void InitParameters(short type, double ft, double lt, int lines, int c, std::vector<Sentinel1CalibrationStruct> const& vlist);
83 
84  double GetValue(const IndexValueType x, const IndexValueType y) const override;
85 
86  int GetVectorIndex(int y) const;
87 
88  int GetPixelIndex(int x, const Sentinel1CalibrationStruct& calVec) const;
89 
91  void ToKeywordlist(MetaData::Keywordlist & kwl, const std::string & prefix) const override;
92 
94  void FromKeywordlist(const MetaData::Keywordlist & kwl, const std::string & prefix) override;
95 
96 private:
98  void operator=(const Self&) = delete;
99 
101  double lastLineTime;
103  int count;
104  std::vector<Sentinel1CalibrationStruct> calibrationVectorList;
106 };
107 
108 } // namespace otb
109 
110 #endif
Computes the Sentinel 1 calibration contribution for the given pixel using a LUT. Depending on how it...
Sentinel1CalibrationLookupData(const Self &)=delete
~Sentinel1CalibrationLookupData() override=default
void operator=(const Self &)=delete
double GetValue(const IndexValueType x, const IndexValueType y) const override
void ToKeywordlist(MetaData::Keywordlist &kwl, const std::string &prefix) const override
void InitParameters(short type, double ft, double lt, int lines, int c, std::vector< Sentinel1CalibrationStruct > const &vlist)
int GetPixelIndex(int x, const Sentinel1CalibrationStruct &calVec) const
void FromKeywordlist(const MetaData::Keywordlist &kwl, const std::string &prefix) override
std::vector< Sentinel1CalibrationStruct > calibrationVectorList
std::unordered_map< std::string, std::string > Keywordlist
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Structure holding a calibration vector from Sentinel1 annotation files.
void ToKeywordlist(MetaData::Keywordlist &kwl, const std::string &prefix) const
static Sentinel1CalibrationStruct FromKeywordlist(const MetaData::Keywordlist &kwl, const std::string &prefix)