te::map::RasterTransform Class Reference

A Raster Transform is a class that defines functions to transform a styled raster. More...

#include <RasterTransform.h>

Public Types

typedef std::map< RasterThreshold, te::color::RGBAColorCategorizedMap
 
enum  ContrastType { LINEAR_CONTRAST, SQUARE_CONTRAST, SQUARE_ROOT_CONTRAST, LOG_CONTRAST }
 
typedef std::map< RasterThreshold, te::color::ColorBarInterpolatedMap
 
typedef std::pair< double, double > RasterThreshold
 
enum  RasterTransfFunctions {
  NO_TRANSF =0, MONO2THREE_TRANSF =1, EXTRACT2RGB_TRANSF =2, RED2THREE_TRANSF =3,
  GREEN2THREE_TRANSF =4, BLUE2THREE_TRANSF =5, CATEGORIZE_TRANSF =6, INTERPOLATE_TRANSF =7,
  RECODE_TRANSF = 8, BAND2BAND_TRANSF =9, EXTRACT2RGBA_TRANSF, CONTRAST_TRANSF
}
 
typedef std::map< int, te::color::RGBAColorRecodedMap
 
typedef te::color::RGBAColor(RasterTransform::* RGBAFunction) (double, double)
 
enum  RGBChannels { RED_CHANNEL =0, GREEN_CHANNEL =1, BLUE_CHANNEL =2, ALPHA_CHANNEL =3 }
 The three channels of a display. More...
 
typedef void(RasterTransform::* TransformFunction) (double, double, double, double)
 

Public Member Functions

void apply (double icol, double ilin, double ocol, double olin)
 
te::color::RGBAColor apply (double icol, double ilin)
 
void clearRGBMap ()
 
CategorizedMapgetCategorizedMap ()
 
short getDestBand ()
 
double getGain () const
 Gets the gain. More...
 
double getGammaB ()
 Gets the constrast value for blue band. More...
 
double getGammaG ()
 Gets the constrast value for green band. More...
 
double getGammaM ()
 Gets the constrast value for gray band. More...
 
double getGammaR ()
 Gets the constrast value for red band. More...
 
te::rst::RastergetInputRaster ()
 Gets the input raster. More...
 
InterpolatedMapgetInterpolatedMap ()
 
double getOffset ()
 Gets the offset. More...
 
te::rst::RastergetOutputRaster ()
 Gets the output raster. More...
 
RecodedMapgetRecodedMap ()
 
std::map< RGBChannels, short > & getRGBMap ()
 
short getSrcBand ()
 
RasterTransfFunctions getTransfFunction ()
 
double getTransparency ()
 Gets the transparency. More...
 
 RasterTransform (te::rst::Raster *input, te::rst::Raster *output)
 Constructor. More...
 
void setBChannelMapping (short bIn, RGBChannels bOut)
 
void setCategorizedMap (CategorizedMap map)
 
void setContrastGainsAndOffsets (const std::vector< double > &contrastGains, const std::vector< double > &contrastOffsets1, const std::vector< double > &contrastOffsets2)
 Set gain and offset parameters to be used by the CONTRAST_TRANSF method. More...
 
void setContrastType (const ContrastType &newType)
 Set the current contrast type. More...
 
void setDestBand (short n)
 
void setGain (double value)
 Sets the gain. More...
 
void setGammaB (double value)
 Sets the constrast value for blue band. More...
 
void setGammaG (double value)
 Sets the constrast value for green band. More...
 
void setGammaM (double value)
 Sets the constrast value for gray band. More...
 
void setGammaR (double value)
 Sets the constrast value for red band. More...
 
void setInterpolatedMap (InterpolatedMap map)
 
void setLinearTransfParameters (double vmin, double vmax, double rmin, double rmax)
 Set parameters of linear transformation. More...
 
void setLinearTransfParameters (double vmin, double vmax, double rmin, double rmax, int band)
 Set parameters of linear transformation for each band. More...
 
void setOffset (double value)
 Sets the offset 1. More...
 
void setRecodedMap (RecodedMap map)
 
void setRGBAFunction (RasterTransform::RGBAFunction transfFuncPtr)
 
void setRGBMap (std::map< RGBChannels, short > &rgbMap)
 Sets the rgb map values. More...
 
void setSrcBand (short n)
 
void setTransfFunction (RasterTransfFunctions func)
 
void setTransfFunction (RasterTransform::TransformFunction transfFuncPtr)
 
void setTransparency (double value)
 Sets the transparency. More...
 
 ~RasterTransform ()
 Destructor. More...
 

Protected Types

typedef void(RasterTransform::* ContrastTransformFunction) (const unsigned int &, const double &, double &) const
 Type definition for the internal contrast transform function. More...
 

Protected Member Functions

void applyLinearContrast (const unsigned int &bandIdx, const double &inputValue, double &outputValue) const
 
void applyLogContrast (const unsigned int &bandIdx, const double &inputValue, double &outputValue) const
 
void applySquareContrast (const unsigned int &bandIdx, const double &inputValue, double &outputValue) const
 
void applySquareRootContrast (const unsigned int &bandIdx, const double &inputValue, double &outputValue) const
 
double checkAlphaValue (double icol, double ilin)
 Function used to check the alpha value. More...
 
bool checkNoValue (double &value, int band) const
 Function used to check if value is or not a valid value. More...
 
void fixValue (double &value, short &band) const
 
te::color::RGBAColor getBlue2ThreeBand (double icol, double ilin)
 
te::color::RGBAColor getCategorize (double icol, double ilin)
 
te::color::RGBAColor getCategorizedColor (double value)
 
te::color::RGBAColor getExtractRGB (double icol, double ilin)
 
te::color::RGBAColor getExtractRGBA (double icol, double ilin)
 
te::color::RGBAColor getGreen2ThreeBand (double icol, double ilin)
 
te::color::RGBAColor getInterpolate (double icol, double ilin)
 
te::color::RGBAColor getInterpolatedColor (double value)
 
te::color::RGBAColor getMono2ThreeBand (double icol, double ilin)
 
te::color::RGBAColor getRecode (double icol, double ilin)
 
te::color::RGBAColor getRecodedColor (double value)
 
te::color::RGBAColor getRed2ThreeBand (double icol, double ilin)
 
void setBand2Band (double icol, double ilin, double ocol, double olin)
 
void setBlue2ThreeBand (double icol, double ilin, double ocol, double olin)
 
void setCategorize (double icol, double ilin, double ocol, double olin)
 
void setContrastFuncPtr (const RasterTransform::ContrastType contrastType)
 Configures the contrast function pointer. More...
 
void setExtractRGB (double icol, double ilin, double ocol, double olin)
 
void setExtractRGBA (double icol, double ilin, double ocol, double olin)
 
void setGreen2ThreeBand (double icol, double ilin, double ocol, double olin)
 
void setInterpolate (double icol, double ilin, double ocol, double olin)
 
void setMono2ThreeBand (double icol, double ilin, double ocol, double olin)
 
void setRecode (double icol, double ilin, double ocol, double olin)
 
void setRed2ThreeBand (double icol, double ilin, double ocol, double olin)
 

Private Attributes

CategorizedMap m_categorizeMap
 Attribute to define the categorized transformation. More...
 
std::vector< double > m_contrastGains
 A vector of gains for each band used by the CONTRAST method. More...
 
std::vector< double > m_contrastOffsets1
 A vector of offsets1 for each band used by the CONTRAST method. More...
 
std::vector< double > m_contrastOffsets2
 A vector of offsets2 for each band used by the CONTRAST method. More...
 
ContrastTransformFunction m_contrastTransfFuncPtr
 Function used in contrast transformation operation. More...
 
ContrastType m_currentContrastType
 Current contrast type. More...
 
std::vector< double > m_gamma
 A vector of gamma gains for each band. More...
 
InterpolatedMap m_interpolateMap
 Attribute to define the interpolated transformation. More...
 
short m_monoBand
 Value for the gray band. More...
 
short m_monoBandOut
 Value for output gray band channel. More...
 
te::rst::Rasterm_rasterIn
 Pointer to a input raster. More...
 
te::rst::Rasterm_rasterOut
 Pointer to a output raster. More...
 
RecodedMap m_recodeMap
 Attribute to define the recoded transformation. More...
 
RGBAFunction m_RGBAFuncPtr
 Function used in transformation operation. More...
 
std::map< RGBChannels, short > m_rgbMap
 Map used to set the band order. More...
 
std::vector< double > m_rstMaxValue
 Max value from input raster. More...
 
std::vector< double > m_rstMinValue
 Min value from input raster. More...
 
TransformFunction m_transfFuncPtr
 Function used in transformation operation. More...
 
double m_transp
 Transparency factor. More...
 

Detailed Description

A Raster Transform is a class that defines functions to transform a styled raster.

See also

Definition at line 64 of file RasterTransform.h.

Member Typedef Documentation

typedef void(RasterTransform::* te::map::RasterTransform::ContrastTransformFunction) (const unsigned int &, const double &, double &) const
protected

Type definition for the internal contrast transform function.

Note
void ContrastTransformFunction( bandNumber, inputValue, outputValue )

Definition at line 279 of file RasterTransform.h.

typedef std::pair<double, double> te::map::RasterTransform::RasterThreshold

Definition at line 71 of file RasterTransform.h.

Definition at line 75 of file RasterTransform.h.

typedef te::color::RGBAColor(RasterTransform::* te::map::RasterTransform::RGBAFunction) (double, double)

Definition at line 69 of file RasterTransform.h.

typedef void(RasterTransform::* te::map::RasterTransform::TransformFunction) (double, double, double, double)

Definition at line 68 of file RasterTransform.h.

Member Enumeration Documentation

Enumerator
LINEAR_CONTRAST 

The histogram range will be changed to the supplied min/max range ( linear function ).

SQUARE_CONTRAST 

The contrasted image will be created by using a square function.

SQUARE_ROOT_CONTRAST 

The contrasted image will be created by using a square root function.

LOG_CONTRAST 

The contrasted image will be created by using a log function.

Definition at line 104 of file RasterTransform.h.

Enumerator
NO_TRANSF 
MONO2THREE_TRANSF 
EXTRACT2RGB_TRANSF 
RED2THREE_TRANSF 
GREEN2THREE_TRANSF 
BLUE2THREE_TRANSF 
CATEGORIZE_TRANSF 
INTERPOLATE_TRANSF 
RECODE_TRANSF 
BAND2BAND_TRANSF 
EXTRACT2RGBA_TRANSF 
CONTRAST_TRANSF 

Apply a contrast method ( ContrastType ) to the given raster - Use the methods getGain, setOffset and setOffset2 to setup contrast parameters.

Definition at line 87 of file RasterTransform.h.

The three channels of a display.

Enumerator
RED_CHANNEL 
GREEN_CHANNEL 
BLUE_CHANNEL 
ALPHA_CHANNEL 

Definition at line 78 of file RasterTransform.h.

Constructor & Destructor Documentation

te::map::RasterTransform::RasterTransform ( te::rst::Raster input,
te::rst::Raster output 
)

Constructor.

Parameters
input
output
Note

Definition at line 40 of file RasterTransform.cpp.

References te::rst::Raster::getNumberOfBands(), m_contrastGains, m_contrastOffsets1, m_contrastOffsets2, m_gamma, m_rstMaxValue, and m_rstMinValue.

te::map::RasterTransform::~RasterTransform ( )

Destructor.

Definition at line 60 of file RasterTransform.cpp.

References m_categorizeMap, m_interpolateMap, m_recodeMap, and m_rgbMap.

Member Function Documentation

void te::map::RasterTransform::apply ( double  icol,
double  ilin,
double  ocol,
double  olin 
)
inline

Applies the selected transformation method

Definition at line 259 of file RasterTransform.h.

Referenced by te::map::DrawRaster(), te::qt::widgets::ReadPixelTool::mouseReleaseEvent(), and ReadPixelTool::mouseReleaseEvent().

te::color::RGBAColor te::map::RasterTransform::apply ( double  icol,
double  ilin 
)
inline

Definition at line 261 of file RasterTransform.h.

void te::map::RasterTransform::applyLinearContrast ( const unsigned int bandIdx,
const double &  inputValue,
double &  outputValue 
) const
inlineprotected

This transformation aplies a linear contrast

Definition at line 345 of file RasterTransform.h.

Referenced by setContrastFuncPtr().

void te::map::RasterTransform::applyLogContrast ( const unsigned int bandIdx,
const double &  inputValue,
double &  outputValue 
) const
inlineprotected

This transformation aplies a log contrast

Definition at line 367 of file RasterTransform.h.

Referenced by setContrastFuncPtr().

void te::map::RasterTransform::applySquareContrast ( const unsigned int bandIdx,
const double &  inputValue,
double &  outputValue 
) const
inlineprotected

This transformation aplies a square contrast

Definition at line 353 of file RasterTransform.h.

Referenced by setContrastFuncPtr().

void te::map::RasterTransform::applySquareRootContrast ( const unsigned int bandIdx,
const double &  inputValue,
double &  outputValue 
) const
inlineprotected

This transformation aplies a square root contrast

Definition at line 360 of file RasterTransform.h.

Referenced by setContrastFuncPtr().

double te::map::RasterTransform::checkAlphaValue ( double  icol,
double  ilin 
)
protected

Function used to check the alpha value.

Returns
Return the alpha value.

Definition at line 831 of file RasterTransform.cpp.

References ALPHA_CHANNEL, te::rst::Raster::getValue(), m_rasterIn, m_rgbMap, and m_transp.

Referenced by getBlue2ThreeBand(), getExtractRGB(), getGreen2ThreeBand(), getMono2ThreeBand(), and getRed2ThreeBand().

bool te::map::RasterTransform::checkNoValue ( double &  value,
int  band 
) const
inlineprotected

Function used to check if value is or not a valid value.

Returns
True if the value is EQUAL to NoValue and false in other case.

Definition at line 385 of file RasterTransform.h.

Referenced by getBlue2ThreeBand(), getCategorize(), getExtractRGB(), getExtractRGBA(), getGreen2ThreeBand(), getInterpolate(), getMono2ThreeBand(), getRecode(), getRed2ThreeBand(), setBand2Band(), setBlue2ThreeBand(), setExtractRGB(), setExtractRGBA(), setGreen2ThreeBand(), setMono2ThreeBand(), and setRed2ThreeBand().

void te::map::RasterTransform::clearRGBMap ( )
inline

Clears current mapping from bands to channel

Definition at line 188 of file RasterTransform.h.

Referenced by te::map::RasterTransformConfigurer::getChannelSelection().

void te::map::RasterTransform::fixValue ( double &  value,
short &  band 
) const
inlineprotected
te::color::RGBAColor te::map::RasterTransform::getBlue2ThreeBand ( double  icol,
double  ilin 
)
protected

This transformation repeats the value of the first band in input three bands of the output

Definition at line 703 of file RasterTransform.cpp.

References BLUE_CHANNEL, checkAlphaValue(), checkNoValue(), fixValue(), te::rst::Raster::getValue(), m_contrastTransfFuncPtr, m_gamma, m_rasterIn, and m_rgbMap.

Referenced by getTransfFunction(), and setTransfFunction().

te::color::RGBAColor te::map::RasterTransform::getCategorize ( double  icol,
double  ilin 
)
protected

This transformation get the value of the selected band in input and get the categorized value

Definition at line 742 of file RasterTransform.cpp.

References checkNoValue(), getCategorizedColor(), te::rst::Raster::getValue(), m_monoBand, and m_rasterIn.

Referenced by getTransfFunction(), and setTransfFunction().

te::color::RGBAColor te::map::RasterTransform::getCategorizedColor ( double  value)
protected

Function used to get the categorized color given a pixel value

Definition at line 879 of file RasterTransform.cpp.

References m_categorizeMap.

Referenced by getCategorize(), and setCategorize().

CategorizedMap& te::map::RasterTransform::getCategorizedMap ( )
inline

Gets the categorize map information

Definition at line 209 of file RasterTransform.h.

short te::map::RasterTransform::getDestBand ( )
inline

Gets the destination of the mono band

Definition at line 203 of file RasterTransform.h.

te::color::RGBAColor te::map::RasterTransform::getExtractRGB ( double  icol,
double  ilin 
)
protected

This transformation is used to define a particular mapping from input bands to RGB channels

Definition at line 485 of file RasterTransform.cpp.

References BLUE_CHANNEL, checkAlphaValue(), checkNoValue(), fixValue(), te::rst::Raster::getValue(), GREEN_CHANNEL, m_contrastTransfFuncPtr, m_gamma, m_rasterIn, m_rgbMap, and RED_CHANNEL.

Referenced by getTransfFunction(), and setTransfFunction().

te::color::RGBAColor te::map::RasterTransform::getExtractRGBA ( double  icol,
double  ilin 
)
protected

This transformation is used to define a particular mapping from input bands to RGBA channels

Definition at line 557 of file RasterTransform.cpp.

References ALPHA_CHANNEL, BLUE_CHANNEL, checkNoValue(), fixValue(), te::rst::Raster::getValue(), GREEN_CHANNEL, m_contrastTransfFuncPtr, m_gamma, m_rasterIn, m_rgbMap, m_transp, and RED_CHANNEL.

Referenced by setTransfFunction().

double te::map::RasterTransform::getGain ( ) const

Gets the gain.

Definition at line 73 of file RasterTransform.cpp.

References m_contrastGains.

Referenced by te::map::RasterTransformConfigurer::getGeneralProperties().

double te::map::RasterTransform::getGammaB ( )

Gets the constrast value for blue band.

Definition at line 127 of file RasterTransform.cpp.

References BLUE_CHANNEL, and m_gamma.

double te::map::RasterTransform::getGammaG ( )

Gets the constrast value for green band.

Definition at line 115 of file RasterTransform.cpp.

References GREEN_CHANNEL, and m_gamma.

double te::map::RasterTransform::getGammaM ( )

Gets the constrast value for gray band.

Definition at line 139 of file RasterTransform.cpp.

References m_gamma, and m_monoBand.

double te::map::RasterTransform::getGammaR ( )

Gets the constrast value for red band.

Definition at line 103 of file RasterTransform.cpp.

References m_gamma, and RED_CHANNEL.

te::color::RGBAColor te::map::RasterTransform::getGreen2ThreeBand ( double  icol,
double  ilin 
)
protected

This transformation repeats the value of the first band in input three bands of the output

Definition at line 659 of file RasterTransform.cpp.

References checkAlphaValue(), checkNoValue(), fixValue(), te::rst::Raster::getValue(), GREEN_CHANNEL, m_contrastTransfFuncPtr, m_gamma, m_rasterIn, and m_rgbMap.

Referenced by getTransfFunction(), and setTransfFunction().

te::rst::Raster* te::map::RasterTransform::getInputRaster ( )
inline

Gets the input raster.

Definition at line 128 of file RasterTransform.h.

Referenced by te::map::RasterTransformConfigurer::getChannelSelection().

te::color::RGBAColor te::map::RasterTransform::getInterpolate ( double  icol,
double  ilin 
)
protected

This transformation get the value of the selected band in input and get the interpolated value

Definition at line 770 of file RasterTransform.cpp.

References checkNoValue(), getInterpolatedColor(), te::rst::Raster::getValue(), m_monoBand, and m_rasterIn.

Referenced by getTransfFunction(), and setTransfFunction().

te::color::RGBAColor te::map::RasterTransform::getInterpolatedColor ( double  value)
protected

Function used to get the interpolated color given a pixel value

Definition at line 849 of file RasterTransform.cpp.

References m_interpolateMap.

Referenced by getInterpolate(), and setInterpolate().

InterpolatedMap& te::map::RasterTransform::getInterpolatedMap ( )
inline

Gets the categorize map information

Definition at line 215 of file RasterTransform.h.

te::color::RGBAColor te::map::RasterTransform::getMono2ThreeBand ( double  icol,
double  ilin 
)
protected

This transformation repeats the value of the first band in input three bands of the output

Definition at line 423 of file RasterTransform.cpp.

References checkAlphaValue(), checkNoValue(), fixValue(), te::rst::Raster::getValue(), m_contrastTransfFuncPtr, m_gamma, m_monoBand, and m_rasterIn.

Referenced by getTransfFunction(), and setTransfFunction().

double te::map::RasterTransform::getOffset ( )

Gets the offset.

Definition at line 91 of file RasterTransform.cpp.

References m_contrastOffsets1.

Referenced by te::map::RasterTransformConfigurer::getGeneralProperties().

te::rst::Raster* te::map::RasterTransform::getOutputRaster ( )
inline

Gets the output raster.

Definition at line 131 of file RasterTransform.h.

Referenced by te::map::RasterTransformConfigurer::getChannelSelection().

te::color::RGBAColor te::map::RasterTransform::getRecode ( double  icol,
double  ilin 
)
protected

This transformation get the value of the selected band in input and get the recoded value

Definition at line 798 of file RasterTransform.cpp.

References checkNoValue(), getRecodedColor(), te::rst::Raster::getValue(), m_monoBand, and m_rasterIn.

Referenced by getTransfFunction(), and setTransfFunction().

te::color::RGBAColor te::map::RasterTransform::getRecodedColor ( double  value)
protected

Function used to get the recoded color given a pixel value

Definition at line 898 of file RasterTransform.cpp.

References m_recodeMap.

Referenced by getRecode(), and setRecode().

RecodedMap& te::map::RasterTransform::getRecodedMap ( )
inline

Gets the recode map information

Definition at line 221 of file RasterTransform.h.

References band.

te::color::RGBAColor te::map::RasterTransform::getRed2ThreeBand ( double  icol,
double  ilin 
)
protected

This transformation repeats the value of the first band in input three bands of the output

Definition at line 615 of file RasterTransform.cpp.

References checkAlphaValue(), checkNoValue(), fixValue(), te::rst::Raster::getValue(), m_contrastTransfFuncPtr, m_gamma, m_rasterIn, m_rgbMap, and RED_CHANNEL.

Referenced by getTransfFunction(), and setTransfFunction().

std::map<RGBChannels, short>& te::map::RasterTransform::getRGBMap ( )
inline

Returns the mapping from a particular input band to a particular output channel

Definition at line 191 of file RasterTransform.h.

Referenced by te::qt::widgets::ReadPixelTool::mouseReleaseEvent(), and ReadPixelTool::mouseReleaseEvent().

short te::map::RasterTransform::getSrcBand ( )
inline

Gets the mono band to be transformed

Definition at line 197 of file RasterTransform.h.

Referenced by te::map::RasterTransformConfigurer::getChannelSelection().

double te::map::RasterTransform::getTransparency ( )
inline

Gets the transparency.

Definition at line 137 of file RasterTransform.h.

void te::map::RasterTransform::setBand2Band ( double  icol,
double  ilin,
double  ocol,
double  olin 
)
protected

This transformation repeats the value of the n band in input to b band in output

Definition at line 810 of file RasterTransform.cpp.

References band, checkNoValue(), fixValue(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getValue(), m_contrastTransfFuncPtr, m_gamma, m_rasterIn, m_rasterOut, and te::rst::Raster::setValue().

Referenced by getTransfFunction(), and setTransfFunction().

void te::map::RasterTransform::setBChannelMapping ( short  bIn,
RGBChannels  bOut 
)
inline
void te::map::RasterTransform::setBlue2ThreeBand ( double  icol,
double  ilin,
double  ocol,
double  olin 
)
protected

This transformation repeats the value of the first band in input three bands of the output

Definition at line 682 of file RasterTransform.cpp.

References BLUE_CHANNEL, checkNoValue(), fixValue(), te::rst::Raster::getValue(), m_contrastTransfFuncPtr, m_gamma, m_rasterIn, m_rasterOut, m_rgbMap, and te::rst::Raster::setValues().

Referenced by getTransfFunction(), and setTransfFunction().

void te::map::RasterTransform::setCategorize ( double  icol,
double  ilin,
double  ocol,
double  olin 
)
protected

This transformation get the value of the selected band in input and set the categorized value in output bands of the output

Definition at line 726 of file RasterTransform.cpp.

References te::color::RGBAColor::getBlue(), getCategorizedColor(), te::color::RGBAColor::getGreen(), te::color::RGBAColor::getRed(), te::rst::Raster::getValue(), m_monoBand, m_rasterIn, m_rasterOut, and te::rst::Raster::setValues().

Referenced by getTransfFunction(), and setTransfFunction().

void te::map::RasterTransform::setCategorizedMap ( CategorizedMap  map)
inline

Sets the categorize map information

Definition at line 206 of file RasterTransform.h.

Referenced by te::map::RasterTransformConfigurer::getCategorizedMap().

void te::map::RasterTransform::setContrastFuncPtr ( const RasterTransform::ContrastType  contrastType)
protected

Configures the contrast function pointer.

Parameters
contrastTypeContrast type..

Definition at line 374 of file RasterTransform.cpp.

References applyLinearContrast(), applyLogContrast(), applySquareContrast(), applySquareRootContrast(), LINEAR_CONTRAST, LOG_CONTRAST, m_contrastTransfFuncPtr, SQUARE_CONTRAST, and SQUARE_ROOT_CONTRAST.

Referenced by setContrastType().

void te::map::RasterTransform::setContrastGainsAndOffsets ( const std::vector< double > &  contrastGains,
const std::vector< double > &  contrastOffsets1,
const std::vector< double > &  contrastOffsets2 
)

Set gain and offset parameters to be used by the CONTRAST_TRANSF method.

Parameters
contrastGainsA vector of gains for each raster band.
contrastOffsets1A vector of offsets1 for each raster band.
contrastOffsets2A vector of offsets2 for each raster band.

Definition at line 353 of file RasterTransform.cpp.

References te::rst::Raster::getNumberOfBands(), m_contrastGains, m_contrastOffsets1, m_contrastOffsets2, m_rasterIn, and TE_TR.

Referenced by te::map::DrawRaster().

void te::map::RasterTransform::setContrastType ( const ContrastType newType)

Set the current contrast type.

Parameters
newTypeNew contrast type.

Definition at line 85 of file RasterTransform.cpp.

References m_currentContrastType, and setContrastFuncPtr().

Referenced by te::map::DrawRaster().

void te::map::RasterTransform::setDestBand ( short  n)
inline

Sets the destination of the mono band

Definition at line 200 of file RasterTransform.h.

void te::map::RasterTransform::setExtractRGB ( double  icol,
double  ilin,
double  ocol,
double  olin 
)
protected

This transformation is used to define a particular mapping from input bands to RGB channels

Definition at line 452 of file RasterTransform.cpp.

References BLUE_CHANNEL, checkNoValue(), fixValue(), te::rst::Raster::getValue(), GREEN_CHANNEL, m_contrastTransfFuncPtr, m_gamma, m_rasterIn, m_rasterOut, m_rgbMap, RED_CHANNEL, and te::rst::Raster::setValues().

Referenced by getTransfFunction(), and setTransfFunction().

void te::map::RasterTransform::setExtractRGBA ( double  icol,
double  ilin,
double  ocol,
double  olin 
)
protected

This transformation is used to define a particular mapping from input bands to RGBA channels

Definition at line 519 of file RasterTransform.cpp.

References ALPHA_CHANNEL, BLUE_CHANNEL, checkNoValue(), fixValue(), te::rst::Raster::getValue(), GREEN_CHANNEL, m_contrastTransfFuncPtr, m_gamma, m_rasterIn, m_rasterOut, m_rgbMap, RED_CHANNEL, and te::rst::Raster::setValues().

Referenced by setTransfFunction().

void te::map::RasterTransform::setGain ( double  value)

Sets the gain.

Definition at line 68 of file RasterTransform.cpp.

References m_contrastGains.

Referenced by te::map::RasterTransformConfigurer::getGeneralProperties().

void te::map::RasterTransform::setGammaB ( double  value)

Sets the constrast value for blue band.

Definition at line 121 of file RasterTransform.cpp.

References BLUE_CHANNEL, and m_gamma.

Referenced by te::map::RasterTransformConfigurer::getBlueChannelProperties().

void te::map::RasterTransform::setGammaG ( double  value)

Sets the constrast value for green band.

Definition at line 109 of file RasterTransform.cpp.

References GREEN_CHANNEL, and m_gamma.

Referenced by te::map::RasterTransformConfigurer::getGreenChannelProperties().

void te::map::RasterTransform::setGammaM ( double  value)

Sets the constrast value for gray band.

Definition at line 133 of file RasterTransform.cpp.

References m_gamma, and m_monoBand.

Referenced by te::map::RasterTransformConfigurer::getGrayChannelProperties().

void te::map::RasterTransform::setGammaR ( double  value)

Sets the constrast value for red band.

Definition at line 97 of file RasterTransform.cpp.

References m_gamma, and RED_CHANNEL.

Referenced by te::map::RasterTransformConfigurer::getRedChannelProperties().

void te::map::RasterTransform::setGreen2ThreeBand ( double  icol,
double  ilin,
double  ocol,
double  olin 
)
protected

This transformation repeats the value of the first band in input three bands of the output

Definition at line 638 of file RasterTransform.cpp.

References checkNoValue(), fixValue(), te::rst::Raster::getValue(), GREEN_CHANNEL, m_contrastTransfFuncPtr, m_gamma, m_rasterIn, m_rasterOut, m_rgbMap, and te::rst::Raster::setValues().

Referenced by getTransfFunction(), and setTransfFunction().

void te::map::RasterTransform::setInterpolate ( double  icol,
double  ilin,
double  ocol,
double  olin 
)
protected

This transformation get the value of the selected band in input and set the interpolated value in output bands of the output

Definition at line 754 of file RasterTransform.cpp.

References te::color::RGBAColor::getBlue(), te::color::RGBAColor::getGreen(), getInterpolatedColor(), te::color::RGBAColor::getRed(), te::rst::Raster::getValue(), m_monoBand, m_rasterIn, m_rasterOut, and te::rst::Raster::setValues().

Referenced by getTransfFunction(), and setTransfFunction().

void te::map::RasterTransform::setInterpolatedMap ( InterpolatedMap  map)
inline

Sets the interpolate map information

Definition at line 212 of file RasterTransform.h.

Referenced by te::map::RasterTransformConfigurer::getInterpolatedMap().

void te::map::RasterTransform::setLinearTransfParameters ( double  vmin,
double  vmax,
double  rmin,
double  rmax 
)

Set parameters of linear transformation.

Parameters
vminsmallest input value
vmaxlargest input value
rminsmallest value of the output range
rmaxlargest value of the output range

Definition at line 172 of file RasterTransform.cpp.

References m_contrastGains, m_contrastOffsets1, m_contrastOffsets2, m_rstMaxValue, and m_rstMinValue.

Referenced by te::map::DrawRaster(), te::qt::widgets::ReadPixelTool::mouseReleaseEvent(), and ReadPixelTool::mouseReleaseEvent().

void te::map::RasterTransform::setLinearTransfParameters ( double  vmin,
double  vmax,
double  rmin,
double  rmax,
int  band 
)

Set parameters of linear transformation for each band.

Parameters
vminsmallest input value
vmaxlargest input value
rminsmallest value of the output range
rmaxlargest value of the output range
bandband id

Definition at line 205 of file RasterTransform.cpp.

References band, m_contrastGains, m_contrastOffsets1, m_contrastOffsets2, m_rstMaxValue, and m_rstMinValue.

void te::map::RasterTransform::setMono2ThreeBand ( double  icol,
double  ilin,
double  ocol,
double  olin 
)
protected

This transformation repeats the value of the first band in input three bands of the output

Definition at line 402 of file RasterTransform.cpp.

References checkNoValue(), fixValue(), te::rst::Raster::getValue(), m_contrastTransfFuncPtr, m_gamma, m_monoBand, m_rasterIn, m_rasterOut, and te::rst::Raster::setValues().

Referenced by getTransfFunction(), and setTransfFunction().

void te::map::RasterTransform::setOffset ( double  value)

Sets the offset 1.

Definition at line 79 of file RasterTransform.cpp.

References m_contrastOffsets1, and m_contrastOffsets2.

Referenced by te::map::RasterTransformConfigurer::getGeneralProperties().

void te::map::RasterTransform::setRecode ( double  icol,
double  ilin,
double  ocol,
double  olin 
)
protected

This transformation get the value of the selected band in input and set the recoded value in output bands of the output

Definition at line 782 of file RasterTransform.cpp.

References te::color::RGBAColor::getBlue(), te::color::RGBAColor::getGreen(), getRecodedColor(), te::color::RGBAColor::getRed(), te::rst::Raster::getValue(), m_monoBand, m_rasterIn, m_rasterOut, and te::rst::Raster::setValues().

Referenced by getTransfFunction(), and setTransfFunction().

void te::map::RasterTransform::setRecodedMap ( RecodedMap  map)
inline
void te::map::RasterTransform::setRed2ThreeBand ( double  icol,
double  ilin,
double  ocol,
double  olin 
)
protected

This transformation repeats the value of the first band in input three bands of the output

Definition at line 594 of file RasterTransform.cpp.

References checkNoValue(), fixValue(), te::rst::Raster::getValue(), m_contrastTransfFuncPtr, m_gamma, m_rasterIn, m_rasterOut, m_rgbMap, RED_CHANNEL, and te::rst::Raster::setValues().

Referenced by getTransfFunction(), and setTransfFunction().

void te::map::RasterTransform::setRGBAFunction ( RasterTransform::RGBAFunction  transfFuncPtr)
inline

Sets the transformation method to be used

Definition at line 256 of file RasterTransform.h.

void te::map::RasterTransform::setRGBMap ( std::map< RGBChannels, short > &  rgbMap)

Sets the rgb map values.

Definition at line 145 of file RasterTransform.cpp.

References ALPHA_CHANNEL, BLUE_CHANNEL, GREEN_CHANNEL, m_rgbMap, and RED_CHANNEL.

void te::map::RasterTransform::setSrcBand ( short  n)
inline

Sets the mono band to be transformed

Definition at line 194 of file RasterTransform.h.

Referenced by te::map::RasterTransformConfigurer::getGrayChannelProperties().

void te::map::RasterTransform::setTransfFunction ( RasterTransform::TransformFunction  transfFuncPtr)
inline

Sets the transformation method to be used

Definition at line 253 of file RasterTransform.h.

void te::map::RasterTransform::setTransparency ( double  value)
inline

Sets the transparency.

Definition at line 134 of file RasterTransform.h.

Referenced by te::map::RasterTransformConfigurer::getGeneralProperties().

Member Data Documentation

CategorizedMap te::map::RasterTransform::m_categorizeMap
private

Attribute to define the categorized transformation.

Definition at line 425 of file RasterTransform.h.

Referenced by getCategorizedColor(), and ~RasterTransform().

std::vector< double > te::map::RasterTransform::m_contrastGains
private

A vector of gains for each band used by the CONTRAST method.

Definition at line 430 of file RasterTransform.h.

Referenced by getGain(), RasterTransform(), setContrastGainsAndOffsets(), setGain(), and setLinearTransfParameters().

std::vector< double > te::map::RasterTransform::m_contrastOffsets1
private

A vector of offsets1 for each band used by the CONTRAST method.

Definition at line 431 of file RasterTransform.h.

Referenced by getOffset(), RasterTransform(), setContrastGainsAndOffsets(), setLinearTransfParameters(), and setOffset().

std::vector< double > te::map::RasterTransform::m_contrastOffsets2
private

A vector of offsets2 for each band used by the CONTRAST method.

Definition at line 432 of file RasterTransform.h.

Referenced by RasterTransform(), setContrastGainsAndOffsets(), setLinearTransfParameters(), and setOffset().

ContrastType te::map::RasterTransform::m_currentContrastType
private

Current contrast type.

Definition at line 411 of file RasterTransform.h.

Referenced by setContrastType().

InterpolatedMap te::map::RasterTransform::m_interpolateMap
private

Attribute to define the interpolated transformation.

Definition at line 426 of file RasterTransform.h.

Referenced by getInterpolatedColor(), and ~RasterTransform().

short te::map::RasterTransform::m_monoBand
private
short te::map::RasterTransform::m_monoBandOut
private

Value for output gray band channel.

Definition at line 420 of file RasterTransform.h.

te::rst::Raster* te::map::RasterTransform::m_rasterOut
private
RecodedMap te::map::RasterTransform::m_recodeMap
private

Attribute to define the recoded transformation.

Definition at line 427 of file RasterTransform.h.

Referenced by getRecodedColor(), and ~RasterTransform().

RGBAFunction te::map::RasterTransform::m_RGBAFuncPtr
private

Function used in transformation operation.

Definition at line 423 of file RasterTransform.h.

Referenced by getTransfFunction(), and setTransfFunction().

std::vector< double > te::map::RasterTransform::m_rstMaxValue
private

Max value from input raster.

Definition at line 416 of file RasterTransform.h.

Referenced by RasterTransform(), and setLinearTransfParameters().

std::vector< double > te::map::RasterTransform::m_rstMinValue
private

Min value from input raster.

Definition at line 415 of file RasterTransform.h.

Referenced by RasterTransform(), and setLinearTransfParameters().

TransformFunction te::map::RasterTransform::m_transfFuncPtr
private

Function used in transformation operation.

Definition at line 422 of file RasterTransform.h.

Referenced by getTransfFunction(), and setTransfFunction().

double te::map::RasterTransform::m_transp
private

Transparency factor.

Definition at line 414 of file RasterTransform.h.

Referenced by checkAlphaValue(), and getExtractRGBA().


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