OTB  9.0.0
Orfeo Toolbox
otbImageMetadataCorrectionParameters.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 otbImageMetadataCorrectionParameters_h
22 #define otbImageMetadataCorrectionParameters_h
23 
24 #include "OTBOpticalCalibrationExport.h"
25 #include "itkObject.h"
26 #include "itkVariableSizeMatrix.h"
27 #include "itkVariableLengthVector.h"
28 #include "otbObjectList.h"
30 #include <vector>
31 #include <string>
32 
33 namespace otb
34 {
46 class OTBOpticalCalibration_EXPORT ImageMetadataCorrectionParameters : public itk::DataObject
47 {
48 public:
51  typedef itk::Object Superclass;
52  typedef itk::SmartPointer<Self> Pointer;
53  typedef itk::SmartPointer<const Self> ConstPointer;
54 
56  itkTypeMacro(ImageMetadataCorrectionParameters, Object);
57 
59  itkNewMacro(Self);
60 
63 
67  itkSetMacro(SolarZenithalAngle, double);
68  itkGetMacro(SolarZenithalAngle, double);
69 
73  itkSetMacro(SolarAzimutalAngle, double);
74  itkGetMacro(SolarAzimutalAngle, double);
76 
80  itkSetMacro(ViewingZenithalAngle, double);
81  itkGetMacro(ViewingZenithalAngle, double);
82 
86  itkSetMacro(ViewingAzimutalAngle, double);
87  itkGetMacro(ViewingAzimutalAngle, double);
89 
93  itkSetClampMacro(Month, unsigned int, 1, 12);
94  itkGetMacro(Month, unsigned int);
96 
100  itkSetClampMacro(Day, unsigned int, 1, 31);
101  itkGetMacro(Day, unsigned int);
103 
107  itkSetMacro(Year, unsigned int);
108  itkGetMacro(Year, unsigned int);
110 
112  itkSetMacro(FilterFunctionValuesFileName, std::string);
113  itkGetMacro(FilterFunctionValuesFileName, std::string);
115 
120  {
121  m_WavelengthSpectralBand = waveband;
122  }
124  {
125  if (m_WavelengthSpectralBand->Size() < id + 1)
126  {
127  for (unsigned int j = 0; j < (id + 1 - m_WavelengthSpectralBand->Size()); ++j)
128  {
130  m_WavelengthSpectralBand->PushBack(temp);
131  }
132  }
133  m_WavelengthSpectralBand->SetNthElement(id, function);
134  }
136  {
137  return m_WavelengthSpectralBand;
138  }
140  {
141  return &m_WavelengthSpectralBand;
142  }
144 
148  void LoadFilterFunctionValue(const std::string& filename);
150  {
151  this->LoadFilterFunctionValue(m_FilterFunctionValuesFileName);
152  }
154 
157 
160  {
161  }
162 
163 protected:
165  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
166 
167 private:
168  ImageMetadataCorrectionParameters(const Self&) = delete;
169  void operator=(const Self&) = delete;
170 
173 
176 
179 
182 
184  unsigned int m_Month;
185 
187  unsigned int m_Day;
188 
190  unsigned int m_Year;
192 
195 };
196 
197 } // end namespace otb
198 
199 #endif
otb::FilterFunctionValues::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbFilterFunctionValues.h:50
otb::ImageMetadataCorrectionParameters::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImageMetadataCorrectionParameters.h:52
otb::ImageMetadataCorrectionParameters::m_FilterFunctionValuesFileName
std::string m_FilterFunctionValuesFileName
Definition: otbImageMetadataCorrectionParameters.h:191
otb::ImageMetadataCorrectionParameters::LoadFilterFunctionValue
void LoadFilterFunctionValue()
Definition: otbImageMetadataCorrectionParameters.h:149
otb::ImageMetadataCorrectionParameters::m_Month
unsigned int m_Month
Definition: otbImageMetadataCorrectionParameters.h:184
otb::ImageMetadataCorrectionParameters::GetWavelengthSpectralBand
WavelengthSpectralBandVectorType GetWavelengthSpectralBand() const
Definition: otbImageMetadataCorrectionParameters.h:135
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ImageMetadataCorrectionParameters::GetWavelengthSpectralBandRef
const WavelengthSpectralBandVectorType * GetWavelengthSpectralBandRef() const
Definition: otbImageMetadataCorrectionParameters.h:139
otb::ObjectList::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbObjectList.h:46
otb::ImageMetadataCorrectionParameters::m_SolarZenithalAngle
double m_SolarZenithalAngle
Definition: otbImageMetadataCorrectionParameters.h:172
otb::ImageMetadataCorrectionParameters::m_Year
unsigned int m_Year
Definition: otbImageMetadataCorrectionParameters.h:190
otb::ImageMetadataCorrectionParameters::Superclass
itk::Object Superclass
Definition: otbImageMetadataCorrectionParameters.h:51
otb::ImageMetadataCorrectionParameters::SetWavelengthSpectralBandWithIndex
void SetWavelengthSpectralBandWithIndex(unsigned int id, const FilterFunctionValues::Pointer &function)
Definition: otbImageMetadataCorrectionParameters.h:123
otb::ImageMetadataCorrectionParameters::InternalWavelengthSpectralBandVectorType
ObjectList< FilterFunctionValues > InternalWavelengthSpectralBandVectorType
Definition: otbImageMetadataCorrectionParameters.h:59
otbObjectList.h
otb::ImageMetadataCorrectionParameters::Self
ImageMetadataCorrectionParameters Self
Definition: otbImageMetadataCorrectionParameters.h:50
otb::ImageMetadataCorrectionParameters::m_ViewingAzimutalAngle
double m_ViewingAzimutalAngle
Definition: otbImageMetadataCorrectionParameters.h:181
otb::ImageMetadataCorrectionParameters::SetWavelengthSpectralBand
void SetWavelengthSpectralBand(const WavelengthSpectralBandVectorType &waveband)
Definition: otbImageMetadataCorrectionParameters.h:119
otb::ImageMetadataCorrectionParameters::m_WavelengthSpectralBand
WavelengthSpectralBandVectorType m_WavelengthSpectralBand
Definition: otbImageMetadataCorrectionParameters.h:194
otb::ImageMetadataCorrectionParameters::m_ViewingZenithalAngle
double m_ViewingZenithalAngle
Definition: otbImageMetadataCorrectionParameters.h:178
otb::ImageMetadataCorrectionParameters
This class contains all atmospheric correction parameters.
Definition: otbImageMetadataCorrectionParameters.h:46
otb::ImageMetadataCorrectionParameters::WavelengthSpectralBandVectorType
InternalWavelengthSpectralBandVectorType::Pointer WavelengthSpectralBandVectorType
Definition: otbImageMetadataCorrectionParameters.h:62
otb::ImageMetadataCorrectionParameters::~ImageMetadataCorrectionParameters
~ImageMetadataCorrectionParameters() override
Definition: otbImageMetadataCorrectionParameters.h:159
otb::ImageMetadataCorrectionParameters::m_SolarAzimutalAngle
double m_SolarAzimutalAngle
Definition: otbImageMetadataCorrectionParameters.h:175
otb::ImageMetadataCorrectionParameters::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbImageMetadataCorrectionParameters.h:53
otb::ObjectList
This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >.
Definition: otbObjectList.h:40
otbFilterFunctionValues.h
otb::ImageMetadataCorrectionParameters::m_Day
unsigned int m_Day
Definition: otbImageMetadataCorrectionParameters.h:187