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

base interface for all colors in different color spaces The class provides a base interface for all color (space) classes. More...

#include <image/Color.h>

Inheritance diagram for ColorBase:
Inheritance graph
[legend]

Public Member Functions

virtual ~ColorBase ()
 
virtual Color::RGB toRGB () const =0
 converts the color of every color space to a RGB color. 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 ()
 

Protected Member Functions

virtual Class const & internalGetClass () const =0
 

Detailed Description

base interface for all colors in different color spaces The class provides a base interface for all color (space) classes.

Each derived class must implement the pure-virtual method toRGB().

Constructor & Destructor Documentation

◆ ~ColorBase()

virtual ~ColorBase ( )
inlinevirtual

Member Function Documentation

◆ toRGB()

virtual Color::RGB toRGB ( ) const
pure virtual

converts the color of every color space to a RGB color.

Implemented in Lab, XYZ, HSV, and RGB.

◆ operator cv::Scalar()

operator cv::Scalar ( ) const
inlinevirtual

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

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