22 #ifndef otbSurfaceReflectanceToReflectanceFilter_h
23 #define otbSurfaceReflectanceToReflectanceFilter_h
29 #include "itkMetaDataDictionary.h"
44 template <
class TInput,
class TOutput>
45 class ReflectanceToSurfaceReflectanceImageFunctor
106 double temp, temp1, temp2;
125 temp2 += temp1 *
m_Coefficient *
static_cast<double>(inPixel);
128 outPixel =
static_cast<TOutput
>(temp2);
165 template <
class TInputImage,
class TOutputImage>
168 TInputImage, TOutputImage,
169 typename Functor::ReflectanceToSurfaceReflectanceImageFunctor<typename TInputImage::InternalPixelType, typename TOutputImage::InternalPixelType>>
173 itkStaticConstMacro(InputImageDimension,
unsigned int, TInputImage::ImageDimension);
174 itkStaticConstMacro(OutputImageDimension,
unsigned int, TOutputImage::ImageDimension);
227 m_AtmosphericRadiativeTerms = atmoRadTerms;
228 this->SetNthInput(1, m_AtmosphericRadiativeTerms);
229 m_IsSetAtmosphericRadiativeTerms =
true;
238 m_AtmoCorrectionParameters = atmoCorrTerms;
239 this->SetNthInput(2, m_AtmoCorrectionParameters);
240 m_IsSetAtmoCorrectionParameters =
true;
249 m_AcquiCorrectionParameters = acquiCorrTerms;
250 this->SetNthInput(3, m_AcquiCorrectionParameters);
251 m_IsSetAcquiCorrectionParameters =
true;
258 void GenerateParameters();
261 itkSetMacro(UseGenerateParameters,
bool);
262 itkGetMacro(UseGenerateParameters,
bool);
266 itkSetMacro(IsSetAtmosphericRadiativeTerms,
bool);
267 itkGetMacro(IsSetAtmosphericRadiativeTerms,
bool);
280 void BeforeThreadedGenerateData()
override;
283 void UpdateAtmosphericRadiativeTerms();
286 void UpdateFunctors();
289 void Modified()
const override;
309 #ifndef OTB_MANUAL_INSTANTIATION
This class contains all atmospheric correction parameters.
itk::SmartPointer< Self > Pointer
This class is a vector of AtmosphericRadiativeTermsSingleChannel, it contains all atmospheric radiati...
itk::SmartPointer< Self > Pointer
This class contains the values of the filter function for the processed spectral band.
std::vector< WavelengthSpectralBandType > ValuesVectorType
float WavelengthSpectralBandType
Compute the surface reflectance pixel from a TOA reflectance.
bool operator==(const Self &func) const
void SetResidu(double res)
bool operator!=(const Self &func) const
ReflectanceToSurfaceReflectanceImageFunctor Self
void SetSphericalAlbedo(double albedo)
double GetSphericalAlbedo()
TOutput operator()(const TInput &inPixel)
ReflectanceToSurfaceReflectanceImageFunctor()
void SetCoefficient(double coef)
virtual ~ReflectanceToSurfaceReflectanceImageFunctor()
Calculates the slope, the orientation incidence and exitance radius values for each pixel.
bool m_FunctorParametersHaveBeenComputed
bool m_IsSetAcquiCorrectionParameters
OutputImageType::PixelType OutputPixelType
void SetAcquiCorrectionParameters(AcquiCorrectionParametersPointerType acquiCorrTerms)
UnaryImageFunctorWithVectorImageFilter< InputImageType, OutputImageType, FunctorType > Superclass
otb::FilterFunctionValues FilterFunctionValuesType
bool m_IsSetAtmosphericRadiativeTerms
otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms CorrectionParametersToRadiativeTermsType
AcquiCorrectionParametersType::Pointer AcquiCorrectionParametersPointerType
otb::ImageMetadataCorrectionParameters AcquiCorrectionParametersType
otb::AtmosphericRadiativeTerms AtmosphericRadiativeTermsType
itkGetObjectMacro(AtmosphericRadiativeTerms, AtmosphericRadiativeTermsType)
AtmoCorrectionParametersType::Pointer AtmoCorrectionParametersPointerType
OutputImageType::RegionType OutputImageRegionType
itk::SmartPointer< Self > Pointer
TOutputImage OutputImageType
InputImageType::PixelType InputPixelType
itk::SmartPointer< const Self > ConstPointer
InputImageType::RegionType InputImageRegionType
TInputImage InputImageType
OutputImageType::InternalPixelType OutputInternalPixelType
bool m_IsSetAtmoCorrectionParameters
otb::AtmosphericCorrectionParameters AtmoCorrectionParametersType
itkGetObjectMacro(AtmoCorrectionParameters, AtmoCorrectionParametersType)
itk::MetaDataDictionary MetaDataDictionaryType
bool m_UseGenerateParameters
AcquiCorrectionParametersPointerType m_AcquiCorrectionParameters
SurfaceReflectanceToReflectanceFilter Self
AtmosphericRadiativeTermsPointerType m_AtmosphericRadiativeTerms
AcquiCorrectionParametersType::WavelengthSpectralBandVectorType WavelengthSpectralBandVectorType
Functor::ReflectanceToSurfaceReflectanceImageFunctor< typename InputImageType::InternalPixelType, typename OutputImageType::InternalPixelType > FunctorType
InputImageType::InternalPixelType InputInternalPixelType
AtmosphericRadiativeTermsType::Pointer AtmosphericRadiativeTermsPointerType
FilterFunctionValuesType::WavelengthSpectralBandType ValueType
void SetAtmosphericRadiativeTerms(AtmosphericRadiativeTermsPointerType atmoRadTerms)
FilterFunctionValuesType::ValuesVectorType ValuesVectorType
void SetAtmoCorrectionParameters(AtmoCorrectionParametersPointerType atmoCorrTerms)
~SurfaceReflectanceToReflectanceFilter() override
AtmoCorrectionParametersPointerType m_AtmoCorrectionParameters
Applies a functor to a VectorImage.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.