libLAS API Reference  1.8.1
Public Types | Public Member Functions | List of all members
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. More...
 
 Color (uint32_t red, uint32_t green, uint32_t blue)
 User-defined constructor. More...
 
 Color (boost::array< value_type, 3 > const &color)
 User-defined constructor. More...
 
 Color (Color const &other)
 Copy constructor. More...
 
Coloroperator= (Color const &rhs)
 Assignment operator. More...
 
value_type GetRed () const
 Fetch value of the red image channel. More...
 
void SetRed (value_type const &value)
 Set value of the red image channel. More...
 
value_type GetBlue () const
 Fetch value of the blue image channel. More...
 
void SetBlue (value_type const &value)
 Set value of the blue image channel. More...
 
value_type GetGreen () const
 Fetch value of the green image channel. More...
 
void SetGreen (value_type const &value)
 Set value of the red image channel. More...
 
value_typeoperator[] (std::size_t const &index)
 Index operator providing access to RGB values. More...
 
value_type const & operator[] (std::size_t const &index) const
 Const version of index operator providing access to RGB values. More...
 

Detailed Description

RGB color container.

Member Typedef Documentation

typedef uint16_t liblas::Color::value_type

Constructor & Destructor Documentation

liblas::Color::Color ( )

Default constructor.

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

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

User-defined constructor.

Initializes object with given RGB values. The color component values must be normalized to range from 0 to 65535.

Exceptions
std::invalid_argumentif color component value is out of range of unsigned 16-bit integer.
liblas::Color::Color ( boost::array< value_type, 3 > const &  color)

User-defined constructor.

Initializes color components based on values of 3-element array. The color component values must be normalized to range from 0 to 65535.

Exceptions
std::invalid_argumentif color component value is out of range of unsigned 16-bit integer.
liblas::Color::Color ( Color const &  other)

Copy constructor.

Member Function Documentation

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

Fetch value of the blue image channel.

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

Fetch value of the green image channel.

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

Fetch value of the red image channel.

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

Assignment operator.

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).
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).
void liblas::Color::SetBlue ( Color::value_type const &  value)
inline

Set value of the blue image channel.

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

Set value of the red image channel.

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

Set value of the red image channel.


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