MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Protected Attributes | Friends
mds::img::CRGBA Class Reference

Structure encapsulating RGBA values. More...

#include <mdsRGBA.h>

Inheritance diagram for mds::img::CRGBA:
Inheritance graph
[legend]

List of all members.

Public Types

typedef mds::sys::tUInt8 tComponent
 Single RGBA component type.
typedef mds::sys::tUInt32 tRGBA
 RGBA represented as unsigned long.

Public Member Functions

const tComponenta () const
 Returns reference to the alpha component.
tComponenta ()
const tComponentb () const
 Returns reference to the blue component.
tComponentb ()
 CRGBA ()
 Default constructor.
 CRGBA (tComponent Red, tComponent Green, tComponent Blue, tComponent Alpha=255)
 Constructor.
 CRGBA (tRGBA Value)
 Constructor.
 CRGBA (const CRGBA &v)
 Copy constructor.
const tComponentg () const
 Returns reference to the green component.
tComponentg ()
const tComponentgetAlpha () const
 Returns reference to the alpha component.
tComponentgetAlpha ()
const tComponentgetBlue () const
 Returns reference to the blue component.
tComponentgetBlue ()
const tComponentgetGreen () const
 Returns reference to the green component.
tComponentgetGreen ()
const tComponentgetRed () const
 Returns reference to the red component.
tComponentgetRed ()
const tRGBAgetRGBA () const
 Returns reference to the all RGBA components.
tRGBAgetRGBA ()
CRGBAoperator= (CRGBA v)
 Assignment operators.
CRGBAoperator= (tRGBA v)
const tComponentr () const
 Returns reference to the red component.
tComponentr ()
const tRGBArgba () const
 Returns reference to the all RGBA components.
tRGBArgba ()
CRGBAset (tComponent Red, tComponent Green, tComponent Blue, tComponent Alpha=255)
 Changes component values.
CRGBAsetAlpha (tComponent Alpha)
CRGBAsetBlue (tComponent Blue)
CRGBAsetGreen (tComponent Green)
CRGBAsetRed (tComponent Red)
 Changes component value.

Protected Attributes

union {
   tComponent   m_Components [4]
 Separated RGBA components.
   tRGBA   m_rgba
 RGBa represented as a one unsigned long value.
}; 
 RGBA components.

Friends

bool operator!= (const CRGBA &l, const CRGBA &r)
bool operator== (const CRGBA &l, const CRGBA &r)
 Comparison operator.

Detailed Description

Structure encapsulating RGBA values.


Member Typedef Documentation

typedef mds::sys::tUInt8 mds::img::CRGBA::tComponent

Single RGBA component type.

typedef mds::sys::tUInt32 mds::img::CRGBA::tRGBA

RGBA represented as unsigned long.


Constructor & Destructor Documentation

Default constructor.

mds::img::CRGBA::CRGBA ( tComponent  Red,
tComponent  Green,
tComponent  Blue,
tComponent  Alpha = 255 
)

Constructor.

Constructor.

mds::img::CRGBA::CRGBA ( const CRGBA v)

Copy constructor.


Member Function Documentation

const tComponent& mds::img::CRGBA::a ( ) const

Returns reference to the alpha component.

const tComponent& mds::img::CRGBA::b ( ) const

Returns reference to the blue component.

const tComponent& mds::img::CRGBA::g ( ) const

Returns reference to the green component.

Returns reference to the alpha component.

Returns reference to the blue component.

Returns reference to the green component.

Returns reference to the red component.

const tRGBA& mds::img::CRGBA::getRGBA ( ) const

Returns reference to the all RGBA components.

CRGBA& mds::img::CRGBA::operator= ( CRGBA  v)

Assignment operators.

CRGBA& mds::img::CRGBA::operator= ( tRGBA  v)

Reimplemented in mds::img::CRGBPixel, and mds::img::CColor.

const tComponent& mds::img::CRGBA::r ( ) const

Returns reference to the red component.

const tRGBA& mds::img::CRGBA::rgba ( ) const

Returns reference to the all RGBA components.

CRGBA& mds::img::CRGBA::set ( tComponent  Red,
tComponent  Green,
tComponent  Blue,
tComponent  Alpha = 255 
)

Changes component values.

Changes component value.


Friends And Related Function Documentation

bool operator!= ( const CRGBA l,
const CRGBA r 
) [friend]
bool operator== ( const CRGBA l,
const CRGBA r 
) [friend]

Comparison operator.


Member Data Documentation

union { ... } [protected]

RGBA components.

Separated RGBA components.

RGBa represented as a one unsigned long value.


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