OTB  9.0.0
Orfeo Toolbox
otbSentinel1CalibrationLookupData.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 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:
97  Sentinel1CalibrationLookupData(const Self&) = delete;
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
otb::Sentinel1CalibrationStruct::vect
std::vector< float > vect
Definition: otbSentinel1CalibrationLookupData.h:44
otb::Sentinel1CalibrationLookupData
Computes the Sentinel 1 calibration contribution for the given pixel using a LUT. Depending on how it...
Definition: otbSentinel1CalibrationLookupData.h:60
otb::Sentinel1CalibrationLookupData::lastLineTime
double lastLineTime
Definition: otbSentinel1CalibrationLookupData.h:101
otb::Sentinel1CalibrationLookupData::firstLineTime
double firstLineTime
Definition: otbSentinel1CalibrationLookupData.h:100
otb::Sentinel1CalibrationLookupData::Superclass
SarCalibrationLookupData Superclass
Definition: otbSentinel1CalibrationLookupData.h:66
otb::Sentinel1CalibrationLookupData::operator=
void operator=(const Self &)=delete
otb::Sentinel1CalibrationStruct
Structure holding a calibration vector from Sentinel1 annotation files.
Definition: otbSentinel1CalibrationLookupData.h:36
otb::SarCalibrationLookupData
Definition: otbSarCalibrationLookupData.h:38
otb::Sentinel1CalibrationLookupData::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSentinel1CalibrationLookupData.h:68
otb::Sentinel1CalibrationLookupData::FromKeywordlist
void FromKeywordlist(const MetaData::Keywordlist &kwl, const std::string &prefix) override
otb::Sentinel1CalibrationLookupData::count
int count
Definition: otbSentinel1CalibrationLookupData.h:103
otb::Sentinel1CalibrationLookupData::lineTimeInterval
double lineTimeInterval
Definition: otbSentinel1CalibrationLookupData.h:105
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Sentinel1CalibrationStruct::timeMJD
double timeMJD
Definition: otbSentinel1CalibrationLookupData.h:39
otb::Sentinel1CalibrationLookupData::Self
Sentinel1CalibrationLookupData Self
Definition: otbSentinel1CalibrationLookupData.h:65
otb::Sentinel1CalibrationLookupData::GetPixelIndex
int GetPixelIndex(int x, const Sentinel1CalibrationStruct &calVec) const
otb::SarCalibrationLookupData::IndexValueType
itk::IndexValueType IndexValueType
Definition: otbSarCalibrationLookupData.h:52
otb::Sentinel1CalibrationLookupData::numOfLines
int numOfLines
Definition: otbSentinel1CalibrationLookupData.h:102
otb::Sentinel1CalibrationLookupData::calibrationVectorList
std::vector< Sentinel1CalibrationStruct > calibrationVectorList
Definition: otbSentinel1CalibrationLookupData.h:104
otb::Sentinel1CalibrationLookupData::GetVectorIndex
int GetVectorIndex(int y) const
otb::Sentinel1CalibrationLookupData::ToKeywordlist
void ToKeywordlist(MetaData::Keywordlist &kwl, const std::string &prefix) const override
otb::Sentinel1CalibrationLookupData::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSentinel1CalibrationLookupData.h:67
otb::Sentinel1CalibrationLookupData::~Sentinel1CalibrationLookupData
~Sentinel1CalibrationLookupData() override=default
otb::Sentinel1CalibrationStruct::deltaPixels
std::vector< double > deltaPixels
Definition: otbSentinel1CalibrationLookupData.h:43
otb::MetaData::Keywordlist
std::unordered_map< std::string, std::string > Keywordlist
Definition: otbMetaDataKey.h:233
otb::Sentinel1CalibrationStruct::deltaMJD
double deltaMJD
Definition: otbSentinel1CalibrationLookupData.h:40
otb::Sentinel1CalibrationLookupData::InitParameters
void InitParameters(short type, double ft, double lt, int lines, int c, std::vector< Sentinel1CalibrationStruct > const &vlist)
otb::Sentinel1CalibrationLookupData::Sentinel1CalibrationLookupData
Sentinel1CalibrationLookupData()
otb::Sentinel1CalibrationLookupData::GetValue
double GetValue(const IndexValueType x, const IndexValueType y) const override
otb::Sentinel1CalibrationStruct::pixels
std::vector< int > pixels
Definition: otbSentinel1CalibrationLookupData.h:42
otbSarImageMetadataInterface.h
otb::Sentinel1CalibrationLookupData::IndexValueType
itk::IndexValueType IndexValueType
Definition: otbSentinel1CalibrationLookupData.h:74
otb::Sentinel1CalibrationStruct::line
int line
Definition: otbSentinel1CalibrationLookupData.h:41
otb::Sentinel1CalibrationStruct::FromKeywordlist
static Sentinel1CalibrationStruct FromKeywordlist(const MetaData::Keywordlist &kwl, const std::string &prefix)
otb::Sentinel1CalibrationStruct::ToKeywordlist
void ToKeywordlist(MetaData::Keywordlist &kwl, const std::string &prefix) const