Technische Universität Wien
Orientation and Processing of Airborne Laser Scanning data
Department of Geodesy and Geoinformation - Research Groups Photogrammetry and Remote Sensing
distro
c++_api
inc
opals
RGBColor.hpp
1
#pragma once
2
3
//OPALS
4
#include "opals/config.hpp"
5
#include "opals/String.hpp"
6
#include "opals/Array.hpp"
7
#include "opals/CustomOptionType.hpp"
8
9
namespace
opals
{
10
11
/// Class describing RGB colors in three different ways
12
class
OPALS_API
RGBColor
:
public
CustomOptionType
<RGBColor>
13
{
14
public
:
15
RGBColor
();
16
RGBColor
(uint8_t r, uint8_t g, uint8_t b);
17
RGBColor
(
const
double
& r,
const
double
& g,
const
double
& b);
18
virtual
~
RGBColor
();
19
20
typedef
Array<double, 3>
ArrayD3
;
21
typedef
Array<uint8_t, 3>
ArrayB3
;
22
23
void
setColor(
const
ArrayB3
& c);
24
void
setColor(uint8_t r, uint8_t g, uint8_t b);
25
void
setNormalizedColor(
const
ArrayD3
& c );
26
void
setNormalizedColor(
const
double
&r,
const
double
& g,
const
double
& b);
27
void
setHexColor(
const
opals::String
& c );
28
29
uint8_t operator[](
unsigned
idx)
const
{
return
color[idx]; }
30
ArrayB3
getColor()
const
{
return
color; }
31
ArrayD3
getNormalizedColor()
const
;
32
opals::String
getHexColor()
const
;
33
34
static
const
char
* help(
bool
);
35
static
const
char
* syntax();
36
static
bool
exportsPythonType();
37
38
private
:
39
ArrayB3
color;
40
41
static
void
_validateValues(
const
double
& r,
const
double
& g,
const
double
& b);
42
};
43
}
opals::CustomOptionType
Base class for all custom parameter types.
Definition:
CustomOptionType.hpp:39
opals::RGBColor
Class describing RGB colors in three different ways.
Definition:
RGBColor.hpp:12
opals::Array< double, 3 >
opals
Contains the public interface of OPALS.
Definition:
AbsValueOrQuantile.hpp:8
opals::String
A dynamic character string whose interface conforms to STL's std::string.
Definition:
String.hpp:35