QGIS API Documentation
3.14.0-Pi (9f7028fd23)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
z
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
c
e
f
g
h
k
l
m
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Functions
a
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
n
o
p
q
r
s
t
u
w
Typedefs
a
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
w
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
core
raster
qgsbrightnesscontrastfilter.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsbrightnesscontrastfilter.h
3
-------------------
4
begin : February 2013
5
copyright : (C) 2013 by Alexander Bruy
6
email : alexander dot bruy at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSBRIGHTNESSCONTRASTFILTER_H
19
#define QGSBRIGHTNESSCONTRASTFILTER_H
20
21
#include "qgis_core.h"
22
#include "
qgis_sip.h
"
23
#include "
qgsrasterinterface.h
"
24
25
class
QDomElement;
26
31
class
CORE_EXPORT
QgsBrightnessContrastFilter
:
public
QgsRasterInterface
32
{
33
public
:
34
QgsBrightnessContrastFilter
(
QgsRasterInterface
*input =
nullptr
);
35
36
QgsBrightnessContrastFilter
*
clone
()
const
override
SIP_FACTORY
;
37
38
int
bandCount
()
const override
;
39
40
Qgis::DataType
dataType
(
int
bandNo )
const override
;
41
42
bool
setInput
(
QgsRasterInterface
*input )
override
;
43
44
QgsRasterBlock
*
block
(
int
bandNo,
const
QgsRectangle
&extent,
int
width,
int
height,
QgsRasterBlockFeedback
*feedback =
nullptr
)
override
SIP_FACTORY
;
45
46
void
setBrightness
(
int
brightness ) { mBrightness = qBound( -255, brightness, 255 ); }
47
int
brightness
()
const
{
return
mBrightness; }
48
49
void
setContrast
(
int
contrast ) { mContrast = qBound( -100, contrast, 100 ); }
50
int
contrast
()
const
{
return
mContrast; }
51
52
void
writeXml
( QDomDocument &doc, QDomElement &parentElem )
const override
;
53
55
void
readXml
(
const
QDomElement &filterElem )
override
;
56
57
private
:
59
int
adjustColorComponent(
int
colorComponent,
int
alpha,
int
brightness,
double
contrastFactor )
const
;
60
62
int
mBrightness = 0;
63
65
double
mContrast = 0;
66
};
67
68
#endif // QGSBRIGHTNESSCONTRASTFILTER_H
Qgis::DataType
DataType
Raster data types.
Definition:
qgis.h:114
QgsRasterInterface::writeXml
virtual void writeXml(QDomDocument &doc, QDomElement &parentElem) const
Write base class members to xml.
Definition:
qgsrasterinterface.h:461
QgsRectangle
Definition:
qgsrectangle.h:41
SIP_FACTORY
#define SIP_FACTORY
Definition:
qgis_sip.h:76
qgsrasterinterface.h
QgsRasterInterface::setInput
virtual bool setInput(QgsRasterInterface *input)
Set input.
Definition:
qgsrasterinterface.h:266
QgsBrightnessContrastFilter::brightness
int brightness() const
Definition:
qgsbrightnesscontrastfilter.h:47
QgsRasterInterface::dataType
virtual Qgis::DataType dataType(int bandNo) const =0
Returns data type for the band specified by number.
qgis_sip.h
QgsRasterInterface::clone
virtual QgsRasterInterface * clone() const =0
Clone itself, create deep copy.
QgsRasterInterface::readXml
virtual void readXml(const QDomElement &filterElem)
Sets base class members from xml. Usually called from create() methods of subclasses.
Definition:
qgsrasterinterface.h:463
QgsBrightnessContrastFilter::contrast
int contrast() const
Definition:
qgsbrightnesscontrastfilter.h:50
QgsRasterInterface
Definition:
qgsrasterinterface.h:116
QgsBrightnessContrastFilter
Definition:
qgsbrightnesscontrastfilter.h:31
QgsRasterBlockFeedback
Definition:
qgsrasterinterface.h:40
QgsBrightnessContrastFilter::setContrast
void setContrast(int contrast)
Definition:
qgsbrightnesscontrastfilter.h:49
QgsBrightnessContrastFilter::setBrightness
void setBrightness(int brightness)
Definition:
qgsbrightnesscontrastfilter.h:46
QgsRasterInterface::bandCount
virtual int bandCount() const =0
Gets number of bands.
QgsRasterInterface::block
virtual QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr)=0
Read block of data using given extent and size.
QgsRasterBlock
Definition:
qgsrasterblock.h:36
Generated on Mon Jun 22 2020 05:14:09 for QGIS API Documentation by
1.8.17