1
1
class QgsRasterBlock
2
2
{
3
3
%TypeHeaderCode
4
+ #include <qgis.h>
4
5
#include <qgsrasterblock.h>
5
6
%End
6
7
7
8
public:
8
-
9
- /** Data types.
10
- * This is modified and extended copy of GDALDataType.
11
- */
12
- enum DataType
13
- {
14
- /*! Unknown or unspecified type */ UnknownDataType = 0,
15
- /*! Eight bit unsigned integer */ Byte = 1,
16
- /*! Sixteen bit unsigned integer */ UInt16 = 2,
17
- /*! Sixteen bit signed integer */ Int16 = 3,
18
- /*! Thirty two bit unsigned integer */ UInt32 = 4,
19
- /*! Thirty two bit signed integer */ Int32 = 5,
20
- /*! Thirty two bit floating point */ Float32 = 6,
21
- /*! Sixty four bit floating point */ Float64 = 7,
22
- /*! Complex Int16 */ CInt16 = 8,
23
- /*! Complex Int32 */ CInt32 = 9,
24
- /*! Complex Float32 */ CFloat32 = 10,
25
- /*! Complex Float64 */ CFloat64 = 11,
26
- /*! Color, alpha, red, green, blue, 4 bytes the same as
27
- QImage::Format_ARGB32 */ ARGB32 = 12,
28
- /*! Color, alpha, red, green, blue, 4 bytes the same as
29
- QImage::Format_ARGB32_Premultiplied */ ARGB32_Premultiplied = 13
30
- };
31
-
32
9
struct Range
33
10
{
34
11
double min;
@@ -38,11 +15,11 @@ class QgsRasterBlock
38
15
39
16
QgsRasterBlock();
40
17
41
- QgsRasterBlock( DataType theDataType, int theWidth, int theHeight, double theNoDataValue );
18
+ QgsRasterBlock( QGis:: DataType theDataType, int theWidth, int theHeight, double theNoDataValue );
42
19
43
20
virtual ~QgsRasterBlock();
44
21
45
- bool reset( DataType theDataType, int theWidth, int theHeight, double theNoDataValue );
22
+ bool reset( QGis:: DataType theDataType, int theWidth, int theHeight, double theNoDataValue );
46
23
47
24
bool isEmpty() const;
48
25
@@ -51,16 +28,16 @@ class QgsRasterBlock
51
28
int dataTypeSize( int bandNo ) const;
52
29
53
30
/** Returns true if data type is numeric */
54
- bool typeIsNumeric( QgsRasterBlock ::DataType type ) const;
31
+ bool typeIsNumeric( QGis ::DataType type ) const;
55
32
56
33
/** Returns true if data type is color */
57
- bool typeIsColor( QgsRasterBlock ::DataType type ) const;
34
+ bool typeIsColor( QGis ::DataType type ) const;
58
35
59
36
/** Returns data type for the band specified by number */
60
- virtual QgsRasterBlock ::DataType dataType() const;
37
+ virtual QGis ::DataType dataType() const;
61
38
62
39
/** For given data type returns wider type and sets no data value */
63
- static QgsRasterBlock ::DataType typeWithNoDataValue( DataType dataType, double *noDataValue );
40
+ static QGis ::DataType typeWithNoDataValue( QGis:: DataType dataType, double *noDataValue );
64
41
65
42
double noDataValue( ) const;
66
43
@@ -85,7 +62,7 @@ class QgsRasterBlock
85
62
//char * bits( size_t index );
86
63
static QString printValue( double value );
87
64
88
- bool convert( QgsRasterBlock ::DataType destDataType );
65
+ bool convert( QGis ::DataType destDataType );
89
66
QImage image() const;
90
67
bool setImage( const QImage * image );
91
68
0 commit comments