Skip to content
Permalink
Browse files
Fixed wrappers from QgsRasterLayer::computeMinimumMaximumFromLastExte…
…nt, computeMinimumMaximumEstimates

git-svn-id: http://svn.osgeo.org/qgis/trunk@14017 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Aug 6, 2010
1 parent adecbee commit 9e14a2f67dda0271f4397a071ad4995c11f0f7d6
Showing with 36 additions and 4 deletions.
  1. +12 −4 python/core/qgsrasterlayer.sip
  2. +16 −0 src/core/raster/qgsrasterlayer.cpp
  3. +8 −0 src/core/raster/qgsrasterlayer.h
@@ -269,16 +269,24 @@ public:
QString colorShadingAlgorithmAsString() const;

/** \brief Wrapper for GDALComputeRasterMinMax with the estimate option */
void computeMinimumMaximumEstimates( int theBand, double* theMinMax );
// (would need MethodCode directive) void computeMinimumMaximumEstimates( int theBand, double* theMinMax );

/** \brief Wrapper for GDALComputeRasterMinMax with the estimate option */
void computeMinimumMaximumEstimates( QString theBand, double* theMinMax );
// (would need MethodCode directive) void computeMinimumMaximumEstimates( QString theBand, double* theMinMax );

/** \brief Wrapper for GDALComputeRasterMinMax with the estimate option
\note added in v1.6 */
void computeMinimumMaximumEstimates( int theBand, double& theMin /Out/, double& theMax /Out/ );

/** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent */
void computeMinimumMaximumFromLastExtent( int theBand, double* theMinMax );
// (would need MethodCode directive) void computeMinimumMaximumFromLastExtent( int theBand, double* theMinMax );

/** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent */
void computeMinimumMaximumFromLastExtent( QString theBand, double* theMinMax );
// (would need MethodCode directive) void computeMinimumMaximumFromLastExtent( QString theBand, double* theMinMax );

/** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent
\note added in v1.6 */
void computeMinimumMaximumFromLastExtent( int theBand, double& theMin /Out/, double& theMax /Out/ );

/** \brief Get a pointer to the contrast enhancement for the selected band */
QgsContrastEnhancement* contrastEnhancement( unsigned int theBand );
@@ -1243,6 +1243,14 @@ void QgsRasterLayer::computeMinimumMaximumEstimates( QString theBand, double* th
computeMinimumMaximumEstimates( bandNumber( theBand ), theMinMax );
}

void QgsRasterLayer::computeMinimumMaximumEstimates( int theBand, double& theMin, double& theMax )
{
double theMinMax[2];
computeMinimumMaximumEstimates( theBand, theMinMax );
theMin = theMinMax[0];
theMax = theMinMax[1];
}

/**
* @param theBand The band (number) for which to calculate the min max values
* @param theMinMax Pointer to a double[2] which hold the estimated min max
@@ -1293,6 +1301,14 @@ void QgsRasterLayer::computeMinimumMaximumFromLastExtent( QString theBand, doubl
computeMinimumMaximumFromLastExtent( bandNumber( theBand ), theMinMax );
}

void QgsRasterLayer::computeMinimumMaximumFromLastExtent( int theBand, double& theMin, double& theMax )
{
double theMinMax[2];
computeMinimumMaximumFromLastExtent( theBand, theMinMax );
theMin = theMinMax[0];
theMax = theMinMax[1];
}

/**
* @param theBand The band (number) for which to get the contrast enhancement for
* @return Pointer to the contrast enhancement or 0 on failure
@@ -440,11 +440,19 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
/** \brief Wrapper for GDALComputeRasterMinMax with the estimate option */
void computeMinimumMaximumEstimates( QString theBand, double* theMinMax );

/** \brief Wrapper for GDALComputeRasterMinMax with the estimate option
\note added in v1.6 */
void computeMinimumMaximumEstimates( int theBand, double& theMin, double& theMax );

/** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent */
void computeMinimumMaximumFromLastExtent( int theBand, double* theMinMax );

/** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent */
void computeMinimumMaximumFromLastExtent( QString theBand, double* theMinMax );

/** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent
\note added in v1.6 */
void computeMinimumMaximumFromLastExtent( int theBand, double& theMin, double& theMax );

/** \brief Get a pointer to the contrast enhancement for the selected band */
QgsContrastEnhancement* contrastEnhancement( unsigned int theBand );

0 comments on commit 9e14a2f

Please sign in to comment.