25#ifndef __TERRALIB_RP_INTERNAL_CONTRAST_H 
   26#define __TERRALIB_RP_INTERNAL_CONTRAST_H 
  265          const double& inRangeMin, 
const double& inRangeMax,
 
  266          const double& outRangeMin, 
const double& outRangeMax,
 
  267          double& gain, 
double& offset1, 
double& offset2 );
 
  274        typedef void (
Contrast::*RemapFuncPtrT)( 
const double& inValue, 
 
  348          const unsigned int inRasterBandIdx,
 
  350          const unsigned int outRasterBandIdx,
 
  351          RemapFuncPtrT remapFuncPtr,
 
  352          const bool enableProgress );
 
  387          outValue = ( ( inValue + m_offSetGainRemap_offset1 ) *
 
  388            m_offSetGainRemap_gain ) + m_offSetGainRemap_offset2;
 
  397        inline void squareRemap( 
const double& inValue, 
double& outValue )
 
  399          outValue = m_squareRemap_gain * std::pow( inValue, 2.0 );
 
  410          outValue = m_squareRootRemap_gain * std::sqrt( inValue );
 
  419        inline void logRemap( 
const double& inValue, 
double& outValue )
 
  421          outValue = m_logRemap_gain * std::log10( inValue + m_logRemap_offset + 1.0 );
 
  431          outValue = ( ( inValue + m_decorrelationEnhancementRemap_offset1 ) *
 
  432            m_decorrelationEnhancementRemap_gain )
 
  433            + m_decorrelationEnhancementRemap_offset2;
 
  443          outValue = ( ( m_histogramEqualizationRemap_cdf.lower_bound( inValue )->second ) -  m_histogramEqualizationRemap_cDFMin ) *
 
  444            m_histogramEqualizationRemap_gain;
 
Raster Processing algorithm output parameters base interface.
 
Raster Processing algorithm base interface.
 
Contrast output parameters.
 
std::string m_createdOutRasterDSType
Output raster data source type (as described in te::raster::RasterFactory ), leave empty if the resul...
 
const OutputParameters & operator=(const OutputParameters ¶ms)
 
std::vector< unsigned int > m_outRasterBands
Bands to be processed from the output raster.
 
te::rst::Raster * m_outRasterPtr
A pointer to a valid initiated raster instance where the result must be written, leave NULL to create...
 
std::map< std::string, std::string > m_createdOutRasterInfo
The necessary information to create the raster (as described in te::raster::RasterFactory),...
 
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state.
 
std::unique_ptr< te::rst::Raster > m_createdOutRasterPtr
A pointer to the created output raster instance, or an empty pointer empty if the result must be writ...
 
OutputParameters(const OutputParameters &)
 
AbstractParameters * clone() const
Create a clone copy of this instance.
 
Contrast::InputParameters m_inputParameters
Contrast input execution parameters.
 
bool remapBandLevels(const te::rst::Raster &inRaster, const unsigned int inRasterBandIdx, te::rst::Raster &outRaster, const unsigned int outRasterBandIdx, RemapFuncPtrT remapFuncPtr, const bool enableProgress)
Band gray levels remap using a remap function.
 
bool execSquareContrast()
Execute a square contrast following the internal parameters.
 
Contrast::OutputParameters * m_outputParametersPtr
Contrast input execution parameters.
 
bool execPercentCutUDLinear()
Execute a linear contrast cutted by user defined percentual values.
 
bool execLogContrast()
Execute a log contrast following the internal parameters.
 
bool execDecorrelationEnhancement()
Execute the decorrelation enhancement contrast following the internal parameters.
 
void DecorrelationEnhancementRemap(const double &inValue, double &outValue)
Remap on gray level using two offsets and gain.
 
void histogramEqualizationRemap(const double &inValue, double &outValue)
Remap on gray level using two offsets and gain.
 
void squareRemap(const double &inValue, double &outValue)
Remap on gray level using a square.
 
double m_histogramEqualizationRemap_cDFMin
 
bool execSquareRootContrast()
Execute a square root contrast following the internal parameters.
 
bool execLinearContrast()
Execute a linear contrast following the internal parameters.
 
double m_offSetGainRemap_gain
 
static bool getGainAndOffset(const InputParameters::ContrastType &type, const double &inRangeMin, const double &inRangeMax, const double &outRangeMin, const double &outRangeMax, double &gain, double &offset1, double &offset2)
Returns gain and offset values for contrast types (when applicable).
 
bool execCumulativeCut2Enhancement()
Execute a cumulative linear contrast cutted by 2-98% following the internal parameters.
 
std::map< double, double > m_histogramEqualizationRemap_cdf
 
double m_decorrelationEnhancementRemap_offset1
 
bool m_isInitialized
Tells if this instance is initialized.
 
double m_offSetGainRemap_offset1
 
double m_offSetGainRemap_offset2
 
double m_decorrelationEnhancementRemap_gain
 
void reset()
Clear all internal allocated objects and reset the algorithm to its initial state.
 
double m_histogramEqualizationRemap_gain
 
double m_decorrelationEnhancementRemap_offset2
 
bool execHistogramEqualizationContrast()
Execute the histogram equalization contrast following the internal parameters.
 
bool initialize(const AlgorithmInputParameters &inputParams)
Initialize the algorithm instance making it ready for execution.
 
void squareRootRemap(const double &inValue, double &outValue)
Remap on gray level using a square root.
 
double m_squareRootRemap_gain
 
bool isInitialized() const
Returns true if the algorithm instance is initialized and ready for execution.
 
bool execute(AlgorithmOutputParameters &outputParams)
Executes the algorithm using the supplied parameters.
 
bool execSetMeanAndStdContrast()
Execute the histogram equalization contrast following the internal parameters.
 
void offSetGainRemap(const double &inValue, double &outValue)
Remap on gray level using an offset and gain.
 
double m_squareRemap_gain
 
void logRemap(const double &inValue, double &outValue)
Remap on gray level using a log.
 
An abstract class for raster data strucutures.
 
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.