te::map::RasterContrast Class Reference

This class contains the parameters needed to apply dynamic contrast over a raster. More...

#include <RasterContrast.h>

Public Member Functions

std::size_t getNBands ()
 It gets the contrast number of bands. More...
 
const te::map::RasterTransform::ContrastType getType () const
 It gets the contrast type. More...
 
void getValues (std::vector< double > &gain, std::vector< double > &offset1, std::vector< double > &offset2, std::vector< double > &min, std::vector< double > &max)
 It get the contrast transformation values. More...
 
 RasterContrast (const te::map::RasterTransform::ContrastType &type, const std::size_t &nBands)
 It constructs a new RasterContrast instance. More...
 
 RasterContrast (const RasterContrast &rhs)
 Copy constructor. More...
 
void setValues (const double &gain, const double &offset1, const double &offset2, const double &min, const double &max, const std::size_t &band)
 It set the transformation values for contranst of one band. More...
 
 ~RasterContrast ()
 Destructor. More...
 

Private Attributes

std::vector< double > m_gain
 
std::vector< double > m_max
 
std::vector< double > m_min
 
std::size_t m_nBands
 
std::vector< double > m_offset1
 
std::vector< double > m_offset2
 
te::map::RasterTransform::ContrastType m_type
 The contrast type. More...
 

Detailed Description

This class contains the parameters needed to apply dynamic contrast over a raster.

See also
RasterTransform

Definition at line 52 of file RasterContrast.h.

Constructor & Destructor Documentation

te::map::RasterContrast::RasterContrast ( const te::map::RasterTransform::ContrastType type,
const std::size_t &  nBands 
)

It constructs a new RasterContrast instance.

Parameters
typeThe contrast type.

Definition at line 31 of file RasterContrast.cpp.

References m_gain, m_max, m_min, m_nBands, m_offset1, and m_offset2.

te::map::RasterContrast::~RasterContrast ( )

Destructor.

Definition at line 62 of file RasterContrast.cpp.

References m_gain, m_max, m_min, m_offset1, and m_offset2.

te::map::RasterContrast::RasterContrast ( const RasterContrast rhs)

Copy constructor.

Definition at line 42 of file RasterContrast.cpp.

References m_gain, m_max, m_min, m_nBands, m_offset1, and m_offset2.

Member Function Documentation

std::size_t te::map::RasterContrast::getNBands ( )

It gets the contrast number of bands.

Returns
The number of bands

Definition at line 76 of file RasterContrast.cpp.

References m_nBands.

Referenced by te::map::serialize::WriteLayerRasterContrast().

const te::map::RasterTransform::ContrastType te::map::RasterContrast::getType ( ) const

It gets the contrast type.

Returns
The contrast type.

Definition at line 71 of file RasterContrast.cpp.

References m_type.

Referenced by te::map::DrawRaster(), and te::map::serialize::WriteLayerRasterContrast().

void te::map::RasterContrast::getValues ( std::vector< double > &  gain,
std::vector< double > &  offset1,
std::vector< double > &  offset2,
std::vector< double > &  min,
std::vector< double > &  max 
)

It get the contrast transformation values.

Parameters
gainThe vector with gain values of transformation.
offset1The vector with offset1 values of transformation.
offset2The vector with offset2 values of transformation.
minThe vector with minimun band values for this transformation.
maxThe vector with maximum band values for this transformation.

Definition at line 93 of file RasterContrast.cpp.

References m_gain, m_max, m_min, m_offset1, and m_offset2.

Referenced by te::map::DrawRaster(), te::qt::widgets::RasterSymbolizerWidget::onHistogramToolButtonClicked(), and te::map::serialize::WriteLayerRasterContrast().

void te::map::RasterContrast::setValues ( const double &  gain,
const double &  offset1,
const double &  offset2,
const double &  min,
const double &  max,
const std::size_t &  band 
)

It set the transformation values for contranst of one band.

Parameters
gainThe gain value of transformation.
offset1The offset1 value of transformation.
offset2The offset2 value of transformation.
minThe minimun band value for this transformation.
maxThe maximum band value for this transformation.
bandThe band index.

Definition at line 81 of file RasterContrast.cpp.

References band, m_gain, m_max, m_min, m_nBands, m_offset1, and m_offset2.

Referenced by te::mnt::ImageGenerationDialog::drawPreview(), te::qt::widgets::MixtureModelWizard::execute(), and te::qt::widgets::RasterSymbolizerWidget::onApplyToolButtonClicked().

Member Data Documentation

std::vector<double> te::map::RasterContrast::m_gain
private

Definition at line 113 of file RasterContrast.h.

Referenced by getValues(), RasterContrast(), setValues(), and ~RasterContrast().

std::vector<double> te::map::RasterContrast::m_max
private

Definition at line 117 of file RasterContrast.h.

Referenced by getValues(), RasterContrast(), setValues(), and ~RasterContrast().

std::vector<double> te::map::RasterContrast::m_min
private

Definition at line 116 of file RasterContrast.h.

Referenced by getValues(), RasterContrast(), setValues(), and ~RasterContrast().

std::size_t te::map::RasterContrast::m_nBands
private

Definition at line 111 of file RasterContrast.h.

Referenced by getNBands(), RasterContrast(), and setValues().

std::vector<double> te::map::RasterContrast::m_offset1
private

Definition at line 114 of file RasterContrast.h.

Referenced by getValues(), RasterContrast(), setValues(), and ~RasterContrast().

std::vector<double> te::map::RasterContrast::m_offset2
private

Definition at line 115 of file RasterContrast.h.

Referenced by getValues(), RasterContrast(), setValues(), and ~RasterContrast().

te::map::RasterTransform::ContrastType te::map::RasterContrast::m_type
private

The contrast type.

Definition at line 109 of file RasterContrast.h.

Referenced by getType().


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