25 #ifndef __TERRALIB_RP_INTERNAL_CONTRAST_H
26 #define __TERRALIB_RP_INTERNAL_CONTRAST_H
84 DecorrelationEnhancementT
176 AbstractParameters* clone() const;
209 void reset() throw(
te::rp::Exception );
215 AbstractParameters* clone() const;
223 bool execute( AlgorithmOutputParameters& outputParams ) throw(
te::rp::Exception );
226 void reset() throw(
te::rp::Exception );
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;
342 inline
void offSetGainRemap( const
double& inValue,
double& outValue )
344 outValue = ( ( inValue + m_offSetGainRemap_offset1 ) *
345 m_offSetGainRemap_gain ) + m_offSetGainRemap_offset2;
354 inline void squareRemap(
const double& inValue,
double& outValue )
356 outValue = m_squareRemap_gain * std::pow( inValue, 2.0 );
367 outValue = m_squareRootRemap_gain * std::sqrt( inValue );
376 inline void logRemap(
const double& inValue,
double& outValue )
378 outValue = m_logRemap_gain * std::log10( inValue + m_logRemap_offset + 1.0 );
388 outValue = ( ( inValue + m_decorrelationEnhancementRemap_offset1 ) *
389 m_decorrelationEnhancementRemap_gain )
390 + m_decorrelationEnhancementRemap_offset2;
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::auto_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...
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.