Skip to content

Commit b4fe42e

Browse files
author
ersts
committedNov 1, 2008
-Delete outdated class QgsColorTable
-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

37 files changed

+520
-809
lines changed
 

‎python/core/core.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
%Include qgis.sip
1313
%Include qgsapplication.sip
14-
%Include qgscolortable.sip
1514
%Include qgscontexthelp.sip
1615
%Include qgscontinuouscolorrenderer.sip
1716
%Include qgscontrastenhancement.sip

‎python/core/qgscontrastenhancement.sip

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public:
1111
enum CONTRAST_ENHANCEMENT_ALGORITHM
1212
{
1313
NO_STRETCH, //this should be the default color scaling algorithm
14-
STRETCH_TO_MINMAX, //linear histogram stretch
14+
STRETCH_TO_MINMAX, //linear histogram enhanceContrast
1515
STRETCH_AND_CLIP_TO_MINMAX,
1616
CLIP_TO_MINMAX,
1717
USER_DEFINED
@@ -43,20 +43,20 @@ public:
4343
*
4444
*/
4545
/** \brief Helper function that returns the maximum possible value for a GDAL data type */
46-
static double getMaximumPossibleValue(QgsRasterDataType);
46+
static double maximumValuePossible(QgsRasterDataType);
4747
/** \brief Helper function that returns the minimum possible value for a GDAL data type */
48-
static double getMinimumPossibleValue(QgsRasterDataType);
48+
static double minimumValuePossible(QgsRasterDataType);
4949

5050
/*
5151
*
5252
* Non-Static Inline methods
5353
*
5454
*/
5555
/** \brief Return the maximum value for the contrast enhancement range. */
56-
double getMaximumValue();
56+
double maximumValue();
5757

5858
/** \brief Return the minimum value for the contrast enhancement range. */
59-
double getMinimumValue();
59+
double minimumValue();
6060

6161
CONTRAST_ENHANCEMENT_ALGORITHM getContrastEnhancementAlgorithm();
6262

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

8181
};
8282

‎python/core/qgscontrastenhancementfunction.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class QgsContrastEnhancementFunction
1616
void setMinimumValue(double);
1717

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

‎python/core/qgsrasterbandstats.sip

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ class QgsRasterBandStats
1212
/** \brief The name of the band that these stats belong to. */
1313
QString bandName;
1414
/** \brief The gdal band number (starts at 1)*/
15-
int bandNo;
15+
int bandNumber;
1616
/** \brief A flag to indicate whether this RasterBandStats struct
1717
* is completely populated */
18-
bool statsGatheredFlag;
18+
bool statsGathered;
1919
/** \brief The minimum cell value in the raster band. NO_DATA values
2020
* are ignored. This does not use the gdal GetMinimum function. */
21-
double minVal;
21+
double minimumValue;
2222
/** \brief The maximum cell value in the raster band. NO_DATA values
2323
* are ignored. This does not use the gdal GetMaximmum function. */
24-
double maxVal;
24+
double maximumValue;
2525
/** \brief The range is the distance between min & max. */
2626
double range;
2727
/** \brief The mean cell value for the band. NO_DATA values are excluded. */
2828
double mean;
2929
/** \brief The sum of the squares. Used to calculate standard deviation. */
30-
double sumSqrDev;
30+
double sumOfSquares;
3131
/** \brief The standard deviation of the cell values. */
3232
double stdDev;
3333
/** \brief The sum of all cells in the band. NO_DATA values are excluded. */
@@ -39,9 +39,9 @@ class QgsRasterBandStats
3939
typedef QVector<int> HistogramVector;
4040
//HistogramVector * histogramVector;
4141
/** \brief whteher histogram values are estimated or completely calculated */
42-
bool histogramEstimatedFlag;
42+
bool histogramEstimated;
4343
/** whehter histogram compuation should include out of range values */
44-
bool histogramOutOfRangeFlag;
44+
bool histogramOutOfRange;
4545
/** Color table */
4646
//QList<QgsColorRampShader::ColorRampItem> colorTable;
4747
};

‎python/core/qgsrasterlayer.sip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,17 @@ public:
218218
void setGrayBandName(const QString & theBandNameQString);
219219

220220
// Accessor and mutator for min max values
221-
double getMinimumValue(unsigned int theBand);
221+
double minimumValue(unsigned int theBand);
222222

223-
double getMinimumValue(QString theBand);
223+
double minimumValue(QString theBand);
224224

225225
void setMinimumValue(unsigned int theBand, double theValue);
226226

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

229-
double getMaximumValue(unsigned int theBand);
229+
double maximumValue(unsigned int theBand);
230230

231-
double getMaximumValue(QString theBand);
231+
double maximumValue(QString theBand);
232232

233233
void setMaximumValue(unsigned int theBand, double theValue);
234234

‎python/core/qgsrastershader.sip

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ public:
1515
*
1616
*/
1717
/** \brief Return the maximum value for the raster shader */
18-
double getMaximumValue();
18+
double maximumValue();
1919

2020
/** \brief Return the minimum value for the raster shader */
21-
double getMinimumValue();
21+
double minimumValue();
2222

23-
QgsRasterShaderFunction* getRasterShaderFunction();
23+
QgsRasterShaderFunction* rasterShaderFunction();
2424

2525
/*
2626
*
2727
* Non-Static methods
2828
*
2929
*/
3030
/** \brief generates and new RGB value based on one input value */
31-
bool generateShadedValue(double, int*, int*, int*);
31+
bool shade(double, int*, int*, int*);
3232
/** \brief generates and new RGB value based on original RGB value */
33-
bool generateShadedValue(double, double, double, int*, int*, int*);
33+
bool shade(double, double, double, int*, int*, int*);
3434
/** \brief A public method that allows the user to set their own shader function */
3535
void setRasterShaderFunction(QgsRasterShaderFunction*);
3636
/** \brief Set the maximum value */

‎python/core/qgsrastershaderfunction.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ public:
1010
virtual ~QgsRasterShaderFunction();
1111

1212
/** \brief generates and new RGB value based on one input value */
13-
virtual bool generateShadedValue(double, int*, int*, int*);
13+
virtual bool shade(double, int*, int*, int*);
1414
/** \brief generates and new RGB value based on original RGB value */
15-
virtual bool generateShadedValue(double, double, double, int*, int*, int*);
15+
virtual bool shade(double, double, double, int*, int*, int*);
1616

1717
/** \brief Set the maximum value */
1818
virtual void setMaximumValue(double);

‎python/core/qgsrastertransparency.sip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ public:
2929
// Initializer, Accessor and mutator for transparency tables.
3030
//
3131
/** \brief Mutator for transparentSingleValuePixelList */
32-
QList<QgsRasterTransparency::TransparentSingleValuePixel> getTransparentSingleValuePixelList();
32+
QList<QgsRasterTransparency::TransparentSingleValuePixel> transparentSingleValuePixelList();
3333

3434
/** \brief Mutator for transparentThreeValuePixelList */
35-
QList<QgsRasterTransparency::TransparentThreeValuePixel> getTransparentThreeValuePixelList();
35+
QList<QgsRasterTransparency::TransparentThreeValuePixel> transparentThreeValuePixelList();
3636

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

4949
/** \brief Returns the transparency value for a single value Pixel */
50-
int getAlphaValue(double, int theGlobalTransparency=255);
50+
int alphaValue(double, int theGlobalTransparency=255);
5151
/** \brief Return the transparency value for a RGB Pixel */
52-
int getAlphaValue(double, double, double, int theGlobalTransparency=255);
52+
int alphaValue(double, double, double, int theGlobalTransparency=255);
5353
};

0 commit comments

Comments
 (0)
Please sign in to comment.