| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Public Attributes
TeRasterTransform Class Reference

This class defines a way of evaluating the final value of a raster element. More...

`#include <TeRasterTransform.h>`

List of all members.

## Public Types

enum | TeRGBChannels { TeREDCHANNEL = 0, TeGREENCHANNEL = 1, TeBLUECHANNEL = 2 }
| The three channels of a display. More...
enum | TeRasterTransfFunctions { TeNoTransf = 0, TeMono2Three = 1, TeBand2Band = 2, TePall2Three = 3, TeLUT2Three = 4, TeExtractRGB = 5, TeExtractBand = 6, TeExtractBands = 7, TeThreeBand2RGB = 8, TeThree2LUTThreeBand = 9, TeMono2LUTMonoBand = 10 }
typedef void(TeRasterTransform::* | TransformFunction )(double, double, double, double)
| One of the available transformation methods.

## Public Member Functions

| TeRasterTransform (TeRaster *rIn=0, TeRaster *rOut=0)
| Constructor.
| ~TeRasterTransform ()
| Destructor.
void | setLutSize (int n)
| Sets the size of the LUT being used.
int | getLutSize ()
| Gets the size of the LUT being used.
void | setRasterIn (TeRaster *rIn)
| Sets the input raster.
void | setRasterOut (TeRaster *rOut)
| Sets the input raster.
void | setGain (double g)
| Sets the gain.
double | getGain () const
| Gets the gain.
void | setOffset (double o)
| Sets the offset.
double | getOffset () const
| Gets the offset.
void | setTransfFunction (TeRasterTransform::TransformFunction transfFuncPtr)
| Sets the transformation method to be used.
void | setRGBmap (map< TeRGBChannels, short > &rgbmap)
| Sets the mapping from bands to R,G and B channels.
void | setBChannelMapping (short bIn, TeRGBChannels bOut)
| Sets the mapping from a particular input band to a particular output channel.
void | clearRGBMap ()
| Clears current mapping from bands to channel.
map< TeRGBChannels, short > & | getRGBMap ()
| Returns the mapping from a particular input band to a particular output channel.
void | setSrcBand (short n)
| Sets the mono band to be transformed.
short | getSrcBand ()
| Gets the mono band to be transformed.
void | setDestBand (short n)
| Sets the destination of the mono band.
short | getDestBand ()
| Gets the destination of the mono band.
void | generateLUT (TeLegendEntryVector &legs, unsigned int nentries, TeColor &backColor)
| Generates a LUT with nentries to display the vector of legends.
void | setLinearTransfParameters (double vmin, double vmax, double rmin, double rmax)
| Set parameters of linear transformation.
void | setContrastR (double cR)
void | setContrastG (double cG)
void | setContrastB (double cB)
void | setContrastM (double cM)
double | getContrastR ()
double | getContrastG ()
double | getContrastB ()
double | getContrastM ()
void | setTransparency (unsigned int transp)
unsigned int | getTransparency ()
void | setLutTableName (const std::string &tableName)
std::string | getLutTableName ()
void | apply (double icol, double ilin, double ocol, double olin)
| Applies the selected transformation method.
TeRasterTransfFunctions | getTransfFunction ()
| Returns the identifier of the transformation function currently set.
void | setTransfFunction (TeRasterTransfFunctions func)
| Sets the associated transformation function from an identifier.
void | Mono2ThreeBand (double icol, double ilin, double ocol, double olin)
| This transformation repeats the value of the first band in input three bands of the output.
void | Band2Band (double icol, double ilin, double ocol, double olin)
| This transformation repeats the value of each band in input to the same band in output.
void | Pallete2ThreeBand (double icol, double ilin, double ocol, double olin)
| This transformation repeats the value of the raster LUT in input to the first 3 bands of output.
void | ThreeBand2RGB (double icol, double ilin, double ocol, double olin)
| This transformation repeats the value of the first band in input three bands of the output.
void | LUT2ThreeBand (double icol, double ilin, double ocol, double olin)
| This transformation repeats the value of an external LUT to the first 3 bands of output.
void | ThreeBand2LUTThreeBand (double icol, double ilin, double ocol, double olin)
void | MonoBand2LUTMonoBand (double icol, double ilin, double ocol, double olin)
void | ExtractRGB (double icol, double ilin, double ocol, double olin)
void | ExtractBand (double icol, double ilin, double ocol, double olin)
| This transformation repeats the value of a particular band in input to a particular band of the output.
void | ExtractBands (double icol, double ilin, double ocol, double olin)

## Public Attributes

vector< unsigned char > | lutr_
vector< unsigned char > | lutg_
vector< unsigned char > | lutb_

## Detailed Description

This class defines a way of evaluating the final value of a raster element.

## Member Typedef Documentation

typedef void(TeRasterTransform::* TeRasterTransform::TransformFunction)(double, double, double, double)

One of the available transformation methods.

## Member Enumeration Documentation

enum TeRasterTransform::TeRasterTransfFunctions

Enumerator:

  TeNoTransf |
  TeMono2Three |
  TeBand2Band |
  TePall2Three |
  TeLUT2Three |
  TeExtractRGB |
  TeExtractBand |
  TeExtractBands |
  TeThreeBand2RGB |
  TeThree2LUTThreeBand |
  TeMono2LUTMonoBand |

enum TeRasterTransform::TeRGBChannels

The three channels of a display.

Enumerator:

  TeREDCHANNEL |
  TeGREENCHANNEL |
  TeBLUECHANNEL |

## Constructor & Destructor Documentation

TeRasterTransform::TeRasterTransform | ( | TeRaster * | rIn = `0`,
|  | TeRaster * | rOut = `0`
| ) |  | `[inline]`

Constructor.

TeRasterTransform::~TeRasterTransform | ( |  | ) | `[inline]`

Destructor.

## Member Function Documentation

void TeRasterTransform::apply | ( | double | icol,
|  | double | ilin,
|  | double | ocol,
|  | double | olin
| ) |  | `[inline]`

Applies the selected transformation method.

void TeRasterTransform::Band2Band | ( | double | icol,
|  | double | ilin,
|  | double | ocol,
|  | double | olin
| ) |  | `[inline]`

This transformation repeats the value of each band in input to the same band in output.

void TeRasterTransform::clearRGBMap | ( |  | ) | `[inline]`

Clears current mapping from bands to channel.

void TeRasterTransform::ExtractBand | ( | double | icol,
|  | double | ilin,
|  | double | ocol,
|  | double | olin
| ) |  | `[inline]`

This transformation repeats the value of a particular band in input to a particular band of the output.

void TeRasterTransform::ExtractBands | ( | double | icol,
|  | double | ilin,
|  | double | ocol,
|  | double | olin
| ) |  | `[inline]`

void TeRasterTransform::ExtractRGB | ( | double | icol,
|  | double | ilin,
|  | double | ocol,
|  | double | olin
| ) |  | `[inline]`

void TeRasterTransform::generateLUT | ( | TeLegendEntryVector & | legs,
|  | unsigned int | nentries,
|  | TeColor & | backColor
| ) |  |

Generates a LUT with nentries to display the vector of legends.

double TeRasterTransform::getContrastB | ( |  | ) | `[inline]`

double TeRasterTransform::getContrastG | ( |  | ) | `[inline]`

double TeRasterTransform::getContrastM | ( |  | ) | `[inline]`

double TeRasterTransform::getContrastR | ( |  | ) | `[inline]`

short TeRasterTransform::getDestBand | ( |  | ) | `[inline]`

Gets the destination of the mono band.

double TeRasterTransform::getGain | ( |  | ) | const`[inline]`

Gets the gain.

int TeRasterTransform::getLutSize | ( |  | ) | `[inline]`

Gets the size of the LUT being used.

std::string TeRasterTransform::getLutTableName | ( |  | ) | `[inline]`

double TeRasterTransform::getOffset | ( |  | ) | const`[inline]`

Gets the offset.

map<TeRGBChannels,short>& TeRasterTransform::getRGBMap | ( |  | ) | `[inline]`

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

short TeRasterTransform::getSrcBand | ( |  | ) | `[inline]`

Gets the mono band to be transformed.

TeRasterTransform::TeRasterTransfFunctions TeRasterTransform::getTransfFunction | ( |  | ) |

Returns the identifier of the transformation function currently set.

unsigned int TeRasterTransform::getTransparency | ( |  | ) | `[inline]`

void TeRasterTransform::LUT2ThreeBand | ( | double | icol,
|  | double | ilin,
|  | double | ocol,
|  | double | olin
| ) |  | `[inline]`

This transformation repeats the value of an external LUT to the first 3 bands of output.

void TeRasterTransform::Mono2ThreeBand | ( | double | icol,
|  | double | ilin,
|  | double | ocol,
|  | double | olin
| ) |  | `[inline]`

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

void TeRasterTransform::MonoBand2LUTMonoBand | ( | double | icol,
|  | double | ilin,
|  | double | ocol,
|  | double | olin
| ) |  | `[inline]`

void TeRasterTransform::Pallete2ThreeBand | ( | double | icol,
|  | double | ilin,
|  | double | ocol,
|  | double | olin
| ) |  | `[inline]`

This transformation repeats the value of the raster LUT in input to the first 3 bands of output.

void TeRasterTransform::setBChannelMapping | ( | short | bIn,
|  | TeRGBChannels | bOut
| ) |  | `[inline]`

Sets the mapping from a particular input band to a particular output channel.

void TeRasterTransform::setContrastB | ( | double | cB | ) | `[inline]`

void TeRasterTransform::setContrastG | ( | double | cG | ) | `[inline]`

void TeRasterTransform::setContrastM | ( | double | cM | ) | `[inline]`

void TeRasterTransform::setContrastR | ( | double | cR | ) | `[inline]`

void TeRasterTransform::setDestBand | ( | short | n | ) | `[inline]`

Sets the destination of the mono band.

void TeRasterTransform::setGain | ( | double | g | ) | `[inline]`

Sets the gain.

void TeRasterTransform::setLinearTransfParameters | ( | double | vmin,
|  | double | vmax,
|  | double | rmin,
|  | double | rmax
| ) |  | `[inline]`

Set parameters of linear transformation.

Parameters:

  vmin | smallest input value
  vmax | largest input value
  rmin | smallest value of the output range
  rmax | largest value of the output range

void TeRasterTransform::setLutSize | ( | int | n | ) | `[inline]`

Sets the size of the LUT being used.

void TeRasterTransform::setLutTableName | ( | const std::string & | tableName | ) | `[inline]`

void TeRasterTransform::setOffset | ( | double | o | ) | `[inline]`

Sets the offset.

void TeRasterTransform::setRasterIn | ( | TeRaster * | rIn | ) | `[inline]`

Sets the input raster.

void TeRasterTransform::setRasterOut | ( | TeRaster * | rOut | ) | `[inline]`

Sets the input raster.

void TeRasterTransform::setRGBmap | ( | map< TeRGBChannels, short > & | rgbmap | ) | `[inline]`

Sets the mapping from bands to R,G and B channels.

void TeRasterTransform::setSrcBand | ( | short | n | ) | `[inline]`

Sets the mono band to be transformed.

void TeRasterTransform::setTransfFunction | ( | TeRasterTransform::TransformFunction | transfFuncPtr | ) | `[inline]`

Sets the transformation method to be used.

void TeRasterTransform::setTransfFunction | ( | TeRasterTransfFunctions | func | ) |

Sets the associated transformation function from an identifier.

void TeRasterTransform::setTransparency | ( | unsigned int | transp | ) | `[inline]`

void TeRasterTransform::ThreeBand2LUTThreeBand | ( | double | icol,
|  | double | ilin,
|  | double | ocol,
|  | double | olin
| ) |  | `[inline]`

void TeRasterTransform::ThreeBand2RGB | ( | double | icol,
|  | double | ilin,
|  | double | ocol,
|  | double | olin
| ) |  | `[inline]`

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

## Member Data Documentation

vector<unsigned char> TeRasterTransform::lutb_

vector<unsigned char> TeRasterTransform::lutg_

vector<unsigned char> TeRasterTransform::lutr_

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeRasterTransform.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeRasterTransform.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines