Skip to content
Permalink
Browse files
-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
  • Loading branch information
ersts committed Nov 1, 2008
1 parent a3b8977 commit b4fe42e6917c39c5054ea73a40e49c877890b929
Showing with 520 additions and 809 deletions.
  1. +0 −1 python/core/core.sip
  2. +6 −6 python/core/qgscontrastenhancement.sip
  3. +1 −1 python/core/qgscontrastenhancementfunction.sip
  4. +7 −7 python/core/qgsrasterbandstats.sip
  5. +4 −4 python/core/qgsrasterlayer.sip
  6. +5 −5 python/core/qgsrastershader.sip
  7. +2 −2 python/core/qgsrastershaderfunction.sip
  8. +4 −4 python/core/qgsrastertransparency.sip
  9. +57 −57 src/app/qgsrasterlayerproperties.cpp
  10. +0 −2 src/core/CMakeLists.txt
  11. +2 −2 src/core/raster/qgscliptominmaxenhancement.cpp
  12. +4 −2 src/core/raster/qgscliptominmaxenhancement.h
  13. +50 −50 src/core/raster/qgscolorrampshader.cpp
  14. +32 −23 src/core/raster/qgscolorrampshader.h
  15. +0 −224 src/core/raster/qgscolortable.cpp
  16. +0 −127 src/core/raster/qgscolortable.h
  17. +32 −34 src/core/raster/qgscontrastenhancement.cpp
  18. +34 −19 src/core/raster/qgscontrastenhancement.h
  19. +25 −25 src/core/raster/qgscontrastenhancementfunction.cpp
  20. +14 −9 src/core/raster/qgscontrastenhancementfunction.h
  21. +36 −37 src/core/raster/qgsfreakoutshader.cpp
  22. +7 −2 src/core/raster/qgsfreakoutshader.h
  23. +1 −1 src/core/raster/qgslinearminmaxenhancement.cpp
  24. +3 −2 src/core/raster/qgslinearminmaxenhancement.h
  25. +1 −1 src/core/raster/qgslinearminmaxenhancementwithclip.cpp
  26. +4 −2 src/core/raster/qgslinearminmaxenhancementwithclip.h
  27. +2 −2 src/core/raster/qgspseudocolorshader.cpp
  28. +7 −2 src/core/raster/qgspseudocolorshader.h
  29. +45 −30 src/core/raster/qgsrasterbandstats.h
  30. +64 −64 src/core/raster/qgsrasterlayer.cpp
  31. +9 −9 src/core/raster/qgsrasterlayer.h
  32. +4 −4 src/core/raster/qgsrastershader.cpp
  33. +11 −5 src/core/raster/qgsrastershader.h
  34. +28 −30 src/core/raster/qgsrastershaderfunction.cpp
  35. +9 −5 src/core/raster/qgsrastershaderfunction.h
  36. +4 −5 src/core/raster/qgsrastertransparency.cpp
  37. +6 −4 src/core/raster/qgsrastertransparency.h
@@ -11,7 +11,6 @@

%Include qgis.sip
%Include qgsapplication.sip
%Include qgscolortable.sip
%Include qgscontexthelp.sip
%Include qgscontinuouscolorrenderer.sip
%Include qgscontrastenhancement.sip
@@ -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
@@ -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();

@@ -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);

};

@@ -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);

@@ -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. */
@@ -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;
};
@@ -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);

@@ -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 */
@@ -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);
@@ -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);
@@ -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);
};
Loading

0 comments on commit b4fe42e

Please sign in to comment.