Orfeo Toolbox  4.0
otbImageMetadataInterfaceBase.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #ifndef __otbImageMetadataInterfaceBase_h
19 #define __otbImageMetadataInterfaceBase_h
20 
21 #include <string>
22 
23 #include "itkMetaDataDictionary.h"
24 #include "otbMetaDataKey.h"
25 #include "itkImageBase.h"
26 #include "otbMacro.h"
27 
28 namespace otb
29 {
30 
31 class ImageKeywordlist;
32 
38 class ITK_EXPORT ImageMetadataInterfaceBase : public itk::Object
39 {
40 public:
41 
46 
49 
55  typedef unsigned int UnsignedIntType;
56 
57 
59  void SetImage (ImageType* image)
60  {
61  this->SetMetaDataDictionary(image->GetMetaDataDictionary());
62  }
63 
65  void SetMetaDataDictionary(const MetaDataDictionaryType& dict)
66  {
67  m_MetaDataDictionary = dict;
68  }
69 
71  const MetaDataDictionaryType& GetMetaDataDictionary() const
72  {
73  return m_MetaDataDictionary;
74  }
75 
77  std::string GetProjectionRef() const;
78 
80  std::string GetGCPProjection() const;
81 // otbMetadataGetMacro(GCPProjection, std::string);
82 
83  unsigned int GetGCPCount() const;
84 // otbMetadataGetMacro(GCPCount, unsigned int);
85 
86  OTB_GCP& GetGCPs(unsigned int GCPnum);
87  //otbMetadataGetGCPnumMacro(GCPs, OTB_GCP&, GCPnum, unsigned int);
88 
89  std::string GetGCPId(unsigned int GCPnum) const;
90 // otbMetadataGetGCPnumMacro(GCPId, std::string, GCPnum, unsigned int);
91 
92  std::string GetGCPInfo(unsigned int GCPnum) const;
93 // otbMetadataGetGCPnumMacro(GCPInfo, std::string, GCPnum, unsigned int);
94 
95  double GetGCPRow(unsigned int GCPnum) const;
96 // otbMetadataGetGCPnumMacro(GCPRow, double, GCPnum, unsigned int);
97 
98  double GetGCPCol(unsigned int GCPnum) const;
99 // otbMetadataGetGCPnumMacro(GCPCol, double, GCPnum, unsigned int);
100 
101  double GetGCPX(unsigned int GCPnum) const;
102 // otbMetadataGetGCPnumMacro(GCPX, double, GCPnum, unsigned int);
103 
104  double GetGCPY(unsigned int GCPnum) const;
105 // otbMetadataGetGCPnumMacro(GCPY, double, GCPnum, unsigned int);
106 
107  double GetGCPZ(unsigned int GCPnum) const;
108 // otbMetadataGetGCPnumMacro(GCPZ, double, GCPnum, unsigned int);
109 
112  VectorType GetGeoTransform() const;
113 // otbMetadataGetMacro(GeoTransform, VectorType);
114 
117  VectorType GetUpperLeftCorner() const;
118 // otbMetadataGetMacro(UpperLeftCorner, VectorType);
119 
120  VectorType GetUpperRightCorner() const;
121 // otbMetadataGetMacro(UpperRightCorner, VectorType);
122 
123  VectorType GetLowerLeftCorner() const;
124 // otbMetadataGetMacro(LowerLeftCorner, VectorType);
125 
126  VectorType GetLowerRightCorner() const;
127 // otbMetadataGetMacro(LowerRightCorner, VectorType);
128 
130  ImageKeywordlistType GetImageKeywordlist();
131  const ImageKeywordlistType GetImageKeywordlist() const;
132 
134  std::string GetSensorID() const;
135  //otbMetadataGetMacro(SensorID, std::string);
136 
138  unsigned int GetNumberOfBands() const;
139  //otbMetadataGetMacro(NumberOfBands, unsigned int);
140 
142  std::vector<std::string> GetBandName() const;
143  //otbMetadataGetMacro(BandName, std::vector<std::string>);
144 
146  double GetXPixelSpacing() const;
147  //otbMetadataGetMacro(XPixelSpacing, double);
148 
150  double GetYPixelSpacing() const;
151  //otbMetadataGetMacro(YPixelSpacing, double);
152 
153 
155  virtual int GetDay() const = 0;
156 // otbMetadataGetMacro(Day, int);
157 
159  virtual int GetMonth() const = 0;
160  //otbMetadataGetMacro(Month, int);
161 
163  virtual int GetYear() const = 0;
164  //otbMetadataGetMacro(Year, int);
165 
167  virtual int GetHour() const = 0;
168  //otbMetadataGetMacro(Hour, int);
169 
171  virtual int GetMinute() const = 0;
172  //otbMetadataGetMacro(Minute, int);
173 
175  virtual int GetProductionDay() const = 0;
176  //otbMetadataGetMacro(ProductionDay, int);
177 
179  virtual int GetProductionMonth() const = 0;
180  //otbMetadataGetMacro(ProductionMonth, int);
181 
183  virtual int GetProductionYear() const = 0;
184  //otbMetadataGetMacro(ProductionYear, int);
185 
187  virtual std::vector<std::string> GetEnhancedBandNames () const = 0;
188 
191  virtual std::vector<unsigned int> GetDefaultDisplay() const = 0;
192 
193  virtual bool CanRead() const = 0;
194 
195  virtual void PrintSelf(std::ostream& os, itk::Indent indent, const MetaDataDictionaryType& dict) const;
196 
197 protected:
200 
201  void PrintSelf(std::ostream& os, itk::Indent indent) const;
202 
204 
205 private:
206  ImageMetadataInterfaceBase(const Self &); //purposely not implemented
207  void operator =(const Self&); //purposely not implemented
208 
210 };
211 
212 } // end namespace otb
213 
214 #endif

Generated at Sat Mar 8 2014 15:59:08 for Orfeo Toolbox with doxygen 1.8.3.1