25 #ifndef __TERRALIB_RP_INTERNAL_CONTRAST_H 26 #define __TERRALIB_RP_INTERNAL_CONTRAST_H 84 DecorrelationEnhancementT
176 AbstractParameters* clone() const;
215 AbstractParameters* clone() const;
231 bool isInitialized() const;
244 static
bool getGainAndOffset( const
InputParameters::ContrastType& type,
245 const
double& inRangeMin, const
double& inRangeMax,
246 const
double& outRangeMin, const
double& outRangeMax,
247 double& gain,
double& offset1,
double& offset2 );
254 typedef
void (
Contrast::*RemapFuncPtrT)( const
double& inValue,
260 bool m_isInitialized;
266 bool execLinearContrast();
272 bool execHistogramEqualizationContrast();
278 bool execSquareContrast();
284 bool execSquareRootContrast();
290 bool execLogContrast();
296 bool execSetMeanAndStdContrast();
302 bool execDecorrelationEnhancement();
312 bool remapBandLevels( const
te::rst::Band& inRasterBand,
313 te::rst::Band& outRasterBand, RemapFuncPtrT remapFuncPtr,
314 const
bool enableProgress );
317 double m_offSetGainRemap_offset1;
318 double m_offSetGainRemap_offset2;
319 double m_offSetGainRemap_gain;
322 double m_squareRemap_gain;
325 double m_squareRootRemap_gain;
328 double m_logRemap_gain;
329 double m_logRemap_offset;
332 double m_decorrelationEnhancementRemap_gain;
333 double m_decorrelationEnhancementRemap_offset1;
334 double m_decorrelationEnhancementRemap_offset2;
337 double m_histogramEqualizationRemap_cDFMin;
338 double m_histogramEqualizationRemap_gain;
339 std::map<
double,
double> m_histogramEqualizationRemap_cdf;
347 inline
void offSetGainRemap( const
double& inValue,
double& outValue )
349 outValue = ( ( inValue + m_offSetGainRemap_offset1 ) *
350 m_offSetGainRemap_gain ) + m_offSetGainRemap_offset2;
359 inline void squareRemap(
const double& inValue,
double& outValue )
361 outValue = m_squareRemap_gain * std::pow( inValue, 2.0 );
372 outValue = m_squareRootRemap_gain * std::sqrt( inValue );
381 inline void logRemap(
const double& inValue,
double& outValue )
383 outValue = m_logRemap_gain * std::log10( inValue + m_logRemap_offset + 1.0 );
393 outValue = ( ( inValue + m_decorrelationEnhancementRemap_offset1 ) *
394 m_decorrelationEnhancementRemap_gain )
395 + m_decorrelationEnhancementRemap_offset2;
405 outValue = ( ( m_histogramEqualizationRemap_cdf.lower_bound( inValue )->second ) - m_histogramEqualizationRemap_cDFMin ) *
406 m_histogramEqualizationRemap_gain;
te::rst::Raster * m_outRasterPtr
A pointer to a valid initiated raster instance where the result must be written, leave NULL to create...
Base exception class for plugin module.
void squareRemap(const double &inValue, double &outValue)
Remap on gray level using a square.
void logRemap(const double &inValue, double &outValue)
Remap on gray level using a log.
Raster Processing algorithm output parameters base interface.
Raster Processing algorithm base interface class.
void squareRootRemap(const double &inValue, double &outValue)
Remap on gray level using a square root.
Raster Processing algorithm base interface.
An abstract class for raster data strucutures.
std::vector< unsigned int > m_outRasterBands
Bands to be processed from the output raster.
void DecorrelationEnhancementRemap(const double &inValue, double &outValue)
Remap on gray level using two offsets and gain.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
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...
std::string m_createdOutRasterDSType
Output raster data source type (as described in te::raster::RasterFactory ), leave empty if the resul...
void histogramEqualizationRemap(const double &inValue, double &outValue)
Remap on gray level using two offsets and gain.
Contrast output parameters.
std::map< std::string, std::string > m_createdOutRasterInfo
The necessary information to create the raster (as described in te::raster::RasterFactory), leave empty if the result must be written to the raster pointed m_outRasterPtr.