All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::rp::Contrast Class Reference

Contrast enhancement. More...

#include <Contrast.h>

Inheritance diagram for te::rp::Contrast:
te::rp::Algorithm

Classes

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

Public Member Functions

 Contrast ()
 
bool execute (AlgorithmOutputParameters &outputParams) throw ( te::rp::Exception )
 Executes the algorithm using the supplied parameters. More...
 
bool initialize (const AlgorithmInputParameters &inputParams) throw ( te::rp::Exception )
 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 () throw ( te::rp::Exception )
 Clear all internal allocated objects and reset the algorithm to its initial state. More...
 
 ~Contrast ()
 

Protected Types

typedef void(Contrast::* RemapFuncPtrT )(const double &inValue, double &outValue)
 Type definition for a remapping function pointer. More...
 

Protected Member Functions

bool execHistogramEqualizationContrast ()
 Execute the histogram equalization contrast following the internal parameters. More...
 
bool execLinearContrast ()
 Execute a linear contrast following the internal parameters. More...
 
bool execSetMeanAndStdContrast ()
 Execute the histogram equalization contrast following the internal parameters. More...
 
void offSetGainRemap (const double &inValue, double &outValue)
 Remap on gray level using an offset (Contrast::m_offSetGainRemap_offset) and a gain value (Contrast::m_offSetGainRemap_gain. More...
 
bool remapBandLevels (const te::rst::Band &inRasterBand, te::rst::Band &outRasterBand, RemapFuncPtrT remapFuncPtr, const bool enableProgress)
 Band gray levels remap using a remap function. More...
 

Protected Attributes

Contrast::InputParameters m_inputParameters
 Contrast input execution parameters. More...
 
bool m_isInitialized
 Tells if this instance is initialized. More...
 
double m_offSetGainRemap_gain
 
double m_offSetGainRemap_offset
 
Contrast::OutputParametersm_outputParametersPtr
 Contrast input execution parameters. More...
 

Detailed Description

Contrast enhancement.

Apply contrast enhencement on the selected bands.

Definition at line 56 of file Contrast.h.

Member Typedef Documentation

typedef void(Contrast::* te::rp::Contrast::RemapFuncPtrT)(const double &inValue, double &outValue)
protected

Type definition for a remapping function pointer.

Definition at line 168 of file Contrast.h.

Constructor & Destructor Documentation

te::rp::Contrast::Contrast ( )

Definition at line 141 of file Contrast.cpp.

References reset().

te::rp::Contrast::~Contrast ( )

Definition at line 146 of file Contrast.cpp.

Member Function Documentation

bool te::rp::Contrast::execute ( AlgorithmOutputParameters outputParams)
throw (te::rp::Exception
)
virtual

Executes the algorithm using the supplied parameters.

Parameters
outputParamsOutput parameters.
Returns
true if OK, false on errors.

Implements te::rp::Algorithm.

Definition at line 150 of file Contrast.cpp.

References execHistogramEqualizationContrast(), execLinearContrast(), execSetMeanAndStdContrast(), te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Raster::getGrid(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rp::Contrast::InputParameters::HistogramEqualizationContrastT, te::rp::Contrast::InputParameters::LinearContrastT, te::rp::Contrast::OutputParameters::m_createdOutRasterDSType, te::rp::Contrast::OutputParameters::m_createdOutRasterInfo, te::rp::Contrast::OutputParameters::m_createdOutRasterPtr, m_inputParameters, te::rp::Contrast::InputParameters::m_inRasterBands, te::rp::Contrast::InputParameters::m_inRasterPtr, m_isInitialized, m_outputParametersPtr, te::rp::Contrast::OutputParameters::m_outRasterBands, te::rp::Contrast::OutputParameters::m_outRasterPtr, te::rp::Contrast::InputParameters::m_type, te::rst::RasterFactory::make(), te::rp::Contrast::InputParameters::SetMeanAndStdContrastT, TERP_LOG_AND_RETURN_FALSE, TERP_LOG_AND_THROW, TERP_TRUE_OR_RETURN_FALSE, and te::common::WAccess.

Referenced by te::qt::widgets::ContrastWizardPage::apply(), te::qt::widgets::ContrastWizard::execute(), and te::qt::widgets::ContrastDialog::on_okPushButton_clicked().

bool te::rp::Contrast::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.

Definition at line 324 of file Contrast.cpp.

References m_isInitialized.

void te::rp::Contrast::offSetGainRemap ( const double &  inValue,
double &  outValue 
)
inlineprotected

Remap on gray level using an offset (Contrast::m_offSetGainRemap_offset) and a gain value (Contrast::m_offSetGainRemap_gain.

Parameters
inValueInput gray level.
outValueOutput gray level.

Definition at line 217 of file Contrast.h.

Referenced by execLinearContrast().

bool te::rp::Contrast::remapBandLevels ( const te::rst::Band inRasterBand,
te::rst::Band outRasterBand,
RemapFuncPtrT  remapFuncPtr,
const bool  enableProgress 
)
protected

Member Data Documentation

Contrast::InputParameters te::rp::Contrast::m_inputParameters
protected
bool te::rp::Contrast::m_isInitialized
protected

Tells if this instance is initialized.

Definition at line 174 of file Contrast.h.

Referenced by execute(), initialize(), isInitialized(), and reset().

double te::rp::Contrast::m_offSetGainRemap_gain
protected

Definition at line 208 of file Contrast.h.

Referenced by execLinearContrast().

double te::rp::Contrast::m_offSetGainRemap_offset
protected

Definition at line 207 of file Contrast.h.

Referenced by execLinearContrast().

Contrast::OutputParameters* te::rp::Contrast::m_outputParametersPtr
protected

Contrast input execution parameters.

Definition at line 172 of file Contrast.h.

Referenced by execHistogramEqualizationContrast(), execLinearContrast(), execSetMeanAndStdContrast(), execute(), and reset().


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