OTB  9.0.0
Orfeo Toolbox
Classes | Public Types | List of all members
otb::SpectralResponse< TPrecision, TValuePrecision > Class Template Reference

#include <otbSpectralResponse.h>

+ Inheritance diagram for otb::SpectralResponse< TPrecision, TValuePrecision >:
+ Collaboration diagram for otb::SpectralResponse< TPrecision, TValuePrecision >:

Classes

struct  sort_pair
 

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::SmartPointer< FilterFunctionValuesTypeFilterFunctionValuesPointerType
 
typedef otb::FilterFunctionValues FilterFunctionValuesType
 
typedef ImageType::Pointer ImagePointerType
 
typedef otb::VectorImage< TValuePrecision, 2 > ImageType
 
typedef std::pair< TPrecision, TPrecision > IntervalType
 
typedef itk::ImageRegionIterator< ImageTypeIteratorType
 
typedef std::pair< TPrecision, TValuePrecision > PairType
 
typedef itk::SmartPointer< SelfPointer
 
typedef TPrecision PrecisionType
 
typedef SpectralResponse Self
 
typedef itk::DataObject Superclass
 
typedef TValuePrecision ValuePrecisionType
 
typedef std::vector< PairTypeVectorPairType
 
VectorPairType m_Response
 
TPrecision m_SensitivityThreshold
 
IntervalType m_Interval
 
unsigned long m_PosGuess
 
bool m_IntervalComputed
 
bool m_UsePosGuess
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
virtual void SetSensitivityThreshold (TPrecision _arg)
 
virtual TPrecision GetSensitivityThreshold () const
 
virtual void SetUsePosGuess (bool _arg)
 
virtual bool GetUsePosGuess () const
 
virtual bool Clear ()
 
virtual unsigned int Size () const
 
void Load (const std::string &filename, ValuePrecisionType coefNormalization=1.0)
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
VectorPairTypeGetResponse ()
 
void SetResponse (const VectorPairType &resp)
 
ValuePrecisionType operator() (const PrecisionType &lambda)
 
ImagePointerType GetImage (ImagePointerType image) const
 
void SetFromImage (ImagePointerType image)
 
FilterFunctionValuesPointerType GetFilterFunctionValues (double step=0.0025)
 
IntervalType GetInterval ()
 
void SetPosGuessMin (const PrecisionType &lambda)
 
 SpectralResponse ()
 
 ~SpectralResponse () override
 
void ComputeInterval ()
 
 SpectralResponse (const Self &)=delete
 
void operator= (const Self &)=delete
 

Detailed Description

template<class TPrecision = double, class TValuePrecision = double>
class otb::SpectralResponse< TPrecision, TValuePrecision >

This class represents the spectral response of an object (or a satellite band).

This class contains a SORTED std::vector of std::pair values. The first argument of the pair is a wavelength lambda (in micro meters). The second argument of the pair is the reflectance response associated to lambda.

The two templates indicate:

This Spectral response can be loaded from ASCII file (JPL spectral library Version 1.2) http://speclib.jpl.nasa.gov.

See also
itk::DataObject

Definition at line 55 of file otbSpectralResponse.h.

Member Typedef Documentation

◆ ConstPointer

template<class TPrecision = double, class TValuePrecision = double>
typedef itk::SmartPointer<const Self> otb::SpectralResponse< TPrecision, TValuePrecision >::ConstPointer

Definition at line 62 of file otbSpectralResponse.h.

◆ FilterFunctionValuesPointerType

template<class TPrecision = double, class TValuePrecision = double>
typedef itk::SmartPointer<FilterFunctionValuesType> otb::SpectralResponse< TPrecision, TValuePrecision >::FilterFunctionValuesPointerType

Definition at line 79 of file otbSpectralResponse.h.

◆ FilterFunctionValuesType

template<class TPrecision = double, class TValuePrecision = double>
typedef otb::FilterFunctionValues otb::SpectralResponse< TPrecision, TValuePrecision >::FilterFunctionValuesType

Standard filter functions values typedef

Definition at line 78 of file otbSpectralResponse.h.

◆ ImagePointerType

template<class TPrecision = double, class TValuePrecision = double>
typedef ImageType::Pointer otb::SpectralResponse< TPrecision, TValuePrecision >::ImagePointerType

Definition at line 74 of file otbSpectralResponse.h.

◆ ImageType

template<class TPrecision = double, class TValuePrecision = double>
typedef otb::VectorImage<TValuePrecision, 2> otb::SpectralResponse< TPrecision, TValuePrecision >::ImageType

Standard image typedef

Definition at line 73 of file otbSpectralResponse.h.

◆ IntervalType

template<class TPrecision = double, class TValuePrecision = double>
typedef std::pair<TPrecision, TPrecision> otb::SpectralResponse< TPrecision, TValuePrecision >::IntervalType

Definition at line 81 of file otbSpectralResponse.h.

◆ IteratorType

template<class TPrecision = double, class TValuePrecision = double>
typedef itk::ImageRegionIterator<ImageType> otb::SpectralResponse< TPrecision, TValuePrecision >::IteratorType

Definition at line 75 of file otbSpectralResponse.h.

◆ PairType

template<class TPrecision = double, class TValuePrecision = double>
typedef std::pair<TPrecision, TValuePrecision> otb::SpectralResponse< TPrecision, TValuePrecision >::PairType

Definition at line 68 of file otbSpectralResponse.h.

◆ Pointer

template<class TPrecision = double, class TValuePrecision = double>
typedef itk::SmartPointer<Self> otb::SpectralResponse< TPrecision, TValuePrecision >::Pointer

Definition at line 61 of file otbSpectralResponse.h.

◆ PrecisionType

template<class TPrecision = double, class TValuePrecision = double>
typedef TPrecision otb::SpectralResponse< TPrecision, TValuePrecision >::PrecisionType

Template parameters typedef

Definition at line 65 of file otbSpectralResponse.h.

◆ Self

template<class TPrecision = double, class TValuePrecision = double>
typedef SpectralResponse otb::SpectralResponse< TPrecision, TValuePrecision >::Self

Standard class typedefs

Definition at line 59 of file otbSpectralResponse.h.

◆ Superclass

template<class TPrecision = double, class TValuePrecision = double>
typedef itk::DataObject otb::SpectralResponse< TPrecision, TValuePrecision >::Superclass

Definition at line 60 of file otbSpectralResponse.h.

◆ ValuePrecisionType

template<class TPrecision = double, class TValuePrecision = double>
typedef TValuePrecision otb::SpectralResponse< TPrecision, TValuePrecision >::ValuePrecisionType

Definition at line 66 of file otbSpectralResponse.h.

◆ VectorPairType

template<class TPrecision = double, class TValuePrecision = double>
typedef std::vector<PairType> otb::SpectralResponse< TPrecision, TValuePrecision >::VectorPairType

Definition at line 70 of file otbSpectralResponse.h.

Constructor & Destructor Documentation

◆ SpectralResponse() [1/2]

template<class TPrecision , class TValuePrecision >
otb::SpectralResponse< TPrecision, TValuePrecision >::SpectralResponse
protected

Constructor

Definition at line 35 of file otbSpectralResponse.hxx.

◆ ~SpectralResponse()

template<class TPrecision = double, class TValuePrecision = double>
otb::SpectralResponse< TPrecision, TValuePrecision >::~SpectralResponse ( )
inlineoverrideprotected

Constructor from a ASCII file Destructor

Definition at line 169 of file otbSpectralResponse.h.

◆ SpectralResponse() [2/2]

template<class TPrecision = double, class TValuePrecision = double>
otb::SpectralResponse< TPrecision, TValuePrecision >::SpectralResponse ( const Self )
privatedelete

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

Member Function Documentation

◆ Clear()

template<class TPrecision , class TValuePrecision >
bool otb::SpectralResponse< TPrecision, TValuePrecision >::Clear
virtual

Clear the vector of data pairs

Definition at line 79 of file otbSpectralResponse.hxx.

◆ ComputeInterval()

template<class TPrecision , class TValuePrecision >
void otb::SpectralResponse< TPrecision, TValuePrecision >::ComputeInterval
protected

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

Definition at line 264 of file otbSpectralResponse.hxx.

Referenced by otb::SpectralResponse< TPrecision, TValuePrecision >::GetInterval().

◆ CreateAnother()

template<class TPrecision = double, class TValuePrecision = double>
virtual::itk::LightObject::Pointer otb::SpectralResponse< TPrecision, TValuePrecision >::CreateAnother ( void  ) const

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

◆ GetFilterFunctionValues()

template<class TPrecision , class TValuePrecision >
SpectralResponse< TPrecision, TValuePrecision >::FilterFunctionValuesPointerType otb::SpectralResponse< TPrecision, TValuePrecision >::GetFilterFunctionValues ( double  step = 0.0025)

Transform the SR in a Filter Function (6S parameters)

Definition at line 243 of file otbSpectralResponse.hxx.

◆ GetImage()

template<class TPrecision , class TValuePrecision >
SpectralResponse< TPrecision, TValuePrecision >::ImagePointerType otb::SpectralResponse< TPrecision, TValuePrecision >::GetImage ( ImagePointerType  image) const

Drop null value of reflectance in the Vector Transform the SR in a image to compute the TOA reflectance

Definition at line 186 of file otbSpectralResponse.hxx.

◆ GetInterval()

template<class TPrecision = double, class TValuePrecision = double>
IntervalType otb::SpectralResponse< TPrecision, TValuePrecision >::GetInterval ( )
inline

◆ GetNameOfClass()

template<class TPrecision = double, class TValuePrecision = double>
virtual const char* otb::SpectralResponse< TPrecision, TValuePrecision >::GetNameOfClass ( ) const
virtual

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

◆ GetResponse()

template<class TPrecision = double, class TValuePrecision = double>
VectorPairType& otb::SpectralResponse< TPrecision, TValuePrecision >::GetResponse ( )
inline

get vector of spectral responses

Definition at line 108 of file otbSpectralResponse.h.

References otb::SpectralResponse< TPrecision, TValuePrecision >::m_Response.

◆ GetSensitivityThreshold()

template<class TPrecision = double, class TValuePrecision = double>
virtual TPrecision otb::SpectralResponse< TPrecision, TValuePrecision >::GetSensitivityThreshold ( ) const
virtual

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

◆ GetUsePosGuess()

template<class TPrecision = double, class TValuePrecision = double>
virtual bool otb::SpectralResponse< TPrecision, TValuePrecision >::GetUsePosGuess ( ) const
virtual

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

◆ Load()

template<class TPrecision , class TValuePrecision >
void otb::SpectralResponse< TPrecision, TValuePrecision >::Load ( const std::string &  filename,
ValuePrecisionType  coefNormalization = 1.0 
)

Fill from a ASCII file (CD-ROM ASTER Spectral library Version 1.2)

Definition at line 44 of file otbSpectralResponse.hxx.

◆ New()

template<class TPrecision = double, class TValuePrecision = double>
static Pointer otb::SpectralResponse< TPrecision, TValuePrecision >::New ( )
static

Standard macros

◆ operator()()

template<class TPrecision , class TValuePrecision >
SpectralResponse< TPrecision, TValuePrecision >::ValuePrecisionType otb::SpectralResponse< TPrecision, TValuePrecision >::operator() ( const PrecisionType lambda)
inline
Parameters
PrecisionType
Returns
The interpolate value of the SR (for now a simple linear interpolation is used).

Definition at line 123 of file otbSpectralResponse.hxx.

◆ operator=()

template<class TPrecision = double, class TValuePrecision = double>
void otb::SpectralResponse< TPrecision, TValuePrecision >::operator= ( const Self )
privatedelete

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

◆ PrintSelf()

template<class TPrecision , class TValuePrecision >
void otb::SpectralResponse< TPrecision, TValuePrecision >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
override

PrintSelf method

Definition at line 297 of file otbSpectralResponse.hxx.

◆ SetFromImage()

template<class TPrecision , class TValuePrecision >
void otb::SpectralResponse< TPrecision, TValuePrecision >::SetFromImage ( ImagePointerType  image)

Transform the image to an SR structure

Definition at line 227 of file otbSpectralResponse.hxx.

◆ SetPosGuessMin()

template<class TPrecision , class TValuePrecision >
void otb::SpectralResponse< TPrecision, TValuePrecision >::SetPosGuessMin ( const PrecisionType lambda)

set index in m_Response vector to accelerate () operator

Definition at line 94 of file otbSpectralResponse.hxx.

◆ SetResponse()

template<class TPrecision = double, class TValuePrecision = double>
void otb::SpectralResponse< TPrecision, TValuePrecision >::SetResponse ( const VectorPairType resp)
inline

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

Definition at line 113 of file otbSpectralResponse.h.

References otb::SpectralResponse< TPrecision, TValuePrecision >::m_Response.

◆ SetSensitivityThreshold()

template<class TPrecision = double, class TValuePrecision = double>
virtual void otb::SpectralResponse< TPrecision, TValuePrecision >::SetSensitivityThreshold ( TPrecision  _arg)
virtual

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

◆ SetUsePosGuess()

template<class TPrecision = double, class TValuePrecision = double>
virtual void otb::SpectralResponse< TPrecision, TValuePrecision >::SetUsePosGuess ( bool  _arg)
virtual

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

◆ Size()

template<class TPrecision , class TValuePrecision >
unsigned int otb::SpectralResponse< TPrecision, TValuePrecision >::Size
virtual

Return the number of element in the vector (number of pairs)

Definition at line 87 of file otbSpectralResponse.hxx.

Member Data Documentation

◆ m_Interval

template<class TPrecision = double, class TValuePrecision = double>
IntervalType otb::SpectralResponse< TPrecision, TValuePrecision >::m_Interval
protected

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

Definition at line 179 of file otbSpectralResponse.h.

Referenced by otb::SpectralResponse< TPrecision, TValuePrecision >::GetInterval().

◆ m_IntervalComputed

template<class TPrecision = double, class TValuePrecision = double>
bool otb::SpectralResponse< TPrecision, TValuePrecision >::m_IntervalComputed
protected

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

Definition at line 181 of file otbSpectralResponse.h.

Referenced by otb::SpectralResponse< TPrecision, TValuePrecision >::GetInterval().

◆ m_PosGuess

template<class TPrecision = double, class TValuePrecision = double>
unsigned long otb::SpectralResponse< TPrecision, TValuePrecision >::m_PosGuess
protected

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

Definition at line 180 of file otbSpectralResponse.h.

◆ m_Response

template<class TPrecision = double, class TValuePrecision = double>
VectorPairType otb::SpectralResponse< TPrecision, TValuePrecision >::m_Response
protected

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

Definition at line 169 of file otbSpectralResponse.h.

Referenced by otb::SpectralResponse< TPrecision, TValuePrecision >::GetResponse(), and otb::SpectralResponse< TPrecision, TValuePrecision >::SetResponse().

◆ m_SensitivityThreshold

template<class TPrecision = double, class TValuePrecision = double>
TPrecision otb::SpectralResponse< TPrecision, TValuePrecision >::m_SensitivityThreshold
protected

Minimum value to consider that the spectral response is not null

Definition at line 178 of file otbSpectralResponse.h.

◆ m_UsePosGuess

template<class TPrecision = double, class TValuePrecision = double>
bool otb::SpectralResponse< TPrecision, TValuePrecision >::m_UsePosGuess
protected

PrintSelf method Spectral response vector of pairs (first=lambda; second=response)

Definition at line 182 of file otbSpectralResponse.h.


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