libLAS API Reference (svn-trunk)
liblas::Color Class Reference

RGB color container. More...

#include <color.hpp>

Collaboration diagram for liblas::Color:
Collaboration graph

Public Types

typedef uint16_t value_type

Public Member Functions

 Color ()
 Default constructor.
 Color (uint32_t red, uint32_t green, uint32_t blue)
 User-defined constructor.
 Color (boost::array< value_type, 3 > const &color)
 User-defined constructor.
 Color (Color const &other)
 Copy constructor.
Color & operator= (Color const &rhs)
 Assignment opreator.
value_type GetRed () const
 Fetch value of the red image channel.
void SetRed (value_type const &value)
 Set value of the red image channel.
value_type GetBlue () const
 Fetch value of the blue image channel.
void SetBlue (value_type const &value)
 Set value of the blue image channel.
value_type GetGreen () const
 Fetch value of the green image channel.
void SetGreen (value_type const &value)
 Set value of the red image channel.
value_type & operator[] (std::size_t const &index)
 Index operator providing access to RGB values.
value_type const & operator[] (std::size_t const &index) const
 Const version of index operator providing access to RGB values.

Detailed Description

RGB color container.

Member Typedef Documentation

◆ value_type

typedef uint16_t liblas::Color::value_type

Constructor & Destructor Documentation

◆ Color() [1/4]

liblas::Color::Color ( )

Default constructor.

Initializes with black color using RGB {0, 0, 0}.

Referenced by Color(), and operator=().

Here is the caller graph for this function:

◆ Color() [2/4]

liblas::Color::Color ( uint32_t red,
uint32_t green,
uint32_t blue )

User-defined constructor.

Initializes object with given RGB values.

Exceptions
std::invalid_argumentif color component value is out of range of unsigned 8-bit integer.

◆ Color() [3/4]

liblas::Color::Color ( boost::array< value_type, 3 > const & color)

User-defined constructor.

Initializes colour components based on values of 3-element array.

Exceptions
std::invalid_argumentif color component value is out of range of unsigned 8-bit integer.

◆ Color() [4/4]

liblas::Color::Color ( Color const & other)

Copy constructor.

References Color().

Here is the call graph for this function:

Member Function Documentation

◆ GetBlue()

Color::value_type liblas::Color::GetBlue ( ) const
inline

Fetch value of the blue image channel.

Referenced by operator=().

Here is the caller graph for this function:

◆ GetGreen()

Color::value_type liblas::Color::GetGreen ( ) const
inline

Fetch value of the green image channel.

Referenced by operator=().

Here is the caller graph for this function:

◆ GetRed()

Color::value_type liblas::Color::GetRed ( ) const
inline

Fetch value of the red image channel.

Referenced by operator=().

Here is the caller graph for this function:

◆ operator=()

Color & liblas::Color::operator= ( Color const & rhs)

Assignment opreator.

References Color(), GetBlue(), GetGreen(), GetRed(), operator[](), SetBlue(), SetGreen(), and SetRed().

Here is the call graph for this function:

◆ operator[]() [1/2]

Color::value_type & liblas::Color::operator[] ( std::size_t const & index)
inline

Index operator providing access to RGB values.

Valid index values are 0, 1 or 2.

Exceptions
std::out_of_rangeif requested index is out of range (> 2).

Referenced by operator=().

Here is the caller graph for this function:

◆ operator[]() [2/2]

Color::value_type const & liblas::Color::operator[] ( std::size_t const & index) const
inline

Const version of index operator providing access to RGB values.

Valid index values are 0, 1 or 2.

Exceptions
std::out_of_rangeif requested index is out of range (> 2).

◆ SetBlue()

void liblas::Color::SetBlue ( Color::value_type const & value)
inline

Set value of the blue image channel.

Referenced by operator=().

Here is the caller graph for this function:

◆ SetGreen()

void liblas::Color::SetGreen ( Color::value_type const & value)
inline

Set value of the red image channel.

Referenced by operator=().

Here is the caller graph for this function:

◆ SetRed()

void liblas::Color::SetRed ( Color::value_type const & value)
inline

Set value of the red image channel.

Referenced by operator=().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: