OTB  9.0.0
Orfeo Toolbox
otbSarImageMetadataInterface.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 otbSarImageMetadataInterface_h
22 #define otbSarImageMetadataInterface_h
23 
24 #include <string>
25 #include <vector>
26 #include "OTBMetadataExport.h"
28 #include "itkPointSet.h"
30 #include "otbStringUtils.h"
31 #include "otbSARMetadata.h"
32 
33 namespace otb
34 {
42 class OTBMetadata_EXPORT SarImageMetadataInterface : public ImageMetadataInterfaceBase
43 {
44 public:
47  typedef itk::SmartPointer<Self> Pointer;
48  typedef itk::SmartPointer<const Self> ConstPointer;
49 
52 
53  typedef Superclass::ImageType ImageType;
54  typedef ImageType::IndexType IndexType;
55  typedef std::array<int, 2> ArrayIndexType;
56  typedef Superclass::MetaDataDictionaryType MetaDataDictionaryType;
59  typedef Superclass::UIntVectorType UIntVectorType;
60  typedef Superclass::StringVectorType StringVectorType;
61  typedef itk::PointSet<double, 2> PointSetType;
62  typedef PointSetType::Pointer PointSetPointer;
63  typedef double RealType;
64  typedef PointSetType::PointType PointType;
67 
68  virtual bool CreateCalibrationLookupData(SARCalib&, const ImageMetadata&, const MetadataSupplierInterface&, const bool) const;
69 
70  virtual bool HasCalibrationLookupDataFlag(const MetadataSupplierInterface&) const;
71 
72  virtual PointSetPointer GetRadiometricCalibrationAntennaPatternNewGain() const;
73  virtual PointSetPointer GetRadiometricCalibrationAntennaPatternOldGain() const;
74  virtual PointSetPointer GetRadiometricCalibrationIncidenceAngle(const MetadataSupplierInterface &) const;
75  virtual PointSetPointer GetRadiometricCalibrationRangeSpreadLoss() const;
76  virtual PointSetPointer GetRadiometricCalibrationNoise(const MetadataSupplierInterface&, const ImageMetadata&, const std::string& b="") const;
77 
78  virtual ArrayIndexType GetRadiometricCalibrationAntennaPatternNewGainPolynomialDegree() const;
79  virtual ArrayIndexType GetRadiometricCalibrationAntennaPatternOldGainPolynomialDegree() const;
80  virtual ArrayIndexType GetRadiometricCalibrationIncidenceAnglePolynomialDegree() const;
81  virtual ArrayIndexType GetRadiometricCalibrationRangeSpreadLossPolynomialDegree() const;
82  virtual ArrayIndexType GetRadiometricCalibrationNoisePolynomialDegree() const;
83 
84  virtual double GetCenterIncidenceAngle(const MetadataSupplierInterface& mds) const = 0;
85 
86 
87  virtual double GetRescalingFactor() const;
88 
89  virtual void ParseGdal(ImageMetadata &) =0;
90  virtual void ParseGeom(ImageMetadata &) =0;
91 
92  bool GetSAR(SARParam &) const;
93  std::vector<AzimuthFmRate> GetAzimuthFmRateGeom() const;
94  std::vector<DopplerCentroid> GetDopplerCentroidGeom() const;
95  std::vector<Orbit> GetOrbitsGeom() const;
96  std::vector<BurstRecord> GetBurstRecordsGeom() const;
97 
104  void LoadRadiometricCalibrationData(SARCalib& sarCalib, const MetadataSupplierInterface& mds, const ImageMetadata& imd, const std::string &band="") const;
105 
106 protected:
108  ~SarImageMetadataInterface() override = default;
109 
110  PointSetPointer GetConstantValuePointSet(const RealType& value) const;
111  ArrayIndexType GetConstantPolynomialDegree() const;
112 
113  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
114 
115 private:
116  SarImageMetadataInterface(const Self&) = delete;
117  void operator=(const Self&) = delete;
118 };
119 
120 } // end namespace otb
121 
122 #endif
otb::SarImageMetadataInterface::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSarImageMetadataInterface.h:48
otb::SarImageMetadataInterface::Superclass
ImageMetadataInterfaceBase Superclass
Definition: otbSarImageMetadataInterface.h:46
otb::SarImageMetadataInterface::PointSetType
itk::PointSet< double, 2 > PointSetType
Definition: otbSarImageMetadataInterface.h:61
otb::SarImageMetadataInterface::VariableLengthVectorType
Superclass::VariableLengthVectorType VariableLengthVectorType
Definition: otbSarImageMetadataInterface.h:58
otb::SarImageMetadataInterface::ImageType
Superclass::ImageType ImageType
Definition: otbSarImageMetadataInterface.h:51
otb::SarCalibrationLookupData::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSarCalibrationLookupData.h:45
otb::SarImageMetadataInterface::StringVectorType
Superclass::StringVectorType StringVectorType
Definition: otbSarImageMetadataInterface.h:60
otb::SarCalibrationLookupData
Definition: otbSarCalibrationLookupData.h:38
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::MetaDataKey::VariableLengthVectorType
itk::VariableLengthVector< double > VariableLengthVectorType
Definition: otbMetaDataKey.h:121
otbSarCalibrationLookupData.h
otbSARMetadata.h
otb::SarImageMetadataInterface::ArrayIndexType
std::array< int, 2 > ArrayIndexType
Definition: otbSarImageMetadataInterface.h:55
otb::SARParam
SAR sensors parameters.
Definition: otbSARMetadata.h:211
otb::MetadataSupplierInterface
Base class to access metadata information in files/images.
Definition: otbMetadataSupplierInterface.h:40
otb::SarImageMetadataInterface::RealType
double RealType
Definition: otbSarImageMetadataInterface.h:63
otb::SarImageMetadataInterface::VectorType
Superclass::VectorType VectorType
Definition: otbSarImageMetadataInterface.h:57
otb::SarImageMetadataInterface::PointSetPointer
PointSetType::Pointer PointSetPointer
Definition: otbSarImageMetadataInterface.h:62
otb::SarImageMetadataInterface::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSarImageMetadataInterface.h:47
otb::SarImageMetadataInterface::UIntVectorType
Superclass::UIntVectorType UIntVectorType
Definition: otbSarImageMetadataInterface.h:59
otbStringUtils.h
otb::SarImageMetadataInterface::IndexType
ImageType::IndexType IndexType
Definition: otbSarImageMetadataInterface.h:54
otbImageMetadataInterfaceBase.h
otb::ImageMetadataInterfaceBase
Base class for captor metadata reading.
Definition: otbImageMetadataInterfaceBase.h:44
otb::SarImageMetadataInterface::Self
SarImageMetadataInterface Self
Definition: otbSarImageMetadataInterface.h:45
otb::SarImageMetadataInterface::LookupDataPointerType
LookupDataType::Pointer LookupDataPointerType
Definition: otbSarImageMetadataInterface.h:66
otb::ImageMetadata
Generic class containing image metadata used in OTB.
Definition: otbImageMetadata.h:270
otb::SARCalib
SAR calibration LUTs.
Definition: otbSARMetadata.h:281
otb::SarImageMetadataInterface
Class for SAR captor metadata reading.
Definition: otbSarImageMetadataInterface.h:42
otb::SarImageMetadataInterface::PointType
PointSetType::PointType PointType
Definition: otbSarImageMetadataInterface.h:64
otb::SarImageMetadataInterface::LookupDataType
SarCalibrationLookupData LookupDataType
Definition: otbSarImageMetadataInterface.h:65
otb::SarImageMetadataInterface::MetaDataDictionaryType
Superclass::MetaDataDictionaryType MetaDataDictionaryType
Definition: otbSarImageMetadataInterface.h:56