OTB  9.0.0
Orfeo Toolbox
otbTerraSarXSarImageMetadataInterface.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 
22 #ifndef otbTerraSarXSarImageMetadataInterface_h
23 #define otbTerraSarXSarImageMetadataInterface_h
24 
25 #include <string>
26 
28 #include "otbXMLMetadataSupplier.h"
29 #include "itkImageBase.h"
30 
31 namespace otb
32 {
41 {
42 public:
45  typedef itk::SmartPointer<Self> Pointer;
46  typedef itk::SmartPointer<const Self> ConstPointer;
47 
49  itkNewMacro(Self);
50 
52  itkTypeMacro(TerraSarXSarImageMetadataInterface, otbSarImageMetadataInterface);
53 
54  typedef itk::ImageBase<2> ImageType;
55  typedef ImageType::IndexType IndexType;
56  typedef std::array<int, 2> ArrayIndexType;
57  typedef std::vector<IndexType> IndexVectorType;
58  typedef itk::MetaDataDictionary MetaDataDictionaryType;
61  typedef std::vector<double> DoubleVectorType;
62  typedef std::vector<DoubleVectorType> DoubleVectorVectorType;
63  typedef std::vector<unsigned int> UIntVectorType;
64 
65  typedef Superclass::PointSetType PointSetType;
66  typedef Superclass::PointSetPointer PointSetPointer;
67  typedef double RealType;
68 
70  unsigned int GetNumberOfNoiseRecords(const MetadataSupplierInterface&, const unsigned int) const;
71 
73  unsigned int GetNumberOfCornerIncidenceAngles(const MetadataSupplierInterface&) const;
74 
76  double GetCenterIncidenceAngle(const MetadataSupplierInterface& mds) const override;
77 
79  IndexType GetCenterIncidenceAngleIndex(const MetadataSupplierInterface& mds) const;
80 
82  DoubleVectorType GetCornersIncidenceAngles(const MetadataSupplierInterface&mds) const;
83 
85  IndexVectorType GetCornersIncidenceAnglesIndex(const MetadataSupplierInterface&) const;
86 
87  PointSetPointer GetRadiometricCalibrationNoise(const MetadataSupplierInterface&, const ImageMetadata&, const std::string& b="") const override;
88  ArrayIndexType GetRadiometricCalibrationNoisePolynomialDegree() const override;
89 
90  PointSetPointer GetRadiometricCalibrationIncidenceAngle(const MetadataSupplierInterface&) const override;
91  ArrayIndexType GetRadiometricCalibrationIncidenceAnglePolynomialDegree() const override;
92 
94  InfoSceneCoord GetSceneCoord(const MetadataSupplierInterface &supplier, const std::string& path);
95 
96  void ParseGdal(ImageMetadata &) override;
97 
98  void ParseGeom(ImageMetadata &) override;
99 
100  void Parse(ImageMetadata &) override;
101 
102 protected:
104  ~TerraSarXSarImageMetadataInterface() override = default;
105 
106  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
107 
109  inline double Horner(std::vector<double>& coefficients, const double tauMinusTauRef) const;
110 
112  double ConvertStringTimeUTCToJulianDay(const std::string& value) const;
113 
115  unsigned int GetNoisePolynomialDegrees(const unsigned int noiseRecord, const MetadataSupplierInterface &mds, const unsigned int polLayer) const;
116 
118  DoubleVectorType GetNoisePolynomialCoefficients(const unsigned int noiseRecord, const MetadataSupplierInterface& mds, const unsigned int polLayer) const;
119 
121  double GetNoiseTimeUTC(const unsigned int noiseRecord, const MetadataSupplierInterface& mds, const unsigned int polLayer) const;
122 
124  double GetNoiseReferencePoint(const unsigned int noiseRecord, const MetadataSupplierInterface &mds, const unsigned int polLayer) const;
125 
126 private:
127  TerraSarXSarImageMetadataInterface(const Self&) = delete;
128  void operator=(const Self&) = delete;
129 };
130 
131 } // end namespace otb
132 
133 #endif
otb::TerraSarXSarImageMetadataInterface::PointSetPointer
Superclass::PointSetPointer PointSetPointer
Definition: otbTerraSarXSarImageMetadataInterface.h:66
otb::TerraSarXSarImageMetadataInterface::IndexVectorType
std::vector< IndexType > IndexVectorType
Definition: otbTerraSarXSarImageMetadataInterface.h:57
otb::TerraSarXSarImageMetadataInterface::Superclass
SarImageMetadataInterface Superclass
Definition: otbTerraSarXSarImageMetadataInterface.h:44
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::MetaDataKey::VectorType
std::vector< double > VectorType
Definition: otbMetaDataKey.h:119
otb::TerraSarXSarImageMetadataInterface::ArrayIndexType
std::array< int, 2 > ArrayIndexType
Definition: otbTerraSarXSarImageMetadataInterface.h:56
otb::MetaDataKey::VariableLengthVectorType
itk::VariableLengthVector< double > VariableLengthVectorType
Definition: otbMetaDataKey.h:121
otb::TerraSarXSarImageMetadataInterface::DoubleVectorVectorType
std::vector< DoubleVectorType > DoubleVectorVectorType
Definition: otbTerraSarXSarImageMetadataInterface.h:62
otb::TerraSarXSarImageMetadataInterface::IndexType
ImageType::IndexType IndexType
Definition: otbTerraSarXSarImageMetadataInterface.h:55
otb::SarImageMetadataInterface::ArrayIndexType
std::array< int, 2 > ArrayIndexType
Definition: otbSarImageMetadataInterface.h:55
otbXMLMetadataSupplier.h
otb::MetadataSupplierInterface
Base class to access metadata information in files/images.
Definition: otbMetadataSupplierInterface.h:40
otb::TerraSarXSarImageMetadataInterface::ImageType
itk::ImageBase< 2 > ImageType
Definition: otbTerraSarXSarImageMetadataInterface.h:52
otb::InfoSceneCoord
Represents an InfoSceneCoord.
Definition: otbSARMetadata.h:174
otb::TerraSarXSarImageMetadataInterface
Creation of an "otb" TerraSarXSarImageMetadataInterface that gets metadata.
Definition: otbTerraSarXSarImageMetadataInterface.h:40
otb::TerraSarXSarImageMetadataInterface::PointSetType
Superclass::PointSetType PointSetType
Definition: otbTerraSarXSarImageMetadataInterface.h:65
otb::SarImageMetadataInterface::PointSetPointer
PointSetType::Pointer PointSetPointer
Definition: otbSarImageMetadataInterface.h:62
otb::TerraSarXSarImageMetadataInterface::Self
TerraSarXSarImageMetadataInterface Self
Definition: otbTerraSarXSarImageMetadataInterface.h:43
otb::TerraSarXSarImageMetadataInterface::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbTerraSarXSarImageMetadataInterface.h:46
otb::TerraSarXSarImageMetadataInterface::VariableLengthVectorType
MetaDataKey::VariableLengthVectorType VariableLengthVectorType
Definition: otbTerraSarXSarImageMetadataInterface.h:60
otb::SarImageMetadataInterface::IndexType
ImageType::IndexType IndexType
Definition: otbSarImageMetadataInterface.h:54
otb::TerraSarXSarImageMetadataInterface::RealType
double RealType
Definition: otbTerraSarXSarImageMetadataInterface.h:67
otb::ImageMetadataInterfaceBase
Base class for captor metadata reading.
Definition: otbImageMetadataInterfaceBase.h:44
otb::TerraSarXSarImageMetadataInterface::MetaDataDictionaryType
itk::MetaDataDictionary MetaDataDictionaryType
Definition: otbTerraSarXSarImageMetadataInterface.h:58
otb::TerraSarXSarImageMetadataInterface::DoubleVectorType
std::vector< double > DoubleVectorType
Definition: otbTerraSarXSarImageMetadataInterface.h:61
otb::ImageMetadata
Generic class containing image metadata used in OTB.
Definition: otbImageMetadata.h:270
otb::TerraSarXSarImageMetadataInterface::VectorType
MetaDataKey::VectorType VectorType
Definition: otbTerraSarXSarImageMetadataInterface.h:59
otb::SarImageMetadataInterface
Class for SAR captor metadata reading.
Definition: otbSarImageMetadataInterface.h:42
otb::TerraSarXSarImageMetadataInterface::UIntVectorType
std::vector< unsigned int > UIntVectorType
Definition: otbTerraSarXSarImageMetadataInterface.h:63
otb::TerraSarXSarImageMetadataInterface::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbTerraSarXSarImageMetadataInterface.h:45
otbSarImageMetadataInterface.h