OTB  6.7.0
Orfeo Toolbox
otbCosmoImageMetadataInterface.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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 otbCosmoImageMetadataInterface_h
22 #define otbCosmoImageMetadataInterface_h
23 
25 
26 
27 namespace otb
28 {
37 class OTBMetadata_EXPORT CosmoImageMetadataInterface : public SarImageMetadataInterface
38 {
39 public:
40 
45 
47  itkNewMacro(Self);
48 
49 
52 
53  typedef Superclass::ImageType ImageType;
54  typedef Superclass::MetaDataDictionaryType MetaDataDictionaryType;
57  typedef Superclass::ImageKeywordlistType ImageKeywordlistType;
59  typedef Superclass::LookupDataPointerType LookupDataPointerType;
60 
62  int GetProductionDay() const override;
63 
65  int GetProductionMonth() const override;
66 
68  int GetProductionYear() const override;
69 
71  bool CanRead() const override;
72 
73  int GetDay() const override;
74 
75  int GetMonth() const override;
76 
77  int GetYear() const override;
78 
79  int GetHour() const override;
80 
81  int GetMinute() const override;
82 
83  UIntVectorType GetDefaultDisplay() const override;
84 
85  /*SarImageMetadataInterface pure virutals rituals */
86  double GetPRF() const override;
87 
88  double GetRSF() const override;
89 
90  double GetRadarFrequency() const override;
91 
92  double GetCenterIncidenceAngle() const override;
93 
94 protected:
95 
96  /* class ctor */
97  CosmoImageMetadataInterface() = default;
98 
99  /* class dtor */
100  ~CosmoImageMetadataInterface() = default;
101 
102 private:
103 
104  CosmoImageMetadataInterface(const Self &) = delete;
105  void operator =(const Self&) = delete;
106 
107 /* Helper function to parse date and time into a std::vector<std::string>
108  * using boost::split() expect date time in yyyy-mm-ddThh:mm:ss.ms
109  * the date-time string is to be found in keywordlist with key 'key'
110  * fills argument dateFields of type std::vector<std::string> which is mutable!
111  * TODO: move this method into base class
112  */
113  void ParseDateTime(std::string key, std::vector<int>& dateFields) const;
114 
115  mutable std::vector<int> m_ProductionDateFields;
116  mutable std::vector<int> m_AcquisitionDateFields;
117 };
118 
119 
120 
121 } // end namespace otb
122 
123 #endif
std::vector< unsigned int > UIntVectorType
std::vector< double > VectorType
itk::SmartPointer< const Self > ConstPointer
Creation of an "otb" CosmoImageMetadataInterface that gets metadata.
itk::VariableLengthVector< double > VariableLengthVectorType
Class for SAR captor metadata reading.
Superclass::ImageKeywordlistType ImageKeywordlistType
Monteverdi_FLOATING_TYPE RealType
Definition: mvdTypes.h:84
Superclass::MetaDataDictionaryType MetaDataDictionaryType
Superclass::VariableLengthVectorType VariableLengthVectorType
Superclass::LookupDataPointerType LookupDataPointerType