OTB  9.0.0
Orfeo Toolbox
otbAtmosphericRadiativeTerms.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 otbAtmosphericRadiativeTerms_h
22 #define otbAtmosphericRadiativeTerms_h
23 
24 #include "OTBOpticalCalibrationExport.h"
25 #include "itkDataObject.h"
26 #include "itkObjectFactory.h"
27 #include "itkMacro.h"
28 #include <vector>
29 
30 namespace otb
31 {
32 
44 class OTBOpticalCalibration_EXPORT AtmosphericRadiativeTermsSingleChannel : public itk::DataObject
45 {
46 public:
49  typedef itk::DataObject Superclass;
50  typedef itk::SmartPointer<Self> Pointer;
51  typedef itk::SmartPointer<const Self> ConstPointer;
52 
54  itkTypeMacro(AtmosphericRadiativeTermsSingleChannel, DataObject);
55 
57  itkNewMacro(Self);
58 
62  itkSetMacro(IntrinsicAtmosphericReflectance, double);
63  itkGetMacro(IntrinsicAtmosphericReflectance, double);
65 
69  itkSetMacro(SphericalAlbedo, double);
70  itkGetMacro(SphericalAlbedo, double);
71 
75  itkSetMacro(TotalGaseousTransmission, double);
76  itkGetMacro(TotalGaseousTransmission, double);
78 
82  itkSetMacro(DownwardTransmittance, double);
83  itkGetMacro(DownwardTransmittance, double);
85 
89  itkSetMacro(UpwardTransmittance, double);
90  itkGetMacro(UpwardTransmittance, double);
92 
96  itkSetMacro(UpwardDiffuseTransmittance, double);
97  itkGetMacro(UpwardDiffuseTransmittance, double);
99 
103  itkSetMacro(UpwardDirectTransmittance, double);
104  itkGetMacro(UpwardDirectTransmittance, double);
106 
110  itkSetMacro(UpwardDiffuseTransmittanceForRayleigh, double);
111  itkGetMacro(UpwardDiffuseTransmittanceForRayleigh, double);
113 
117  itkSetMacro(UpwardDiffuseTransmittanceForAerosol, double);
118  itkGetMacro(UpwardDiffuseTransmittanceForAerosol, double);
120 
124  itkSetMacro(WavelengthSpectralBand, double);
125  itkGetMacro(WavelengthSpectralBand, double);
127 
128 protected:
131 
134  {
135  }
136 
138  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
139 
140 private:
141  AtmosphericRadiativeTermsSingleChannel(const Self&) = delete;
142  void operator=(const Self&) = delete;
143 
146 
149 
152 
155 
158 
161 
164 
167 
170 
173 };
174 
185 class OTBOpticalCalibration_EXPORT AtmosphericRadiativeTerms : public itk::DataObject
186 {
187 public:
190  typedef itk::DataObject Superclass;
191  typedef itk::SmartPointer<Self> Pointer;
192  typedef itk::SmartPointer<const Self> ConstPointer;
193 
195  itkTypeMacro(AtmosphericRadiativeTerms, DataObject);
196 
198  itkNewMacro(Self);
199 
201  typedef std::vector<ValueType> VectorValueType;
202  typedef std::vector<double> DataVectorType;
203  typedef DataVectorType::size_type DataVectorSizeType;
207  void SetValues(const VectorValueType& val)
208  {
209  m_Values = val;
210  this->Modified();
211  }
213  {
214  return m_Values;
215  }
216  const VectorValueType& GetValues() const
217  {
218  return m_Values;
219  }
221 
225  void SetIntrinsicAtmosphericReflectances(const DataVectorType& vect);
226  void SetSphericalAlbedos(const DataVectorType& vect);
227  void SetTotalGaseousTransmissions(const DataVectorType& vect);
228  void SetDownwardTransmittances(const DataVectorType& vect);
229  void SetUpwardTransmittances(const DataVectorType& vect);
231 
232  void SetUpwardDiffuseTransmittances(const DataVectorType& vect);
233  void SetUpwardDirectTransmittances(const DataVectorType& vect);
234  void SetUpwardDiffuseTransmittancesForRayleigh(const DataVectorType& vect);
235  void SetUpwardDiffuseTransmittancesForAerosol(const DataVectorType& vect);
236  void SetWavelengthSpectralBand(const DataVectorType& vect);
237 
239  void SetValueByIndex(unsigned int id, const ValueType& val);
240  void SetIntrinsicAtmosphericReflectance(unsigned int id, const double& val);
241  void SetSphericalAlbedo(unsigned int id, const double& val);
242  void SetTotalGaseousTransmission(unsigned int id, const double& val);
243  void SetDownwardTransmittance(unsigned int id, const double& val);
244  void SetUpwardTransmittance(unsigned int id, const double& val);
246 
247  void SetUpwardDiffuseTransmittance(unsigned int id, const double& val);
248  void SetUpwardDirectTransmittance(unsigned int id, const double& val);
249  void SetUpwardDiffuseTransmittanceForRayleigh(unsigned int id, const double& val);
250  void SetUpwardDiffuseTransmittanceForAerosol(unsigned int id, const double& val);
251  void SetWavelengthSpectralBand(unsigned int id, const double& val);
252 
254  DataVectorType GetIntrinsicAtmosphericReflectances() const;
255  DataVectorType GetSphericalAlbedos() const;
256  DataVectorType GetTotalGaseousTransmissions() const;
257  DataVectorType GetDownwardTransmittances() const;
258  DataVectorType GetUpwardTransmittances() const;
260 
261  DataVectorType GetUpwardDiffuseTransmittances() const;
262  DataVectorType GetUpwardDirectTransmittances() const;
263  DataVectorType GetUpwardDiffuseTransmittancesForRayleigh() const;
264  DataVectorType GetUpwardDiffuseTransmittancesForAerosol() const;
265  DataVectorType GetWavelengthSpectralBand() const;
266 
268  double GetIntrinsicAtmosphericReflectance(unsigned int id) const;
269  double GetSphericalAlbedo(unsigned int id) const;
270  double GetTotalGaseousTransmission(unsigned int id) const;
271  double GetDownwardTransmittance(unsigned int id) const;
272  double GetUpwardTransmittance(unsigned int id) const;
273  double GetUpwardDiffuseTransmittance(unsigned int id) const;
274  double GetUpwardDirectTransmittance(unsigned int id) const;
275  double GetUpwardDiffuseTransmittanceForRayleigh(unsigned int id) const;
276  double GetUpwardDiffuseTransmittanceForAerosol(unsigned int id) const;
277  double GetWavelengthSpectralBand(unsigned int id) const;
279 
280  const ValueType GetValueByIndex(unsigned int id) const;
281 
283  void ValuesInitialization(DataVectorSizeType nbChannel);
284 
285 protected:
288 
291  {
292  }
293 
295  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
296 
297 private:
298  AtmosphericRadiativeTerms(const Self&) = delete;
299  void operator=(const Self&) = delete;
300 
303 
306 };
307 
308 } // end namespace otb
309 
310 #endif
otb::AtmosphericRadiativeTermsSingleChannel::Superclass
itk::DataObject Superclass
Definition: otbAtmosphericRadiativeTerms.h:49
otb::AtmosphericRadiativeTerms
This class is a vector of AtmosphericRadiativeTermsSingleChannel, it contains all atmospheric radiati...
Definition: otbAtmosphericRadiativeTerms.h:185
otb::AtmosphericRadiativeTermsSingleChannel::m_UpwardTransmittance
double m_UpwardTransmittance
Definition: otbAtmosphericRadiativeTerms.h:157
otb::AtmosphericRadiativeTerms::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbAtmosphericRadiativeTerms.h:192
otb::AtmosphericRadiativeTermsSingleChannel
This class contains all atmospheric radiative terms for one channel.
Definition: otbAtmosphericRadiativeTerms.h:44
otb::AtmosphericRadiativeTermsSingleChannel::m_TotalGaseousTransmission
double m_TotalGaseousTransmission
Definition: otbAtmosphericRadiativeTerms.h:151
otb::AtmosphericRadiativeTermsSingleChannel::m_UpwardDiffuseTransmittanceForRayleigh
double m_UpwardDiffuseTransmittanceForRayleigh
Definition: otbAtmosphericRadiativeTerms.h:166
otb::AtmosphericRadiativeTerms::GetValues
const VectorValueType & GetValues() const
Definition: otbAtmosphericRadiativeTerms.h:216
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::AtmosphericRadiativeTerms::VectorValueType
std::vector< ValueType > VectorValueType
Definition: otbAtmosphericRadiativeTerms.h:201
otb::AtmosphericRadiativeTerms::ValueType
AtmosphericRadiativeTermsSingleChannel::Pointer ValueType
Definition: otbAtmosphericRadiativeTerms.h:198
otb::AtmosphericRadiativeTermsSingleChannel::Self
AtmosphericRadiativeTermsSingleChannel Self
Definition: otbAtmosphericRadiativeTerms.h:48
otb::AtmosphericRadiativeTermsSingleChannel::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbAtmosphericRadiativeTerms.h:51
otb::AtmosphericRadiativeTermsSingleChannel::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbAtmosphericRadiativeTerms.h:50
otb::AtmosphericRadiativeTerms::GetValues
VectorValueType & GetValues()
Definition: otbAtmosphericRadiativeTerms.h:212
otb::AtmosphericRadiativeTerms::m_Values
VectorValueType m_Values
Definition: otbAtmosphericRadiativeTerms.h:302
otb::AtmosphericRadiativeTerms::DataVectorSizeType
DataVectorType::size_type DataVectorSizeType
Definition: otbAtmosphericRadiativeTerms.h:203
otb::AtmosphericRadiativeTerms::m_IsInitialized
bool m_IsInitialized
Definition: otbAtmosphericRadiativeTerms.h:305
otb::AtmosphericRadiativeTermsSingleChannel::m_UpwardDiffuseTransmittanceForAerosol
double m_UpwardDiffuseTransmittanceForAerosol
Definition: otbAtmosphericRadiativeTerms.h:169
otb::AtmosphericRadiativeTerms::Self
AtmosphericRadiativeTerms Self
Definition: otbAtmosphericRadiativeTerms.h:189
otb::AtmosphericRadiativeTerms::DataVectorType
std::vector< double > DataVectorType
Definition: otbAtmosphericRadiativeTerms.h:202
otb::AtmosphericRadiativeTerms::~AtmosphericRadiativeTerms
~AtmosphericRadiativeTerms() override
Definition: otbAtmosphericRadiativeTerms.h:290
otb::AtmosphericRadiativeTermsSingleChannel::m_SphericalAlbedo
double m_SphericalAlbedo
Definition: otbAtmosphericRadiativeTerms.h:148
otb::AtmosphericRadiativeTermsSingleChannel::m_WavelengthSpectralBand
double m_WavelengthSpectralBand
Definition: otbAtmosphericRadiativeTerms.h:172
otb::AtmosphericRadiativeTerms::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbAtmosphericRadiativeTerms.h:191
otb::AtmosphericRadiativeTermsSingleChannel::m_DownwardTransmittance
double m_DownwardTransmittance
Definition: otbAtmosphericRadiativeTerms.h:154
otb::AtmosphericRadiativeTermsSingleChannel::~AtmosphericRadiativeTermsSingleChannel
~AtmosphericRadiativeTermsSingleChannel() override
Definition: otbAtmosphericRadiativeTerms.h:133
otb::AtmosphericRadiativeTerms::SetValues
void SetValues(const VectorValueType &val)
Definition: otbAtmosphericRadiativeTerms.h:207
otb::AtmosphericRadiativeTerms::Superclass
itk::DataObject Superclass
Definition: otbAtmosphericRadiativeTerms.h:190
otb::AtmosphericRadiativeTermsSingleChannel::m_UpwardDiffuseTransmittance
double m_UpwardDiffuseTransmittance
Definition: otbAtmosphericRadiativeTerms.h:160
otb::AtmosphericRadiativeTermsSingleChannel::m_IntrinsicAtmosphericReflectance
double m_IntrinsicAtmosphericReflectance
Definition: otbAtmosphericRadiativeTerms.h:145
otb::AtmosphericRadiativeTermsSingleChannel::m_UpwardDirectTransmittance
double m_UpwardDirectTransmittance
Definition: otbAtmosphericRadiativeTerms.h:163