$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::value::rgb< n > Struct Template Reference

#include <mln/value/rgb.hh>

Public Member Functions

 rgb ()
 rgb (int r, int g, int b)
 rgb (const algebra::vec< 3, int > &rhs)
 rgb (const algebra::vec< 3, unsigned > &rhs)
 rgb (const algebra::vec< 3, int_u< n > > &rhs)
 rgb (const algebra::vec< 3, float > &rhs)
C & handle_ ()
 operator algebra::vec< 3, float > () const
 operator algebra::vec< 3, int > () const
rgb< n > & operator= (const rgb< n > &rhs)
const C & to_enc () const
to_equiv () const
to_interop () const
Access to red/green/blue component.
int_u< n > red () const
int_u< n > & red ()
int_u< n > green () const
int_u< n > & green ()
int_u< n > blue () const
int_u< n > & blue ()
int_u< n > comp (unsigned k) const
int_u< n > & comp (unsigned k)
Constructors with literals.
 rgb (const mln::literal::white_t &)
 rgb (const mln::literal::black_t &)
 rgb (const mln::literal::light_gray_t &)
 rgb (const mln::literal::medium_gray_t &)
 rgb (const mln::literal::dark_gray_t &)
 rgb (const mln::literal::red_t &)
 rgb (const mln::literal::blue_t &)
 rgb (const mln::literal::green_t &)
 rgb (const mln::literal::brown_t &)
 rgb (const mln::literal::lime_t &)
 rgb (const mln::literal::orange_t &)
 rgb (const mln::literal::pink_t &)
 rgb (const mln::literal::purple_t &)
 rgb (const mln::literal::teal_t &)
 rgb (const mln::literal::violet_t &)
 rgb (const mln::literal::cyan_t &)
 rgb (const mln::literal::magenta_t &)
 rgb (const mln::literal::yellow_t &)
 rgb (const mln::literal::olive_t &)

Static Public Attributes

static const rgb< n > zero

Protected Attributes

enc v_

Public Types

typedef int_u< n > blue_t
typedef Value< void > category
typedef C enc
typedef V equiv
typedef rgb< n > exact_t
typedef int_u< n > green_t
typedef N interop
typedef int_u< n > red_t

Detailed Description

template<unsigned n>
struct mln::value::rgb< n >

Color class for red-green-blue where every component is n-bit encoded.

Definition at line 205 of file value/rgb.hh.

Constructor & Destructor Documentation

template<unsigned n>
mln::value::rgb< n >::rgb ( )

Constructor without argument.

template<unsigned n>
mln::value::rgb< n >::rgb ( int  r,
int  g,
int  b 
)

Constructor from component values.

template<unsigned n>
mln::value::rgb< n >::rgb ( const algebra::vec< 3, int > &  rhs)

Constructor from a algebra::vec.

template<unsigned n>
mln::value::rgb< n >::rgb ( const algebra::vec< 3, unsigned > &  rhs)
template<unsigned n>
mln::value::rgb< n >::rgb ( const algebra::vec< 3, int_u< n > > &  rhs)
template<unsigned n>
mln::value::rgb< n >::rgb ( const algebra::vec< 3, float > &  rhs)
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::white_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::black_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::light_gray_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::medium_gray_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::dark_gray_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::red_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::blue_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::green_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::brown_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::lime_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::orange_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::pink_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::purple_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::teal_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::violet_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::cyan_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::magenta_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::yellow_t )
template<unsigned n>
mln::value::rgb< n >::rgb ( const mln::literal::olive_t )

Member Function Documentation

template<unsigned n>
int_u<n> mln::value::rgb< n >::blue ( ) const
inline

Definition at line 228 of file value/rgb.hh.

template<unsigned n>
int_u<n>& mln::value::rgb< n >::blue ( )
inline

Definition at line 229 of file value/rgb.hh.

template<unsigned n>
int_u<n> mln::value::rgb< n >::comp ( unsigned  k) const
inline

Definition at line 231 of file value/rgb.hh.

template<unsigned n>
int_u<n>& mln::value::rgb< n >::comp ( unsigned  k)
inline

Definition at line 232 of file value/rgb.hh.

template<unsigned n>
int_u<n> mln::value::rgb< n >::green ( ) const
inline

Definition at line 225 of file value/rgb.hh.

template<unsigned n>
int_u<n>& mln::value::rgb< n >::green ( )
inline

Definition at line 226 of file value/rgb.hh.

template<typename V, typename C, typename N, typename E>
C& mln::value::internal::value_like_< V, C, N, E >::handle_ ( )
inlineinherited

Definition at line 81 of file value_like.hh.

template<unsigned n>
mln::value::rgb< n >::operator algebra::vec< 3, float > ( ) const
inline

Definition at line 250 of file value/rgb.hh.

template<unsigned n>
mln::value::rgb< n >::operator algebra::vec< 3, int > ( ) const
inline

Definition at line 248 of file value/rgb.hh.

template<unsigned n>
rgb<n>& mln::value::rgb< n >::operator= ( const rgb< n > &  rhs)

Assignment.

template<unsigned n>
int_u<n> mln::value::rgb< n >::red ( ) const
inline

Definition at line 222 of file value/rgb.hh.

template<unsigned n>
int_u<n>& mln::value::rgb< n >::red ( )
inline

Definition at line 223 of file value/rgb.hh.

template<typename V, typename C, typename N, typename E>
const C& mln::value::internal::value_like_< V, C, N, E >::to_enc ( ) const
inherited

Explicit conversion towards encoding type.

template<typename V, typename C, typename N, typename E>
V mln::value::internal::value_like_< V, C, N, E >::to_equiv ( ) const
inherited

Explicit conversion towards equivalent type.

template<typename V, typename C, typename N, typename E>
N mln::value::internal::value_like_< V, C, N, E >::to_interop ( ) const
inherited

Explicit conversion towards interoperation type.

Member Data Documentation

template<typename V, typename C, typename N, typename E>
enc mln::value::internal::value_like_< V, C, N, E >::v_
protectedinherited

Definition at line 84 of file value_like.hh.

template<unsigned n>
const rgb<n> mln::value::rgb< n >::zero
static

Zero value.

Definition at line 281 of file value/rgb.hh.

Member Typedef Documentation

template<unsigned n>
typedef int_u<n> mln::value::rgb< n >::blue_t

Definition at line 218 of file value/rgb.hh.

typedef Value<void> mln::Value< rgb< n > >::category
inherited

Definition at line 62 of file core/concept/value.hh.

template<typename V, typename C, typename N, typename E>
typedef C mln::value::internal::value_like_< V, C, N, E >::enc
inherited

Encoding associated type.

Definition at line 65 of file value_like.hh.

template<typename V, typename C, typename N, typename E>
typedef V mln::value::internal::value_like_< V, C, N, E >::equiv
inherited

Equivalent associated type.

Definition at line 62 of file value_like.hh.

typedef rgb< n > mln::Object< rgb< n > >::exact_t
inherited

Definition at line 105 of file object.hh.

template<unsigned n>
typedef int_u<n> mln::value::rgb< n >::green_t

Definition at line 217 of file value/rgb.hh.

template<typename V, typename C, typename N, typename E>
typedef N mln::value::internal::value_like_< V, C, N, E >::interop
inherited

Interoperation associated type.

Definition at line 68 of file value_like.hh.

template<unsigned n>
typedef int_u<n> mln::value::rgb< n >::red_t

Definition at line 216 of file value/rgb.hh.