OTB  9.0.0
Orfeo Toolbox
Public Types | List of all members
otb::ReduceSpectralResponse< TSpectralResponse, TRSR > Class Template Reference

#include <otbReduceSpectralResponse.h>

+ Inheritance diagram for otb::ReduceSpectralResponse< TSpectralResponse, TRSR >:
+ Collaboration diagram for otb::ReduceSpectralResponse< TSpectralResponse, TRSR >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef InputRSRType::Pointer InputRSRPointerType
 
typedef TRSR InputRSRType
 
typedef InputSpectralResponseType::Pointer InputSpectralResponsePointerType
 
typedef TSpectralResponse InputSpectralResponseType
 
typedef InputSpectralResponseType::PairType PairType
 
typedef itk::SmartPointer< SelfPointer
 
typedef InputRSRType::PrecisionType PrecisionType
 
typedef std::vector< ValuePrecisionTypeReduceSpectralResponseVectorType
 
typedef InputRSRType::RSRVectorType RSRVectorType
 
typedef ReduceSpectralResponse Self
 
typedef itk::DataObject Superclass
 
typedef InputRSRType::ValuePrecisionType ValuePrecisionType
 
typedef InputSpectralResponseType::VectorPairType VectorPairType
 
InputRSRPointerType m_InputSatRSR
 
InputSpectralResponsePointerType m_InputSpectralResponse
 
InputSpectralResponsePointerType m_ReduceResponse
 
bool m_ReflectanceMode
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
virtual const InputRSRTypeGetInputSatRSR () const
 
virtual void SetInputSatRSR (InputRSRType *_arg)
 
virtual const InputSpectralResponseTypeGetInputSpectralResponse () const
 
virtual void SetInputSpectralResponse (InputSpectralResponseType *_arg)
 
 itkGetObjectMacro (ReduceResponse, InputSpectralResponseType)
 
virtual void SetReflectanceMode (bool _arg)
 
virtual bool GetReflectanceMode () const
 
virtual bool Clear ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
ValuePrecisionType operator() (const unsigned int numBand)
 
void CalculateResponse ()
 
void LoadInputsFromFiles (const std::string &spectralResponseFile, const std::string &RSRFile, const unsigned int nbRSRBands, ValuePrecisionType coefNormSpectre=1.0, ValuePrecisionType coefNormRSR=1.0)
 
 ReduceSpectralResponse ()
 
 ~ReduceSpectralResponse () override
 
 ReduceSpectralResponse (const Self &)=delete
 
void operator= (const Self &)=delete
 

Detailed Description

template<class TSpectralResponse, class TRSR>
class otb::ReduceSpectralResponse< TSpectralResponse, TRSR >

This class computes the reduced spectral response of each band of a sensor.

It takes the spectral response of an object and the relative spectral response of a satellite (one response per band) to compute the satellite spectral bands.

There are 2 operating modes:

The two templates indicate:

The computation assumes that the RSR of the sensor has a wavelength resolution similar or better than the spectral response to be reduced. If this is not the case, it is wise to oversample it (by linear interpolation, for instance).

The method CalculateResponse must be called.

See also
itk::DataObject
SpectralResponse
SatelliteRSR

Definition at line 64 of file otbReduceSpectralResponse.h.

Member Typedef Documentation

◆ ConstPointer

template<class TSpectralResponse , class TRSR >
typedef itk::SmartPointer<const Self> otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::ConstPointer

Definition at line 72 of file otbReduceSpectralResponse.h.

◆ InputRSRPointerType

template<class TSpectralResponse , class TRSR >
typedef InputRSRType::Pointer otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::InputRSRPointerType

Definition at line 79 of file otbReduceSpectralResponse.h.

◆ InputRSRType

template<class TSpectralResponse , class TRSR >
typedef TRSR otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::InputRSRType

Definition at line 76 of file otbReduceSpectralResponse.h.

◆ InputSpectralResponsePointerType

template<class TSpectralResponse , class TRSR >
typedef InputSpectralResponseType::Pointer otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::InputSpectralResponsePointerType

Definition at line 80 of file otbReduceSpectralResponse.h.

◆ InputSpectralResponseType

template<class TSpectralResponse , class TRSR >
typedef TSpectralResponse otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::InputSpectralResponseType

Template parameters typedef

Definition at line 75 of file otbReduceSpectralResponse.h.

◆ PairType

template<class TSpectralResponse , class TRSR >
typedef InputSpectralResponseType::PairType otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::PairType

Definition at line 78 of file otbReduceSpectralResponse.h.

◆ Pointer

template<class TSpectralResponse , class TRSR >
typedef itk::SmartPointer<Self> otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::Pointer

Definition at line 71 of file otbReduceSpectralResponse.h.

◆ PrecisionType

template<class TSpectralResponse , class TRSR >
typedef InputRSRType::PrecisionType otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::PrecisionType

Definition at line 82 of file otbReduceSpectralResponse.h.

◆ ReduceSpectralResponseVectorType

template<class TSpectralResponse , class TRSR >
typedef std::vector<ValuePrecisionType> otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::ReduceSpectralResponseVectorType

Definition at line 89 of file otbReduceSpectralResponse.h.

◆ RSRVectorType

template<class TSpectralResponse , class TRSR >
typedef InputRSRType::RSRVectorType otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::RSRVectorType

Definition at line 88 of file otbReduceSpectralResponse.h.

◆ Self

template<class TSpectralResponse , class TRSR >
typedef ReduceSpectralResponse otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::Self

Standard class typedefs

Definition at line 69 of file otbReduceSpectralResponse.h.

◆ Superclass

template<class TSpectralResponse , class TRSR >
typedef itk::DataObject otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::Superclass

Definition at line 70 of file otbReduceSpectralResponse.h.

◆ ValuePrecisionType

template<class TSpectralResponse , class TRSR >
typedef InputRSRType::ValuePrecisionType otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::ValuePrecisionType

Definition at line 83 of file otbReduceSpectralResponse.h.

◆ VectorPairType

template<class TSpectralResponse , class TRSR >
typedef InputSpectralResponseType::VectorPairType otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::VectorPairType

Definition at line 85 of file otbReduceSpectralResponse.h.

Constructor & Destructor Documentation

◆ ReduceSpectralResponse() [1/2]

template<class TSpectralResponse , class TRSR >
otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::ReduceSpectralResponse
protected

◆ ~ReduceSpectralResponse()

template<class TSpectralResponse , class TRSR >
otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::~ReduceSpectralResponse ( )
inlineoverrideprotected

Constructor from a ASCII file Destructor

Definition at line 142 of file otbReduceSpectralResponse.h.

◆ ReduceSpectralResponse() [2/2]

template<class TSpectralResponse , class TRSR >
otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::ReduceSpectralResponse ( const Self )
privatedelete

PrintSelf method Input relative spectral sensor model of response

Member Function Documentation

◆ CalculateResponse()

template<class TSpectralResponse , class TRSR >
void otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::CalculateResponse

Calculate the vector response for each band of the sensor

Definition at line 129 of file otbReduceSpectralResponse.hxx.

◆ Clear()

template<class TSpectralResponse , class TRSR >
bool otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::Clear
virtual

Clear the vector data

Definition at line 38 of file otbReduceSpectralResponse.hxx.

◆ CreateAnother()

template<class TSpectralResponse , class TRSR >
virtual::itk::LightObject::Pointer otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::CreateAnother ( void  ) const

PrintSelf method Input relative spectral sensor model of response

◆ GetInputSatRSR()

template<class TSpectralResponse , class TRSR >
virtual const InputRSRType* otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::GetInputSatRSR ( ) const
virtual

PrintSelf method Input relative spectral sensor model of response

◆ GetInputSpectralResponse()

template<class TSpectralResponse , class TRSR >
virtual const InputSpectralResponseType* otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::GetInputSpectralResponse ( ) const
virtual

PrintSelf method Input relative spectral sensor model of response

◆ GetNameOfClass()

template<class TSpectralResponse , class TRSR >
virtual const char* otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::GetNameOfClass ( ) const
virtual

PrintSelf method Input relative spectral sensor model of response

◆ GetReflectanceMode()

template<class TSpectralResponse , class TRSR >
virtual bool otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::GetReflectanceMode ( ) const
virtual

PrintSelf method Input relative spectral sensor model of response

◆ itkGetObjectMacro()

template<class TSpectralResponse , class TRSR >
otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::itkGetObjectMacro ( ReduceResponse  ,
InputSpectralResponseType   
)

The GetReduceResponse method gives the output. The first value in the pair is the central wavelength of the band (see SpectralResponse).

◆ LoadInputsFromFiles()

template<class TSpectralResponse , class TRSR >
void otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::LoadInputsFromFiles ( const std::string &  spectralResponseFile,
const std::string &  RSRFile,
const unsigned int  nbRSRBands,
ValuePrecisionType  coefNormSpectre = 1.0,
ValuePrecisionType  coefNormRSR = 1.0 
)

Create and load Spectral response and satellite RSR from files

Load the spectral response file

Set the satellite number of bands

Load the satellite response file

Definition at line 149 of file otbReduceSpectralResponse.hxx.

◆ New()

template<class TSpectralResponse , class TRSR >
static Pointer otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::New ( )
static

Standard macros

◆ operator()()

template<class TSpectralResponse , class TRSR >
ReduceSpectralResponse< TSpectralResponse, TRSR >::ValuePrecisionType otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::operator() ( const unsigned int  numBand)
inline
Parameters
PrecisionType
Returns
The integrated value of the RSR for the input spectral response.

Definition at line 67 of file otbReduceSpectralResponse.hxx.

References otb::trapezoid_area().

◆ operator=()

template<class TSpectralResponse , class TRSR >
void otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::operator= ( const Self )
privatedelete

PrintSelf method Input relative spectral sensor model of response

◆ PrintSelf()

template<class TSpectralResponse , class TRSR >
void otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
override

PrintSelf method

Definition at line 168 of file otbReduceSpectralResponse.hxx.

◆ SetInputSatRSR()

template<class TSpectralResponse , class TRSR >
virtual void otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::SetInputSatRSR ( InputRSRType _arg)
virtual

PrintSelf method Input relative spectral sensor model of response

◆ SetInputSpectralResponse()

template<class TSpectralResponse , class TRSR >
virtual void otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::SetInputSpectralResponse ( InputSpectralResponseType _arg)
virtual

PrintSelf method Input relative spectral sensor model of response

◆ SetReflectanceMode()

template<class TSpectralResponse , class TRSR >
virtual void otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::SetReflectanceMode ( bool  _arg)
virtual

PrintSelf method Input relative spectral sensor model of response

Member Data Documentation

◆ m_InputSatRSR

template<class TSpectralResponse , class TRSR >
InputRSRPointerType otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::m_InputSatRSR
protected

PrintSelf method Input relative spectral sensor model of response

Definition at line 142 of file otbReduceSpectralResponse.h.

◆ m_InputSpectralResponse

template<class TSpectralResponse , class TRSR >
InputSpectralResponsePointerType otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::m_InputSpectralResponse
protected

Input spectral response (usually from a library)

Definition at line 151 of file otbReduceSpectralResponse.h.

◆ m_ReduceResponse

template<class TSpectralResponse , class TRSR >
InputSpectralResponsePointerType otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::m_ReduceResponse
private

◆ m_ReflectanceMode

template<class TSpectralResponse , class TRSR >
bool otb::ReduceSpectralResponse< TSpectralResponse, TRSR >::m_ReflectanceMode
private

Choose between reflectance or radiance mode

Definition at line 161 of file otbReduceSpectralResponse.h.


The documentation for this class was generated from the following files: