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 |
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, BAND2BAND_TRANSF =8, EXTRACT2RGBA_TRANSF } |
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 () |
double | getContrastB () |
Gets the constrast value for blue band. More... | |
double | getContrastG () |
Gets the constrast value for green band. More... | |
double | getContrastM () |
Gets the constrast value for gray band. More... | |
double | getContrastR () |
Gets the constrast value for red band. More... | |
short | getDestBand () |
double | getGain () |
Gets the gain. 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... | |
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 | setContrastB (double value) |
Sets the constrast value for blue band. More... | |
void | setContrastG (double value) |
Sets the constrast value for green band. More... | |
void | setContrastM (double value) |
Sets the constrast value for gray band. More... | |
void | setContrastR (double value) |
Sets the constrast value for red band. More... | |
void | setDestBand (short n) |
void | setGain (double value) |
Sets the gain. More... | |
void | setInterpolatedMap (InterpolatedMap map) |
void | setLinearTransfParameters (double vmin, double vmax, double rmin, double rmax) |
Set parameters of linear transformation. More... | |
void | setOffset (double value) |
Sets the offset. More... | |
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 Member Functions | |
bool | checkNoValue (double &value, int band) |
Function used to check if value is or not a valid value. More... | |
void | fixValue (double &value) |
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 | 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 | 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 | setRed2ThreeBand (double icol, double ilin, double ocol, double olin) |
Private Attributes | |
double | m_bContrast |
Contrast value used in blue band. More... | |
CategorizedMap | m_categorizeMap |
Attribute to define the categorized transformation. More... | |
double | m_gain |
Gain factor. More... | |
double | m_gContrast |
Contrast value used in green band. More... | |
InterpolatedMap | m_interpolateMap |
Attribute to define the interpolated transformation. More... | |
double | m_mContrast |
Contrast value used in gray band. More... | |
short | m_monoBand |
Value for the gray band. More... | |
short | m_monoBandOut |
Value for output gray band channel. More... | |
double | m_offset |
Offset factor. More... | |
te::rst::Raster * | m_rasterIn |
Pointer to a input raster. More... | |
te::rst::Raster * | m_rasterOut |
Pointer to a output raster. More... | |
double | m_rContrast |
Contrast value used in red band. More... | |
RGBAFunction | m_RGBAFuncPtr |
Function used in transformation operation. More... | |
std::map< RGBChannels, short > | m_rgbMap |
Map used to set the band order. More... | |
double | m_rstMaxValue |
Max value from input raster. More... | |
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 62 of file RasterTransform.h.
typedef std::map<RasterThreshold, te::color::RGBAColor> te::map::RasterTransform::CategorizedMap |
Definition at line 71 of file RasterTransform.h.
typedef std::map<RasterThreshold, te::color::ColorBar> te::map::RasterTransform::InterpolatedMap |
Definition at line 72 of file RasterTransform.h.
typedef std::pair<double, double> te::map::RasterTransform::RasterThreshold |
Definition at line 69 of file RasterTransform.h.
typedef te::color::RGBAColor(RasterTransform::* te::map::RasterTransform::RGBAFunction)(double, double) |
Definition at line 67 of file RasterTransform.h.
typedef void(RasterTransform::* te::map::RasterTransform::TransformFunction)(double, double, double, double) |
Definition at line 66 of file RasterTransform.h.
Enumerator | |
---|---|
NO_TRANSF | |
MONO2THREE_TRANSF | |
EXTRACT2RGB_TRANSF | |
RED2THREE_TRANSF | |
GREEN2THREE_TRANSF | |
BLUE2THREE_TRANSF | |
CATEGORIZE_TRANSF | |
INTERPOLATE_TRANSF | |
BAND2BAND_TRANSF | |
EXTRACT2RGBA_TRANSF |
Definition at line 84 of file RasterTransform.h.
The three channels of a display.
Enumerator | |
---|---|
RED_CHANNEL | |
GREEN_CHANNEL | |
BLUE_CHANNEL | |
ALPHA_CHANNEL |
Definition at line 75 of file RasterTransform.h.
te::map::RasterTransform::RasterTransform | ( | te::rst::Raster * | input, |
te::rst::Raster * | output | ||
) |
Constructor.
input | |
output |
Definition at line 39 of file RasterTransform.cpp.
References m_rstMaxValue, and m_rstMinValue.
te::map::RasterTransform::~RasterTransform | ( | ) |
Destructor.
Definition at line 58 of file RasterTransform.cpp.
|
inline |
Applies the selected transformation method
Definition at line 221 of file RasterTransform.h.
Referenced by te::map::DrawRaster(), and te::qt::widgets::ReadPixelTool::mouseReleaseEvent().
|
inline |
Definition at line 223 of file RasterTransform.h.
|
protected |
Function used to check if value is or not a valid value.
Definition at line 597 of file RasterTransform.cpp.
|
inline |
Clears current mapping from bands to channel
Definition at line 168 of file RasterTransform.h.
|
protected |
Function used to adjust the value in raster range
Definition at line 585 of file RasterTransform.cpp.
|
protected |
This transformation repeats the value of the first band in input three bands of the output
Definition at line 489 of file RasterTransform.cpp.
Referenced by getTransfFunction(), and setTransfFunction().
|
protected |
This transformation get the value of the selected band in input and get the categorized value
Definition at line 526 of file RasterTransform.cpp.
Referenced by getTransfFunction(), and setTransfFunction().
|
protected |
Function used to get the categorized color given a pixel value
Definition at line 637 of file RasterTransform.cpp.
|
inline |
Gets the categorize map information
Definition at line 189 of file RasterTransform.h.
|
inline |
Gets the constrast value for blue band.
Definition at line 153 of file RasterTransform.h.
|
inline |
Gets the constrast value for green band.
Definition at line 147 of file RasterTransform.h.
|
inline |
Gets the constrast value for gray band.
Definition at line 159 of file RasterTransform.h.
|
inline |
Gets the constrast value for red band.
Definition at line 141 of file RasterTransform.h.
|
inline |
Gets the destination of the mono band
Definition at line 183 of file RasterTransform.h.
|
protected |
This transformation is used to define a particular mapping from input bands to RGB channels
Definition at line 286 of file RasterTransform.cpp.
Referenced by getTransfFunction(), and setTransfFunction().
|
protected |
This transformation is used to define a particular mapping from input bands to RGBA channels
Definition at line 350 of file RasterTransform.cpp.
Referenced by setTransfFunction().
|
inline |
Gets the gain.
Definition at line 129 of file RasterTransform.h.
|
protected |
This transformation repeats the value of the first band in input three bands of the output
Definition at line 447 of file RasterTransform.cpp.
Referenced by getTransfFunction(), and setTransfFunction().
|
inline |
Gets the input raster.
Definition at line 114 of file RasterTransform.h.
|
protected |
This transformation get the value of the selected band in input and get the interpolated value
Definition at line 554 of file RasterTransform.cpp.
Referenced by getTransfFunction(), and setTransfFunction().
|
protected |
Function used to get the interpolated color given a pixel value
Definition at line 607 of file RasterTransform.cpp.
|
inline |
Gets the categorize map information
Definition at line 195 of file RasterTransform.h.
|
protected |
This transformation repeats the value of the first band in input three bands of the output
Definition at line 236 of file RasterTransform.cpp.
Referenced by getTransfFunction(), and setTransfFunction().
|
inline |
Gets the offset.
Definition at line 135 of file RasterTransform.h.
|
inline |
Gets the output raster.
Definition at line 117 of file RasterTransform.h.
|
protected |
This transformation repeats the value of the first band in input three bands of the output
Definition at line 405 of file RasterTransform.cpp.
Referenced by getTransfFunction(), and setTransfFunction().
|
inline |
Returns the mapping from a particular input band to a particular output channel
Definition at line 171 of file RasterTransform.h.
Referenced by te::qt::widgets::ReadPixelTool::mouseReleaseEvent().
|
inline |
Gets the mono band to be transformed
Definition at line 177 of file RasterTransform.h.
te::map::RasterTransform::RasterTransfFunctions te::map::RasterTransform::getTransfFunction | ( | ) |
Returns the identifier of the transformation function currently set
Definition at line 112 of file RasterTransform.cpp.
References getBlue2ThreeBand(), getCategorize(), getExtractRGB(), getGreen2ThreeBand(), getInterpolate(), getMono2ThreeBand(), getRed2ThreeBand(), setBand2Band(), setBlue2ThreeBand(), setCategorize(), setExtractRGB(), setGreen2ThreeBand(), setInterpolate(), setMono2ThreeBand(), and setRed2ThreeBand().
|
inline |
Gets the transparency.
Definition at line 123 of file RasterTransform.h.
|
protected |
This transformation repeats the value of the n band in input to b band in output
Definition at line 566 of file RasterTransform.cpp.
Referenced by getTransfFunction(), and setTransfFunction().
|
inline |
Sets the mapping from a particular input band to a particular output channel
Definition at line 165 of file RasterTransform.h.
|
protected |
This transformation repeats the value of the first band in input three bands of the output
Definition at line 468 of file RasterTransform.cpp.
Referenced by getTransfFunction(), and setTransfFunction().
|
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 510 of file RasterTransform.cpp.
References te::color::RGBAColor::getBlue(), te::color::RGBAColor::getGreen(), and te::color::RGBAColor::getRed().
Referenced by getTransfFunction(), and setTransfFunction().
|
inline |
Sets the categorize map information
Definition at line 186 of file RasterTransform.h.
|
inline |
Sets the constrast value for blue band.
Definition at line 150 of file RasterTransform.h.
|
inline |
Sets the constrast value for green band.
Definition at line 144 of file RasterTransform.h.
|
inline |
Sets the constrast value for gray band.
Definition at line 156 of file RasterTransform.h.
|
inline |
Sets the constrast value for red band.
Definition at line 138 of file RasterTransform.h.
|
inline |
Sets the destination of the mono band
Definition at line 180 of file RasterTransform.h.
|
protected |
This transformation is used to define a particular mapping from input bands to RGB channels
Definition at line 256 of file RasterTransform.cpp.
Referenced by getTransfFunction(), and setTransfFunction().
|
protected |
This transformation is used to define a particular mapping from input bands to RGBA channels
Definition at line 315 of file RasterTransform.cpp.
Referenced by setTransfFunction().
|
inline |
Sets the gain.
Definition at line 126 of file RasterTransform.h.
|
protected |
This transformation repeats the value of the first band in input three bands of the output
Definition at line 426 of file RasterTransform.cpp.
Referenced by getTransfFunction(), and setTransfFunction().
|
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 538 of file RasterTransform.cpp.
References te::color::RGBAColor::getBlue(), te::color::RGBAColor::getGreen(), and te::color::RGBAColor::getRed().
Referenced by getTransfFunction(), and setTransfFunction().
|
inline |
Sets the interpolate map information
Definition at line 192 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 |
Definition at line 88 of file RasterTransform.cpp.
Referenced by te::map::DrawRaster(), and te::qt::widgets::ReadPixelTool::mouseReleaseEvent().
|
protected |
This transformation repeats the value of the first band in input three bands of the output
Definition at line 217 of file RasterTransform.cpp.
Referenced by getTransfFunction(), and setTransfFunction().
|
inline |
Sets the offset.
Definition at line 132 of file RasterTransform.h.
|
protected |
This transformation repeats the value of the first band in input three bands of the output
Definition at line 384 of file RasterTransform.cpp.
Referenced by getTransfFunction(), and setTransfFunction().
|
inline |
Sets the transformation method to be used
Definition at line 218 of file RasterTransform.h.
void te::map::RasterTransform::setRGBMap | ( | std::map< RGBChannels, short > & | rgbMap | ) |
Sets the rgb map values.
Definition at line 65 of file RasterTransform.cpp.
|
inline |
Sets the mono band to be transformed
Definition at line 174 of file RasterTransform.h.
void te::map::RasterTransform::setTransfFunction | ( | RasterTransfFunctions | func | ) |
Sets the associated transformation function from an identifier
Definition at line 163 of file RasterTransform.cpp.
References getBlue2ThreeBand(), getCategorize(), getExtractRGB(), getExtractRGBA(), getGreen2ThreeBand(), getInterpolate(), getMono2ThreeBand(), getRed2ThreeBand(), setBand2Band(), setBlue2ThreeBand(), setCategorize(), setExtractRGB(), setExtractRGBA(), setGreen2ThreeBand(), setInterpolate(), setMono2ThreeBand(), and setRed2ThreeBand().
|
inline |
Sets the transformation method to be used
Definition at line 215 of file RasterTransform.h.
|
inline |
Sets the transparency.
Definition at line 120 of file RasterTransform.h.
|
private |
Contrast value used in blue band.
Definition at line 307 of file RasterTransform.h.
|
private |
Attribute to define the categorized transformation.
Definition at line 317 of file RasterTransform.h.
|
private |
Gain factor.
Definition at line 301 of file RasterTransform.h.
|
private |
Contrast value used in green band.
Definition at line 306 of file RasterTransform.h.
|
private |
Attribute to define the interpolated transformation.
Definition at line 318 of file RasterTransform.h.
|
private |
Contrast value used in gray band.
Definition at line 308 of file RasterTransform.h.
|
private |
Value for the gray band.
Definition at line 311 of file RasterTransform.h.
|
private |
Value for output gray band channel.
Definition at line 312 of file RasterTransform.h.
|
private |
Offset factor.
Definition at line 302 of file RasterTransform.h.
|
private |
Pointer to a input raster.
Definition at line 297 of file RasterTransform.h.
|
private |
Pointer to a output raster.
Definition at line 298 of file RasterTransform.h.
|
private |
Contrast value used in red band.
Definition at line 305 of file RasterTransform.h.
|
private |
Function used in transformation operation.
Definition at line 315 of file RasterTransform.h.
|
private |
Map used to set the band order.
Definition at line 310 of file RasterTransform.h.
|
private |
Max value from input raster.
Definition at line 304 of file RasterTransform.h.
Referenced by RasterTransform().
|
private |
Min value from input raster.
Definition at line 303 of file RasterTransform.h.
Referenced by RasterTransform().
|
private |
Function used in transformation operation.
Definition at line 314 of file RasterTransform.h.
|
private |
Transparency factor.
Definition at line 300 of file RasterTransform.h.