QGIS API Documentation  master-3f58142
src/core/raster/qgsrasterhistogram.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                         qgsrasterhistogram.h
00003                               -------------------
00004  begin                : July 2012
00005  copyright            : (C) 2012 by Radim Blazek
00006  email                : radim dot blazek at gmail dot com
00007 ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef QGSRASTERHISTOGRAM
00019 #define QGSRASTERHISTOGRAM
00020 
00021 #include <QString>
00022 #include <QVector>
00023 
00024 #include <limits>
00025 
00030 class CORE_EXPORT QgsRasterHistogram
00031 {
00032   public:
00033     typedef QVector<int> HistogramVector;
00034 
00035     QgsRasterHistogram()
00036     {
00037       bandNumber = 0;
00038       binCount = 0;
00039       nonNullCount = 0;
00040       includeOutOfRange = false;
00041       maximum = 0;
00042       minimum = 0;
00043       width = 0;
00044       height = 0;
00045       valid = false;
00046     }
00047 
00049     bool operator==( const QgsRasterHistogram &h ) const
00050     {
00051       return ( h.bandNumber == bandNumber &&
00052                h.binCount == binCount &&
00053                h.includeOutOfRange == includeOutOfRange &&
00054                h.maximum == maximum &&
00055                h.minimum == minimum &&
00056                h.extent == extent &&
00057                h.width == width &&
00058                h.height == height );
00059     }
00060 
00062     int bandNumber;
00063 
00065     int binCount;
00066 
00068     int nonNullCount;
00069 
00071     bool includeOutOfRange;
00072 
00076     HistogramVector histogramVector;
00077 
00079     double maximum;
00080 
00082     double minimum;
00083 
00085     int width;
00086 
00088     int height;
00089 
00091     QgsRectangle extent;
00092 
00094     bool valid;
00095 };
00096 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines