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::RGBAColor > | CategorizedMap | 
| enum | ContrastType { LINEAR_CONTRAST, SQUARE_CONTRAST, SQUARE_ROOT_CONTRAST, LOG_CONTRAST } | 
| typedef std::map< RasterThreshold, te::color::ColorBar > | InterpolatedMap | 
| 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::RGBAColor > | RecodedMap | 
| 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 () | 
| CategorizedMap & | getCategorizedMap () | 
| 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::Raster * | getInputRaster () | 
| Gets the input raster.  More... | |
| InterpolatedMap & | getInterpolatedMap () | 
| double | getOffset () | 
| Gets the offset.  More... | |
| te::rst::Raster * | getOutputRaster () | 
| Gets the output raster.  More... | |
| RecodedMap & | getRecodedMap () | 
| 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::Raster * | m_rasterIn | 
| Pointer to a input raster.  More... | |
| te::rst::Raster * | m_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... | |
A Raster Transform is a class that defines functions to transform a styled raster.
Definition at line 64 of file RasterTransform.h.
| typedef std::map<RasterThreshold, te::color::RGBAColor> te::map::RasterTransform::CategorizedMap | 
Definition at line 73 of file RasterTransform.h.
      
  | 
  protected | 
Type definition for the internal contrast transform function.
Definition at line 279 of file RasterTransform.h.
| typedef std::map<RasterThreshold, te::color::ColorBar> te::map::RasterTransform::InterpolatedMap | 
Definition at line 74 of file RasterTransform.h.
| typedef std::pair<double, double> te::map::RasterTransform::RasterThreshold | 
Definition at line 71 of file RasterTransform.h.
| typedef std::map<int, te::color::RGBAColor> te::map::RasterTransform::RecodedMap | 
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.
Definition at line 104 of file RasterTransform.h.
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.
| te::map::RasterTransform::RasterTransform | ( | te::rst::Raster * | input, | 
| te::rst::Raster * | output | ||
| ) | 
Constructor.
| input | |
| output | 
| te::map::RasterTransform::~RasterTransform | ( | ) | 
Destructor.
      
  | 
  inline | 
Applies the selected transformation method
Definition at line 259 of file RasterTransform.h.
      
  | 
  inline | 
Definition at line 261 of file RasterTransform.h.
      
  | 
  inlineprotected | 
This transformation aplies a linear contrast
Definition at line 345 of file RasterTransform.h.
      
  | 
  inlineprotected | 
This transformation aplies a log contrast
Definition at line 367 of file RasterTransform.h.
      
  | 
  inlineprotected | 
This transformation aplies a square contrast
Definition at line 353 of file RasterTransform.h.
      
  | 
  inlineprotected | 
This transformation aplies a square root contrast
Definition at line 360 of file RasterTransform.h.
      
  | 
  protected | 
Function used to check the alpha value.
      
  | 
  inlineprotected | 
Function used to check if value is or not a valid value.
Definition at line 385 of file RasterTransform.h.
      
  | 
  inline | 
Clears current mapping from bands to channel
Definition at line 188 of file RasterTransform.h.
      
  | 
  inlineprotected | 
Function used to adjust the value in raster range
Definition at line 375 of file RasterTransform.h.
      
  | 
  protected | 
This transformation repeats the value of the first band in input three bands of the output
      
  | 
  protected | 
This transformation get the value of the selected band in input and get the categorized value
      
  | 
  protected | 
Function used to get the categorized color given a pixel value
      
  | 
  inline | 
Gets the categorize map information
Definition at line 209 of file RasterTransform.h.
      
  | 
  inline | 
Gets the destination of the mono band
Definition at line 203 of file RasterTransform.h.
      
  | 
  protected | 
This transformation is used to define a particular mapping from input bands to RGB channels
      
  | 
  protected | 
This transformation is used to define a particular mapping from input bands to RGBA channels
| double te::map::RasterTransform::getGain | ( | ) | const | 
Gets the gain.
| double te::map::RasterTransform::getGammaB | ( | ) | 
Gets the constrast value for blue band.
| double te::map::RasterTransform::getGammaG | ( | ) | 
Gets the constrast value for green band.
| double te::map::RasterTransform::getGammaM | ( | ) | 
Gets the constrast value for gray band.
| double te::map::RasterTransform::getGammaR | ( | ) | 
Gets the constrast value for red band.
      
  | 
  protected | 
This transformation repeats the value of the first band in input three bands of the output
      
  | 
  inline | 
Gets the input raster.
Definition at line 128 of file RasterTransform.h.
      
  | 
  protected | 
This transformation get the value of the selected band in input and get the interpolated value
      
  | 
  protected | 
Function used to get the interpolated color given a pixel value
      
  | 
  inline | 
Gets the categorize map information
Definition at line 215 of file RasterTransform.h.
      
  | 
  protected | 
This transformation repeats the value of the first band in input three bands of the output
| double te::map::RasterTransform::getOffset | ( | ) | 
Gets the offset.
      
  | 
  inline | 
Gets the output raster.
Definition at line 131 of file RasterTransform.h.
      
  | 
  protected | 
This transformation get the value of the selected band in input and get the recoded value
      
  | 
  protected | 
Function used to get the recoded color given a pixel value
      
  | 
  inline | 
Gets the recode map information
Definition at line 221 of file RasterTransform.h.
      
  | 
  protected | 
This transformation repeats the value of the first band in input three bands of the output
      
  | 
  inline | 
Returns the mapping from a particular input band to a particular output channel
Definition at line 191 of file RasterTransform.h.
      
  | 
  inline | 
Gets the mono band to be transformed
Definition at line 197 of file RasterTransform.h.
| RasterTransfFunctions te::map::RasterTransform::getTransfFunction | ( | ) | 
Returns the identifier of the transformation function currently set
      
  | 
  inline | 
Gets the transparency.
Definition at line 137 of file RasterTransform.h.
      
  | 
  protected | 
This transformation repeats the value of the n band in input to b band in output
      
  | 
  inline | 
Sets the mapping from a particular input band to a particular output channel
Definition at line 185 of file RasterTransform.h.
      
  | 
  protected | 
This transformation repeats the value of the first band in input three bands of the output
      
  | 
  protected | 
This transformation get the value of the selected band in input and set the categorized value in output bands of the output
      
  | 
  inline | 
Sets the categorize map information
Definition at line 206 of file RasterTransform.h.
      
  | 
  protected | 
Configures the contrast function pointer.
| contrastType | Contrast type.. | 
| 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.
| contrastGains | A vector of gains for each raster band. | 
| contrastOffsets1 | A vector of offsets1 for each raster band. | 
| contrastOffsets2 | A vector of offsets2 for each raster band. | 
| void te::map::RasterTransform::setContrastType | ( | const ContrastType & | newType | ) | 
Set the current contrast type.
| newType | New contrast type. | 
      
  | 
  inline | 
Sets the destination of the mono band
Definition at line 200 of file RasterTransform.h.
      
  | 
  protected | 
This transformation is used to define a particular mapping from input bands to RGB channels
      
  | 
  protected | 
This transformation is used to define a particular mapping from input bands to RGBA channels
| void te::map::RasterTransform::setGain | ( | double | value | ) | 
Sets the gain.
| void te::map::RasterTransform::setGammaB | ( | double | value | ) | 
Sets the constrast value for blue band.
| void te::map::RasterTransform::setGammaG | ( | double | value | ) | 
Sets the constrast value for green band.
| void te::map::RasterTransform::setGammaM | ( | double | value | ) | 
Sets the constrast value for gray band.
| void te::map::RasterTransform::setGammaR | ( | double | value | ) | 
Sets the constrast value for red band.
      
  | 
  protected | 
This transformation repeats the value of the first band in input three bands of the output
      
  | 
  protected | 
This transformation get the value of the selected band in input and set the interpolated value in output bands of the output
      
  | 
  inline | 
Sets the interpolate map information
Definition at line 212 of file RasterTransform.h.
| void te::map::RasterTransform::setLinearTransfParameters | ( | double | vmin, | 
| double | vmax, | ||
| double | rmin, | ||
| double | rmax | ||
| ) | 
Set parameters of linear transformation.
| vmin | smallest input value | 
| vmax | largest input value | 
| rmin | smallest value of the output range | 
| rmax | largest value of the output range | 
| void te::map::RasterTransform::setLinearTransfParameters | ( | double | vmin, | 
| double | vmax, | ||
| double | rmin, | ||
| double | rmax, | ||
| int | band | ||
| ) | 
Set parameters of linear transformation for each band.
| vmin | smallest input value | 
| vmax | largest input value | 
| rmin | smallest value of the output range | 
| rmax | largest value of the output range | 
| band | band id | 
      
  | 
  protected | 
This transformation repeats the value of the first band in input three bands of the output
| void te::map::RasterTransform::setOffset | ( | double | value | ) | 
Sets the offset 1.
      
  | 
  protected | 
This transformation get the value of the selected band in input and set the recoded value in output bands of the output
      
  | 
  inline | 
Sets the recode map information
Definition at line 218 of file RasterTransform.h.
      
  | 
  protected | 
This transformation repeats the value of the first band in input three bands of the output
      
  | 
  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.
      
  | 
  inline | 
Sets the mono band to be transformed
Definition at line 194 of file RasterTransform.h.
| void te::map::RasterTransform::setTransfFunction | ( | RasterTransfFunctions | func | ) | 
Sets the associated transformation function from an identifier
      
  | 
  inline | 
Sets the transformation method to be used
Definition at line 253 of file RasterTransform.h.
      
  | 
  inline | 
Sets the transparency.
Definition at line 134 of file RasterTransform.h.
      
  | 
  private | 
Attribute to define the categorized transformation.
Definition at line 425 of file RasterTransform.h.
      
  | 
  private | 
A vector of gains for each band used by the CONTRAST method.
Definition at line 430 of file RasterTransform.h.
      
  | 
  private | 
A vector of offsets1 for each band used by the CONTRAST method.
Definition at line 431 of file RasterTransform.h.
      
  | 
  private | 
A vector of offsets2 for each band used by the CONTRAST method.
Definition at line 432 of file RasterTransform.h.
      
  | 
  private | 
Function used in contrast transformation operation.
Definition at line 412 of file RasterTransform.h.
      
  | 
  private | 
Current contrast type.
Definition at line 411 of file RasterTransform.h.
      
  | 
  private | 
A vector of gamma gains for each band.
Definition at line 429 of file RasterTransform.h.
      
  | 
  private | 
Attribute to define the interpolated transformation.
Definition at line 426 of file RasterTransform.h.
      
  | 
  private | 
Value for the gray band.
Definition at line 419 of file RasterTransform.h.
      
  | 
  private | 
Value for output gray band channel.
Definition at line 420 of file RasterTransform.h.
      
  | 
  private | 
Pointer to a input raster.
Definition at line 408 of file RasterTransform.h.
      
  | 
  private | 
Pointer to a output raster.
Definition at line 409 of file RasterTransform.h.
      
  | 
  private | 
Attribute to define the recoded transformation.
Definition at line 427 of file RasterTransform.h.
      
  | 
  private | 
Function used in transformation operation.
Definition at line 423 of file RasterTransform.h.
      
  | 
  private | 
Map used to set the band order.
Definition at line 418 of file RasterTransform.h.
      
  | 
  private | 
Max value from input raster.
Definition at line 416 of file RasterTransform.h.
      
  | 
  private | 
Min value from input raster.
Definition at line 415 of file RasterTransform.h.
      
  | 
  private | 
Function used in transformation operation.
Definition at line 422 of file RasterTransform.h.
      
  | 
  private | 
Transparency factor.
Definition at line 414 of file RasterTransform.h.