MIRA
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
RGB Class Referenceabstract

The different color spaces. More...

#include <image/Color.h>

Inheritance diagram for RGB:
Inheritance graph
[legend]

Public Member Functions

 RGB (float ir, float ig, float ib)
 Constructs RGB color R,G and B: range from 0.0 to 1.0. More...
 
 RGB ()
 Default constructor that creates a black color. More...
 
 RGB (const RGB &other)
 copy constructor More...
 
template<typename Reflector >
void reflect (Reflector &reflector)
 
virtual Color::RGB toRGB () const
 no conversion is done here, because it is already RGB More...
 
bool isInRange () const
 Returns true, if all rgb components are within valid ranges, i.e. More...
 
virtual operator cv::Scalar () const
 converts color to cv::Scalar Converts color to cv::Scalar by first converting to RGB and then creating a 4 channel cv::Scalar(B,G,R,255); More...
 
Class const & getClass () const
 call the virtual internalGetClass(). More...
 

Static Public Member Functions

static PseudoClass const & CLASS ()
 

Public Attributes

float r
 
float g
 
float b
 

Protected Member Functions

virtual Class const & internalGetClass () const =0
 

Detailed Description

The different color spaces.

Color in RGB color space

Constructor & Destructor Documentation

◆ RGB() [1/3]

RGB ( float  ir,
float  ig,
float  ib 
)
inline

Constructs RGB color R,G and B: range from 0.0 to 1.0.

◆ RGB() [2/3]

RGB ( )
inline

Default constructor that creates a black color.

◆ RGB() [3/3]

RGB ( const RGB other)
inline

copy constructor

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  reflector)
inline

◆ toRGB()

virtual Color::RGB toRGB ( ) const
inlinevirtual

no conversion is done here, because it is already RGB

Implements ColorBase.

◆ isInRange()

bool isInRange ( ) const
inline

Returns true, if all rgb components are within valid ranges, i.e.

between 0.0 and 1.0.

◆ operator cv::Scalar()

operator cv::Scalar ( ) const
inlinevirtualinherited

converts color to cv::Scalar Converts color to cv::Scalar by first converting to RGB and then creating a 4 channel cv::Scalar(B,G,R,255);

cast operator to cv::Scalar converts color to OpenCV BGRA format by scaling range to 0..255 and setting alpha channel to 255

Reimplemented in RGBA.

◆ getClass()

Class const& getClass ( ) const
inlineinherited

call the virtual internalGetClass().

◆ CLASS()

static PseudoClass const& CLASS ( )
inlinestaticinherited

◆ internalGetClass()

virtual Class const& internalGetClass ( ) const
protectedpure virtualinherited

Member Data Documentation

◆ r

float r

◆ g

float g

◆ b

float b

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