Orfeo Toolbox  4.0
otbDefaultImageMetadataInterface.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 __otbDefaultImageMetadataInterface_h
19 #define __otbDefaultImageMetadataInterface_h
20 
21 #include <algorithm>
22 
23 #include "otbMacro.h"
24 
26 
27 namespace otb
28 {
35 {
36 public:
37 
42 
44  itkNewMacro(Self);
45 
48 
54 
56  VariableLengthVectorType GetPhysicalBias() const
57  {
58  itkExceptionMacro("GetPhysicalBias not implemented in DefaultImageMetadataInterface, no captor type found");
59  }
60 
62  VariableLengthVectorType GetPhysicalGain() const
63  {
64  itkExceptionMacro("GetPhysicalGain not implemented in DefaultImageMetadataInterface, no captor type found");
65  }
66 
68  VariableLengthVectorType GetSolarIrradiance() const
69  {
70  itkExceptionMacro("GetSolarIrradiance not implemented in DefaultImageMetadataInterface, no captor type found");
71  }
72 
74  int GetDay() const
75  {
76  itkExceptionMacro("GetDay not implemented in DefaultImageMetadataInterface, no captor type found");
77  }
78 
80  int GetMonth() const
81  {
82  itkExceptionMacro("GetMonth not implemented in DefaultImageMetadataInterface, no captor type found");
83  }
84 
86  int GetYear() const
87  {
88  itkExceptionMacro("GetYear not implemented in DefaultImageMetadataInterface, no captor type found");
89  }
90 
92  int GetHour() const
93  {
94  itkExceptionMacro("GetHour not implemented in DefaultImageMetadataInterface, no captor type found");
95  }
96 
98  int GetMinute() const
99  {
100  itkExceptionMacro("GetMinute not implemented in DefaultImageMetadataInterface, no captor type found");
101  }
102 
104  int GetProductionDay() const
105  {
106  itkExceptionMacro("GetProductionDay not implemented in DefaultImageMetadataInterface, no captor type found");
107  }
108 
110  int GetProductionMonth() const
111  {
112  itkExceptionMacro("GetProductionMonth not implemented in DefaultImageMetadataInterface, no captor type found");
113  }
114 
116  int GetProductionYear() const
117  {
118  itkExceptionMacro("GetProductionYear not implemented in DefaultImageMetadataInterface, no captor type found");
119  }
120 
122  double GetSatElevation() const
123  {
124  itkExceptionMacro("GetSatElevation not implemented in DefaultImageMetadataInterface, no captor type found");
125  }
126 
128  double GetSatAzimuth() const
129  {
130  itkExceptionMacro("GetSatElevation not implemented in DefaultImageMetadataInterface, no captor type found");
131  }
132 
134  VariableLengthVectorType GetFirstWavelengths() const
135  {
136  itkExceptionMacro("GetFirstWavelengths not implemented in DefaultImageMetadataInterface, no captor type found");
137  }
138 
140  VariableLengthVectorType GetLastWavelengths() const
141  {
142  itkExceptionMacro("GetLastWavelengths not implemented in DefaultImageMetadataInterface, no captor type found");
143  }
144 
146  std::vector<std::string> GetEnhancedBandNames() const
147  {
148  itkExceptionMacro("GetEnhancedBandNames not implemented in DefaultImageMetadataInterface, no captor type found");
149  }
150 
151 
152  bool CanRead() const
153  {
154  // This clas is the default one, it has to be able to call every metadata
155  return true;
156  }
157 
165  std::vector<unsigned int> GetDefaultDisplay() const
166  {
167  unsigned int i = 0;
168  std::vector<unsigned int> rgb(3);
169 
170  if (this->GetNumberOfBands() == 0)
171  {
172  rgb[0] = 0;
173  rgb[1] = 1;
174  rgb[2] = 2;
175  }
176  else
177  {
178  unsigned int min;
179  min = std::min(this->GetNumberOfBands(), static_cast<unsigned int> (3));
180  while (i < min)
181  {
182  rgb[i] = i;
183  ++i;
184  }
185 
186  }
187  return rgb;
188  }
189 
190 protected:
193 
194 private:
195 
196  DefaultImageMetadataInterface(const Self &); //purposely not implemented
197  void operator =(const Self&); //purposely not implemented
198 
199 };
200 
201 } // end namespace otb
202 
203 #endif

Generated at Sat Mar 8 2014 15:53:23 for Orfeo Toolbox with doxygen 1.8.3.1