te::rp::Restoration Class Reference

This class implements the combining interpolation and restoration operation. More...

#include <Restoration.h>

Inheritance diagram for te::rp::Restoration:
te::rp::Algorithm

Classes

class  InputParameters
 Restoration input parameters. More...
 
class  OutputParameters
 Restoration output parameters. More...
 

Public Member Functions

bool execute (AlgorithmOutputParameters &outputParams) _NOEXCEPT_OP(false)
 Executes the algorithm using the supplied parameters. More...
 
const std::string & getErrorMessage () const
 Return the current error message if there is any. More...
 
bool initialize (const AlgorithmInputParameters &inputParams) _NOEXCEPT_OP(false)
 Initialize the algorithm instance making it ready for execution. More...
 
bool isInitialized () const
 Returns true if the algorithm instance is initialized and ready for execution. More...
 
void reset () _NOEXCEPT_OP(false)
 Clear all internal allocated objects and reset the algorithm to its initial state. More...
 
 Restoration ()
 
 ~Restoration ()
 

Protected Member Functions

bool applyFilterCoefs (const std::vector< std::vector< double > > &bandsXCoefs, const std::vector< std::vector< double > > &bandsYCoefs, const te::rst::Raster &inputRaster, te::rst::Raster &outputRaster)
 Apply the restorafion filter on the input rasters. More...
 
bool getFilterCoefs (const unsigned int bandDesignation, std::vector< double > &XCoefs, std::vector< double > &YCoefs) const
 Calculate the weights of the restoration filter in the vertical and horizontal directions. More...
 
unsigned int getFilterSize () const
 Return the target filter size following the current sensor. More...
 
void setErrorMessage (const std::string &newErrorMessage)
 Set the current error message. More...
 

Static Protected Member Functions

static void getDecomposedSamplingFactor (const InputParameters::SamplingFactorType &sFactortype, unsigned int &upperValue, unsigned int &lowerValue)
 Decompose sampling factor. More...
 

Protected Attributes

Restoration::InputParameters m_inputParameters
 Input parameters. More...
 
bool m_isInitialized
 Is this instance already initialized? More...
 

Private Attributes

std::string m_errorMessage
 Current error message. More...
 

Detailed Description

This class implements the combining interpolation and restoration operation.

Note
The restoration operation compensates the degradation due the optics, detector and electronic filtering in the interpolation process. The image to be processed must be in the original resolution. For example Spot-X ( 20 m ), Spot-Pan ( 10 m ) and TM ( 30 m ). Filters and Resamples the input image in disk using a filter in the vertical and horizontal directions.

Definition at line 47 of file Restoration.h.

Constructor & Destructor Documentation

◆ Restoration()

te::rp::Restoration::Restoration ( )

◆ ~Restoration()

te::rp::Restoration::~Restoration ( )

Member Function Documentation

◆ applyFilterCoefs()

bool te::rp::Restoration::applyFilterCoefs ( const std::vector< std::vector< double > > &  bandsXCoefs,
const std::vector< std::vector< double > > &  bandsYCoefs,
const te::rst::Raster inputRaster,
te::rst::Raster outputRaster 
)
protected

Apply the restorafion filter on the input rasters.

Parameters
bandsXCoefsX coeficients.
bandsYCoefsY coeficients.
inputRasterInput raster.
outputRasterPré-initialized Output raster.
Returns
true if OK, false on erros.

◆ execute()

bool te::rp::Restoration::execute ( AlgorithmOutputParameters outputParams)
virtual

Executes the algorithm using the supplied parameters.

Parameters
outputParamsOutput parameters.
Returns
true if OK, false on errors.
Note
A return error string can be obtained via Algorithm::getErrorMessage()

Implements te::rp::Algorithm.

◆ getDecomposedSamplingFactor()

static void te::rp::Restoration::getDecomposedSamplingFactor ( const InputParameters::SamplingFactorType sFactortype,
unsigned int &  upperValue,
unsigned int &  lowerValue 
)
staticprotected

Decompose sampling factor.

Parameters
sFactortypeSampling factor type.
upperValueUpper value.
lowerValueLower value.
Note
SamplingFactor = ( upperValue / lowerValue ).

◆ getErrorMessage()

const std::string& te::rp::Algorithm::getErrorMessage ( ) const
inherited

Return the current error message if there is any.

Returns
Return the current error message if there is any.

◆ getFilterCoefs()

bool te::rp::Restoration::getFilterCoefs ( const unsigned int  bandDesignation,
std::vector< double > &  XCoefs,
std::vector< double > &  YCoefs 
) const
protected

Calculate the weights of the restoration filter in the vertical and horizontal directions.

Parameters
bandDesignationSensor band designation (starting from 1).
XCoefsX coeficients.
YCoefsY coeficients.
Returns
true if OK, false on erros.

◆ getFilterSize()

unsigned int te::rp::Restoration::getFilterSize ( ) const
protected

Return the target filter size following the current sensor.

Returns
Return the target filter size following the current sensor.

◆ initialize()

bool te::rp::Restoration::initialize ( const AlgorithmInputParameters inputParams)
virtual

Initialize the algorithm instance making it ready for execution.

Parameters
inputParamsInput parameters.
Returns
true if OK, false on errors.
Note
A return error string can be obtained via Algorithm::getErrorMessage()

Implements te::rp::Algorithm.

◆ isInitialized()

bool te::rp::Restoration::isInitialized ( ) const
virtual

Returns true if the algorithm instance is initialized and ready for execution.

Returns
true if the algorithm instance is initialized and ready for execution.

Implements te::rp::Algorithm.

◆ reset()

void te::rp::Restoration::reset ( )
virtual

Clear all internal allocated objects and reset the algorithm to its initial state.

Reimplemented from te::rp::Algorithm.

◆ setErrorMessage()

void te::rp::Algorithm::setErrorMessage ( const std::string &  newErrorMessage)
protectedinherited

Set the current error message.

Parameters
newErrorMessageNew error message;

Member Data Documentation

◆ m_errorMessage

std::string te::rp::Algorithm::m_errorMessage
privateinherited

Current error message.

Definition at line 104 of file Algorithm.h.

◆ m_inputParameters

Restoration::InputParameters te::rp::Restoration::m_inputParameters
protected

Input parameters.

Definition at line 203 of file Restoration.h.

◆ m_isInitialized

bool te::rp::Restoration::m_isInitialized
protected

Is this instance already initialized?

Definition at line 201 of file Restoration.h.


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