Orfeo Toolbox  3.16
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 
22 #include "otbMacro.h"
23 
25 
26 namespace otb
27 {
34 {
35 public:
36 
41 
43  itkNewMacro(Self);
44 
47 
53 
55  VariableLengthVectorType GetPhysicalBias() const
56  {
57  itkExceptionMacro("GetPhysicalBias not implemented in DefaultImageMetadataInterface, no captor type found");
58  }
59 
61  VariableLengthVectorType GetPhysicalGain() const
62  {
63  itkExceptionMacro("GetPhysicalGain not implemented in DefaultImageMetadataInterface, no captor type found");
64  }
65 
67  VariableLengthVectorType GetSolarIrradiance() const
68  {
69  itkExceptionMacro("GetSolarIrradiance not implemented in DefaultImageMetadataInterface, no captor type found");
70  }
71 
73  int GetDay() const
74  {
75  itkExceptionMacro("GetDay not implemented in DefaultImageMetadataInterface, no captor type found");
76  }
77 
79  int GetMonth() const
80  {
81  itkExceptionMacro("GetMonth not implemented in DefaultImageMetadataInterface, no captor type found");
82  }
83 
85  int GetYear() const
86  {
87  itkExceptionMacro("GetYear not implemented in DefaultImageMetadataInterface, no captor type found");
88  }
89 
91  int GetHour() const
92  {
93  itkExceptionMacro("GetHour not implemented in DefaultImageMetadataInterface, no captor type found");
94  }
95 
97  int GetMinute() const
98  {
99  itkExceptionMacro("GetMinute not implemented in DefaultImageMetadataInterface, no captor type found");
100  }
101 
103  int GetProductionDay() const
104  {
105  itkExceptionMacro("GetProductionDay not implemented in DefaultImageMetadataInterface, no captor type found");
106  }
107 
109  int GetProductionMonth() const
110  {
111  itkExceptionMacro("GetProductionMonth not implemented in DefaultImageMetadataInterface, no captor type found");
112  }
113 
115  int GetProductionYear() const
116  {
117  itkExceptionMacro("GetProductionYear not implemented in DefaultImageMetadataInterface, no captor type found");
118  }
119 
121  double GetSatElevation() const
122  {
123  itkExceptionMacro("GetSatElevation not implemented in DefaultImageMetadataInterface, no captor type found");
124  }
125 
127  double GetSatAzimuth() const
128  {
129  itkExceptionMacro("GetSatElevation not implemented in DefaultImageMetadataInterface, no captor type found");
130  }
131 
133  VariableLengthVectorType GetFirstWavelengths() const
134  {
135  itkExceptionMacro("GetFirstWavelengths not implemented in DefaultImageMetadataInterface, no captor type found");
136  }
137 
139  VariableLengthVectorType GetLastWavelengths() const
140  {
141  itkExceptionMacro("GetLastWavelengths not implemented in DefaultImageMetadataInterface, no captor type found");
142  }
143 
145  std::vector<std::string> GetEnhancedBandNames() const
146  {
147  itkExceptionMacro("GetEnhancedBandNames not implemented in DefaultImageMetadataInterface, no captor type found");
148  }
149 
150 
151  bool CanRead() const
152  {
153  // This clas is the default one, it has to be able to call every metadata
154  return true;
155  }
156 
164  std::vector<unsigned int> GetDefaultDisplay() const
165  {
166  unsigned int i = 0;
167  std::vector<unsigned int> rgb(3);
168 
169  if (this->GetNumberOfBands() == 0)
170  {
171  rgb[0] = 0;
172  rgb[1] = 1;
173  rgb[2] = 2;
174  }
175  else
176  {
177  unsigned int min;
178  min = std::min(this->GetNumberOfBands(), static_cast<unsigned int> (3));
179  while (i < min)
180  {
181  rgb[i] = i;
182  ++i;
183  }
184 
185  }
186  return rgb;
187  }
188 
189 protected:
192 
193 private:
194 
195  DefaultImageMetadataInterface(const Self &); //purposely not implemented
196  void operator =(const Self&); //purposely not implemented
197 
198 };
199 
200 } // end namespace otb
201 
202 #endif

Generated at Sun Feb 3 2013 00:20:07 for Orfeo Toolbox with doxygen 1.8.1.1