Color class for red-green-blue where every component is n-bit encoded. More...
#include <rgb.hh>
Public Types | |
typedef int_u< n > | blue_t |
typedef Value< void > | category |
typedef C | enc |
Encoding associated type. | |
typedef V | equiv |
Equivalent associated type. | |
typedef rgb< n > | exact_t |
typedef int_u< n > | green_t |
typedef N | interop |
Interoperation associated type. | |
typedef int_u< n > | red_t |
Public Member Functions | |
C & | handle_ () |
operator algebra::vec< 3, float > () const | |
operator algebra::vec< 3, int > () const | |
rgb< n > & | operator= (const rgb< n > &rhs) |
Assignment. | |
rgb (int r, int g, int b) | |
Constructor from component values. | |
rgb (const algebra::vec< 3, unsigned > &rhs) | |
rgb () | |
Constructor without argument. | |
rgb (const algebra::vec< 3, int_u< n > > &rhs) | |
rgb (const algebra::vec< 3, int > &rhs) | |
Constructor from a algebra::vec. | |
const C & | to_enc () const |
Explicit conversion towards encoding type. | |
V | to_equiv () const |
Explicit conversion towards equivalent type. | |
N | to_interop () const |
Explicit conversion towards interoperation type. | |
int_u< n > | red () const |
Acces to red/green/blue component. | |
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) |
rgb (const mln::literal::white_t &) | |
Constructors with literals. | |
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 |
Zero value. | |
Protected Attributes | |
enc | v_ |
Color class for red-green-blue where every component is n-bit encoded.
typedef int_u<n> mln::value::rgb< n >::blue_t |
typedef Value<void> mln::Value< rgb< n > >::category [inherited] |
Reimplemented from mln::Object< rgb< n > >.
typedef C mln::value::internal::value_like_< V, C, N, E >::enc [inherited] |
Encoding associated type.
Reimplemented in mln::value::internal::gray_< n >, and mln::value::label< n >.
typedef V mln::value::internal::value_like_< V, C, N, E >::equiv [inherited] |
Equivalent associated type.
Reimplemented in mln::value::internal::gray_< n >.
typedef rgb< n > mln::Object< rgb< n > >::exact_t [inherited] |
typedef int_u<n> mln::value::rgb< n >::green_t |
typedef N mln::value::internal::value_like_< V, C, N, E >::interop [inherited] |
Interoperation associated type.
typedef int_u<n> mln::value::rgb< n >::red_t |
mln::value::rgb< n >::rgb | ( | ) | [inline] |
Constructor without argument.
mln::value::rgb< n >::rgb | ( | int | r, | |
int | g, | |||
int | b | |||
) | [inline] |
Constructor from component values.
References mln::value::internal::value_like_< V, C, N, E >::v_.
mln::value::rgb< n >::rgb | ( | const algebra::vec< 3, int > & | rhs | ) | [inline] |
Constructor from a algebra::vec.
References mln::value::internal::value_like_< V, C, N, E >::v_.
mln::value::rgb< n >::rgb | ( | const algebra::vec< 3, unsigned > & | rhs | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const algebra::vec< 3, int_u< n > > & | rhs | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::white_t & | ) | [inline] |
Constructors with literals.
References mln::value::internal::value_like_< V, C, N, E >::v_.
mln::value::rgb< n >::rgb | ( | const mln::literal::black_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::light_gray_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::medium_gray_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::dark_gray_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::red_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::blue_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::green_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::brown_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::lime_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::orange_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::pink_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::purple_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::teal_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::violet_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::cyan_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::magenta_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::yellow_t & | ) | [inline] |
mln::value::rgb< n >::rgb | ( | const mln::literal::olive_t & | ) | [inline] |
int_u<n> mln::value::rgb< n >::blue | ( | ) | const [inline] |
References mln::value::internal::value_like_< V, C, N, E >::v_.
Referenced by mln::io::magick::do_it(), mln::convert::over_load::from_to_(), mln::io::magick::get_color(), mln::io::tiff::internal::load_data_rgb8(), keep_specific_colors::operator()(), mln::dist::operator()(), to23bits::operator()(), to8bits::operator()(), to16bits::operator()(), mln::saturate_rgb8::operator()(), mln::value::operator>>(), mln::trait::next::set_precise_unary_< mln::fun::blue, mln::value::rgb< n > >::read(), mln::io::pnm::read_value(), mln::trait::next::set_precise_unary_< mln::fun::blue, mln::value::rgb< n > >::write(), and mln::io::pnm::impl::write_value().
int_u<n>& mln::value::rgb< n >::blue | ( | ) | [inline] |
int_u<n>& mln::value::rgb< n >::comp | ( | unsigned | k | ) | [inline] |
int_u<n> mln::value::rgb< n >::comp | ( | unsigned | k | ) | const [inline] |
int_u<n> mln::value::rgb< n >::green | ( | ) | const [inline] |
References mln::value::internal::value_like_< V, C, N, E >::v_.
Referenced by mln::io::magick::do_it(), mln::convert::over_load::from_to_(), mln::io::magick::get_color(), mln::io::tiff::internal::load_data_rgb8(), keep_specific_colors::operator()(), mln::dist::operator()(), to23bits::operator()(), to8bits::operator()(), to16bits::operator()(), mln::saturate_rgb8::operator()(), mln::value::operator>>(), mln::trait::next::set_precise_unary_< mln::fun::green, mln::value::rgb< n > >::read(), mln::io::pnm::read_value(), mln::trait::next::set_precise_unary_< mln::fun::green, mln::value::rgb< n > >::write(), and mln::io::pnm::impl::write_value().
int_u<n>& mln::value::rgb< n >::green | ( | ) | [inline] |
C& mln::value::internal::value_like_< V, C, N, E >::handle_ | ( | ) | [inline, inherited] |
Referenced by mln::value::operator>>().
mln::value::rgb< n >::operator algebra::vec< 3, float > | ( | ) | const [inline] |
mln::value::rgb< n >::operator algebra::vec< 3, int > | ( | ) | const [inline] |
rgb< n > & mln::value::rgb< n >::operator= | ( | const rgb< n > & | rhs | ) | [inline] |
Assignment.
References mln::value::internal::value_like_< V, C, N, E >::v_.
int_u<n>& mln::value::rgb< n >::red | ( | ) | [inline] |
int_u<n> mln::value::rgb< n >::red | ( | ) | const [inline] |
Acces to red/green/blue component.
References mln::value::internal::value_like_< V, C, N, E >::v_.
Referenced by mln::io::magick::do_it(), mln::convert::over_load::from_to_(), mln::io::magick::get_color(), mln::io::tiff::internal::load_data_rgb8(), mln::dist::operator()(), to23bits::operator()(), to8bits::operator()(), to16bits::operator()(), mln::saturate_rgb8::operator()(), mln::value::operator>>(), mln::trait::next::set_precise_unary_< mln::fun::red, mln::value::rgb< n > >::read(), mln::io::pnm::read_value(), mln::trait::next::set_precise_unary_< mln::fun::red, mln::value::rgb< n > >::write(), and mln::io::pnm::impl::write_value().
const C & mln::value::internal::value_like_< V, C, N, E >::to_enc | ( | ) | const [inline, inherited] |
Explicit conversion towards encoding type.
References mln::value::internal::value_like_< V, C, N, E >::v_.
Referenced by mln::value::internal::convert_< float01_< n > >::index_of_value(), mln::value::label< n >::operator unsigned(), and mln::value::internal::operator==().
V mln::value::internal::value_like_< V, C, N, E >::to_equiv | ( | ) | const [inline, inherited] |
Explicit conversion towards equivalent type.
References mln::value::internal::value_like_< V, C, N, E >::v_.
N mln::value::internal::value_like_< V, C, N, E >::to_interop | ( | ) | const [inline, inherited] |
Explicit conversion towards interoperation type.
Referenced by mln::value::operator*(), mln::value::operator+(), mln::value::operator-(), and mln::value::operator/().
enc mln::value::internal::value_like_< V, C, N, E >::v_ [protected, inherited] |
Referenced by mln::value::rgb< n >::blue(), mln::value::rgb< n >::comp(), mln::value::float01_< n >::float01_(), mln::value::float01_f::float01_f(), mln::value::internal::gray_< n >::gray_(), mln::value::internal::gray_f::gray_f(), mln::value::graylevel< n >::graylevel(), mln::value::graylevel_f::graylevel_f(), mln::value::rgb< n >::green(), mln::value::internal::value_like_< int, int, gray_< n >, gray_< n > >::handle_(), mln::value::int_s< n >::int_s(), mln::value::int_u< n >::int_u(), mln::value::int_u_sat< n >::int_u_sat(), mln::algebra::quat::inv(), mln::algebra::quat::is_null(), mln::algebra::quat::is_pure(), mln::algebra::quat::is_unit(), mln::value::label< n >::label(), mln::value::label< n >::next(), mln::value::int_u< n >::next(), mln::value::rgb< n >::operator algebra::vec< 3, float >(), mln::value::rgb< n >::operator algebra::vec< 3, int >(), mln::algebra::quat::operator const algebra::vec< 4, float > &(), mln::value::float01_f::operator float(), mln::value::float01_< n >::operator float(), mln::value::internal::gray_f::operator gray_< m >(), mln::value::internal::gray_< n >::operator gray_< m >(), mln::value::internal::gray_f::operator graylevel< m >(), mln::value::internal::gray_< n >::operator graylevel< m >(), mln::value::internal::gray_f::operator graylevel_f(), mln::value::internal::gray_< n >::operator graylevel_f(), mln::value::int_u_sat< n >::operator int(), mln::value::int_u< n >::operator unsigned(), mln::value::label< n >::operator++(), mln::value::int_u_sat< n >::operator+=(), mln::value::int_u< n >::operator-(), mln::value::label< n >::operator--(), mln::value::int_u_sat< n >::operator-=(), mln::value::rgb< n >::operator=(), mln::algebra::quat::operator=(), mln::value::label< n >::operator=(), mln::value::int_u_sat< n >::operator=(), mln::value::int_u< n >::operator=(), mln::value::int_s< n >::operator=(), mln::value::graylevel_f::operator=(), mln::value::graylevel< n >::operator=(), mln::value::internal::gray_f::operator=(), mln::value::internal::gray_< n >::operator=(), mln::value::float01_f::operator=(), mln::value::float01_< n >::operator=(), mln::value::label< n >::prev(), mln::algebra::quat::quat(), mln::value::rgb< n >::red(), mln::value::rgb< n >::rgb(), mln::algebra::quat::s(), mln::value::float01_< n >::set_ind(), mln::algebra::quat::set_unit(), mln::algebra::quat::set_v(), mln::algebra::quat::sprod(), mln::value::internal::value_like_< V, C, N, E >::to_enc(), mln::value::internal::value_like_< V, C, N, E >::to_equiv(), mln::value::graylevel< n >::to_float(), mln::algebra::quat::to_vec(), mln::algebra::quat::v(), mln::value::graylevel_f::value(), mln::value::graylevel< n >::value(), mln::value::internal::gray_f::value(), mln::value::internal::gray_< n >::value(), mln::value::float01_f::value(), and mln::value::float01_< n >::value().
const rgb< n > mln::value::rgb< n >::zero [static] |
Zero value.