Skip to content

Commit

Permalink
-Delete outdated class QgsColorTable
Browse files Browse the repository at this point in the history
-First round of API cleaning for raster classes (all but QgsRasterLayer)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9560 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
ersts committed Nov 1, 2008
1 parent a3b8977 commit b4fe42e
Show file tree
Hide file tree
Showing 37 changed files with 520 additions and 809 deletions.
1 change: 0 additions & 1 deletion python/core/core.sip
Expand Up @@ -11,7 +11,6 @@

%Include qgis.sip
%Include qgsapplication.sip
%Include qgscolortable.sip
%Include qgscontexthelp.sip
%Include qgscontinuouscolorrenderer.sip
%Include qgscontrastenhancement.sip
Expand Down
12 changes: 6 additions & 6 deletions python/core/qgscontrastenhancement.sip
Expand Up @@ -11,7 +11,7 @@ public:
enum CONTRAST_ENHANCEMENT_ALGORITHM
{
NO_STRETCH, //this should be the default color scaling algorithm
STRETCH_TO_MINMAX, //linear histogram stretch
STRETCH_TO_MINMAX, //linear histogram enhanceContrast
STRETCH_AND_CLIP_TO_MINMAX,
CLIP_TO_MINMAX,
USER_DEFINED
Expand Down Expand Up @@ -43,20 +43,20 @@ public:
*
*/
/** \brief Helper function that returns the maximum possible value for a GDAL data type */
static double getMaximumPossibleValue(QgsRasterDataType);
static double maximumValuePossible(QgsRasterDataType);
/** \brief Helper function that returns the minimum possible value for a GDAL data type */
static double getMinimumPossibleValue(QgsRasterDataType);
static double minimumValuePossible(QgsRasterDataType);

/*
*
* Non-Static Inline methods
*
*/
/** \brief Return the maximum value for the contrast enhancement range. */
double getMaximumValue();
double maximumValue();

/** \brief Return the minimum value for the contrast enhancement range. */
double getMinimumValue();
double minimumValue();

CONTRAST_ENHANCEMENT_ALGORITHM getContrastEnhancementAlgorithm();

Expand All @@ -76,7 +76,7 @@ public:
/** \brief Return the minimum value for the contrast enhancement range. */
void setMinimumValue(double, bool generateTable=true);
/** \brief Apply the contrast enhancement to a value. Return values are 0 - 254, -1 means the pixel was clipped and should not be displayed */
int stretch(double);
int enhanceContrast(double);

};

2 changes: 1 addition & 1 deletion python/core/qgscontrastenhancementfunction.sip
Expand Up @@ -16,7 +16,7 @@ class QgsContrastEnhancementFunction
void setMinimumValue(double);

/** \brief A customizable method that takes in a double and returns a int between 0 and 255 */
virtual int enhanceValue(double);
virtual int enhance(double);
/** \brief A customicable method to indicate if the pixels is displayable */
virtual bool isValueInDisplayableRange(double);

Expand Down
14 changes: 7 additions & 7 deletions python/core/qgsrasterbandstats.sip
Expand Up @@ -12,22 +12,22 @@ class QgsRasterBandStats
/** \brief The name of the band that these stats belong to. */
QString bandName;
/** \brief The gdal band number (starts at 1)*/
int bandNo;
int bandNumber;
/** \brief A flag to indicate whether this RasterBandStats struct
* is completely populated */
bool statsGatheredFlag;
bool statsGathered;
/** \brief The minimum cell value in the raster band. NO_DATA values
* are ignored. This does not use the gdal GetMinimum function. */
double minVal;
double minimumValue;
/** \brief The maximum cell value in the raster band. NO_DATA values
* are ignored. This does not use the gdal GetMaximmum function. */
double maxVal;
double maximumValue;
/** \brief The range is the distance between min & max. */
double range;
/** \brief The mean cell value for the band. NO_DATA values are excluded. */
double mean;
/** \brief The sum of the squares. Used to calculate standard deviation. */
double sumSqrDev;
double sumOfSquares;
/** \brief The standard deviation of the cell values. */
double stdDev;
/** \brief The sum of all cells in the band. NO_DATA values are excluded. */
Expand All @@ -39,9 +39,9 @@ class QgsRasterBandStats
typedef QVector<int> HistogramVector;
//HistogramVector * histogramVector;
/** \brief whteher histogram values are estimated or completely calculated */
bool histogramEstimatedFlag;
bool histogramEstimated;
/** whehter histogram compuation should include out of range values */
bool histogramOutOfRangeFlag;
bool histogramOutOfRange;
/** Color table */
//QList<QgsColorRampShader::ColorRampItem> colorTable;
};
Expand Down
8 changes: 4 additions & 4 deletions python/core/qgsrasterlayer.sip
Expand Up @@ -218,17 +218,17 @@ public:
void setGrayBandName(const QString & theBandNameQString);

// Accessor and mutator for min max values
double getMinimumValue(unsigned int theBand);
double minimumValue(unsigned int theBand);

double getMinimumValue(QString theBand);
double minimumValue(QString theBand);

void setMinimumValue(unsigned int theBand, double theValue);

void setMinimumValue(QString theBand, double theValue, bool theGenerateLookupTableFlag=true);

double getMaximumValue(unsigned int theBand);
double maximumValue(unsigned int theBand);

double getMaximumValue(QString theBand);
double maximumValue(QString theBand);

void setMaximumValue(unsigned int theBand, double theValue);

Expand Down
10 changes: 5 additions & 5 deletions python/core/qgsrastershader.sip
Expand Up @@ -15,22 +15,22 @@ public:
*
*/
/** \brief Return the maximum value for the raster shader */
double getMaximumValue();
double maximumValue();

/** \brief Return the minimum value for the raster shader */
double getMinimumValue();
double minimumValue();

QgsRasterShaderFunction* getRasterShaderFunction();
QgsRasterShaderFunction* rasterShaderFunction();

/*
*
* Non-Static methods
*
*/
/** \brief generates and new RGB value based on one input value */
bool generateShadedValue(double, int*, int*, int*);
bool shade(double, int*, int*, int*);
/** \brief generates and new RGB value based on original RGB value */
bool generateShadedValue(double, double, double, int*, int*, int*);
bool shade(double, double, double, int*, int*, int*);
/** \brief A public method that allows the user to set their own shader function */
void setRasterShaderFunction(QgsRasterShaderFunction*);
/** \brief Set the maximum value */
Expand Down
4 changes: 2 additions & 2 deletions python/core/qgsrastershaderfunction.sip
Expand Up @@ -10,9 +10,9 @@ public:
virtual ~QgsRasterShaderFunction();

/** \brief generates and new RGB value based on one input value */
virtual bool generateShadedValue(double, int*, int*, int*);
virtual bool shade(double, int*, int*, int*);
/** \brief generates and new RGB value based on original RGB value */
virtual bool generateShadedValue(double, double, double, int*, int*, int*);
virtual bool shade(double, double, double, int*, int*, int*);

/** \brief Set the maximum value */
virtual void setMaximumValue(double);
Expand Down
8 changes: 4 additions & 4 deletions python/core/qgsrastertransparency.sip
Expand Up @@ -29,10 +29,10 @@ public:
// Initializer, Accessor and mutator for transparency tables.
//
/** \brief Mutator for transparentSingleValuePixelList */
QList<QgsRasterTransparency::TransparentSingleValuePixel> getTransparentSingleValuePixelList();
QList<QgsRasterTransparency::TransparentSingleValuePixel> transparentSingleValuePixelList();

/** \brief Mutator for transparentThreeValuePixelList */
QList<QgsRasterTransparency::TransparentThreeValuePixel> getTransparentThreeValuePixelList();
QList<QgsRasterTransparency::TransparentThreeValuePixel> transparentThreeValuePixelList();

/** \brief Reset to the transparency list to a single value */
void initializeTransparentPixelList(double);
Expand All @@ -47,7 +47,7 @@ public:
void setTransparentThreeValuePixelList(QList<QgsRasterTransparency::TransparentThreeValuePixel>);

/** \brief Returns the transparency value for a single value Pixel */
int getAlphaValue(double, int theGlobalTransparency=255);
int alphaValue(double, int theGlobalTransparency=255);
/** \brief Return the transparency value for a RGB Pixel */
int getAlphaValue(double, double, double, int theGlobalTransparency=255);
int alphaValue(double, double, double, int theGlobalTransparency=255);
};

0 comments on commit b4fe42e

Please sign in to comment.