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

Color in CIE 1931 XYZ color space The CIE XYZ color space is the master for the derived CIE Lab color space, which is perceptually uniform and hence will be used more often for visualization purposes. More...

#include <image/Color.h>

Inheritance diagram for XYZ:
Inheritance graph
[legend]

Public Member Functions

 XYZ (float ix, float iy, float iz)
 Constructs color in CIE 1931 XYZ color space X: from 0 to 95.047 Y: from 0 to 100.000 Z: from 0 to 108.883. More...
 
 XYZ ()
 Default constructor Initializes X,Y, and Z with 0.0. More...
 
template<typename Reflector >
void reflect (Reflector &r)
 
virtual Color::RGB toRGB () const
 Converts the CIE XYZ color to RGB. 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 x
 
float y
 
float z
 

Protected Member Functions

virtual Class const & internalGetClass () const =0
 

Detailed Description

Color in CIE 1931 XYZ color space The CIE XYZ color space is the master for the derived CIE Lab color space, which is perceptually uniform and hence will be used more often for visualization purposes.

See also
mira::Color::Lab
Note
Since the CIE XYZ color space is larger than the RGB space, some XYZ colors cannot be represented by a corresponding RGB color. Hence, a conversation to a RGB color may result in a RGB color that is out of bounds.

Constructor & Destructor Documentation

◆ XYZ() [1/2]

XYZ ( float  ix,
float  iy,
float  iz 
)
inline

Constructs color in CIE 1931 XYZ color space X: from 0 to 95.047 Y: from 0 to 100.000 Z: from 0 to 108.883.

◆ XYZ() [2/2]

XYZ ( )
inline

Default constructor Initializes X,Y, and Z with 0.0.

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

◆ toRGB()

virtual Color::RGB toRGB ( ) const
inlinevirtual

Converts the CIE XYZ color to RGB.

Note
Since the CIE XYZ color space is larger than the RGB space, the components of the resulting RGB color may be out of their valid ranges, i.e. some components may be negative or larger than 1.0. This happens, if a XYZ color cannot be represented by a RGB color. The range of the returned RGB color can be checked using the isInRange() method.

Implements ColorBase.

◆ 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

◆ x

float x

◆ y

float y

◆ z

float z

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