Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
QgsRasterShaderFunction Class Reference

The raster shade function applies a shader to a pixel at render time - typically used to render grayscale images as false color. More...

#include <qgsrastershaderfunction.h>

Inheritance diagram for QgsRasterShaderFunction:
Inheritance graph
[legend]

Public Member Functions

 QgsRasterShaderFunction (double theMinimumValue=0.0, double theMaximumValue=255.0)
 
virtual ~QgsRasterShaderFunction ()
 
virtual void setMaximumValue (double)
 Set the maximum value. More...
 
virtual void setMinimumValue (double)
 Return the minimum value. More...
 
virtual bool shade (double, int *, int *, int *)
 generates and new RGB value based on one input value More...
 
virtual bool shade (double, double, double, int *, int *, int *)
 generates and new RGB value based on original RGB value More...
 

Protected Attributes

double mMaximumValue
 User defineable maximum value for the shading function. More...
 
double mMinimumValue
 User defineable minimum value for the shading function. More...
 
double mMinimumMaximumRange
 Minimum maximum range for the shading function. More...
 

Detailed Description

The raster shade function applies a shader to a pixel at render time - typically used to render grayscale images as false color.

Definition at line 27 of file qgsrastershaderfunction.h.

Constructor & Destructor Documentation

QgsRasterShaderFunction::QgsRasterShaderFunction ( double  theMinimumValue = 0.0,
double  theMaximumValue = 255.0 
)
virtual QgsRasterShaderFunction::~QgsRasterShaderFunction ( )
inlinevirtual

Definition at line 32 of file qgsrastershaderfunction.h.

Member Function Documentation

void QgsRasterShaderFunction::setMaximumValue ( double  theValue)
virtual

Set the maximum value.

Set the maximum value for the raster shader.

Parameters
theValueThe new maximum value

Reimplemented in QgsFreakOutShader, and QgsPseudoColorShader.

Definition at line 36 of file qgsrastershaderfunction.cpp.

References mMaximumValue, mMinimumMaximumRange, mMinimumValue, and QgsDebugMsg.

Referenced by QgsRasterShader::setMaximumValue().

void QgsRasterShaderFunction::setMinimumValue ( double  theValue)
virtual

Return the minimum value.

Set the maximum value for the raster shader.

Parameters
theValueThe new minimum value

Reimplemented in QgsFreakOutShader, and QgsPseudoColorShader.

Definition at line 49 of file qgsrastershaderfunction.cpp.

References mMaximumValue, mMinimumMaximumRange, mMinimumValue, and QgsDebugMsg.

Referenced by QgsRasterShader::setMinimumValue().

bool QgsRasterShaderFunction::shade ( double  theValue,
int *  theReturnRedValue,
int *  theReturnGreenValue,
int *  theReturnBlueValue 
)
virtual

generates and new RGB value based on one input value

Generates and new RGB value based on one input value.

Parameters
theValueThe original value to base a new RGB value on
theReturnRedValueThe red component of the new RGB value
theReturnGreenValueThe green component of the new RGB value
theReturnBlueValueThe blue component of the new RGB value
Returns
True if the return values are valid otherwise false

Reimplemented in QgsColorRampShader, QgsFreakOutShader, and QgsPseudoColorShader.

Definition at line 66 of file qgsrastershaderfunction.cpp.

Referenced by QgsRasterShader::shade().

bool QgsRasterShaderFunction::shade ( double  theRedValue,
double  theGreenValue,
double  theBlueValue,
int *  theReturnRedValue,
int *  theReturnGreenValue,
int *  theReturnBlueValue 
)
virtual

generates and new RGB value based on original RGB value

Generates and new RGB value based on an original RGB value.

Parameters
theRedValueThe red component of the original value to base a new RGB value on
theGreenValueThe green component of the original value to base a new RGB value on
theBlueValueThe blue component of the original value to base a new RGB value on
theReturnRedValueThe red component of the new RGB value
theReturnGreenValueThe green component of the new RGB value
theReturnBlueValueThe blue component of the new RGB value
Returns
True if the return values are valid otherwise false

Reimplemented in QgsColorRampShader, QgsFreakOutShader, and QgsPseudoColorShader.

Definition at line 87 of file qgsrastershaderfunction.cpp.

Member Data Documentation

double QgsRasterShaderFunction::mMaximumValue
protected
double QgsRasterShaderFunction::mMinimumMaximumRange
protected
double QgsRasterShaderFunction::mMinimumValue
protected

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