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

RGB pixel definition. More...

#include <mdsPixelTypes.h>

Inheritance diagram for mds::img::CRGBPixel:
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 ()
 CRGBPixel ()
 Default constructor.
 CRGBPixel (tComponent Red, tComponent Green, tComponent Blue)
 Constructor.
 CRGBPixel (tRGBA Pixel)
 Constructor.
 CRGBPixel (const CRGBPixel &Pixel)
 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 ()
CRGBPixeloperator*= (const CRGBPixel &p)
 Component wise multiplication.
CRGBPixeloperator*= (double Value)
 Mutliplies all components by scalar.
CRGBPixeloperator+= (const CRGBPixel &p)
 Component wise addition.
CRGBPixeloperator+= (tComponent c)
 Adds scalar to all components.
CRGBPixeloperator-= (const CRGBPixel &p)
 Component wise subtraction.
CRGBPixeloperator-= (tComponent c)
 Subtracts scalar from all components.
CRGBPixeloperator/= (const CRGBPixel &p)
 Component wise division.
CRGBPixeloperator/= (double Value)
 Divides all components by scalar.
CRGBPixeloperator= (CRGBPixel Pixel)
 Assignment operator.
CRGBPixeloperator= (tRGBA Pixel)
 Assignment operator.
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

RGB pixel definition.


Member Typedef Documentation

typedef mds::sys::tUInt8 mds::img::CRGBA::tComponent [inherited]

Single RGBA component type.

typedef mds::sys::tUInt32 mds::img::CRGBA::tRGBA [inherited]

RGBA represented as unsigned long.


Constructor & Destructor Documentation

Default constructor.

Constructor.

  • Separated RGB color components

Constructor.

  • RGB pixel.

Copy constructor.


Member Function Documentation

const tComponent& mds::img::CRGBA::a ( ) const [inherited]

Returns reference to the alpha component.

tComponent& mds::img::CRGBA::a ( ) [inherited]
const tComponent& mds::img::CRGBA::b ( ) const [inherited]

Returns reference to the blue component.

tComponent& mds::img::CRGBA::b ( ) [inherited]
const tComponent& mds::img::CRGBA::g ( ) const [inherited]

Returns reference to the green component.

tComponent& mds::img::CRGBA::g ( ) [inherited]
const tComponent& mds::img::CRGBA::getAlpha ( ) const [inherited]

Returns reference to the alpha component.

const tComponent& mds::img::CRGBA::getBlue ( ) const [inherited]

Returns reference to the blue component.

const tComponent& mds::img::CRGBA::getGreen ( ) const [inherited]

Returns reference to the green component.

const tComponent& mds::img::CRGBA::getRed ( ) const [inherited]

Returns reference to the red component.

const tRGBA& mds::img::CRGBA::getRGBA ( ) const [inherited]

Returns reference to the all RGBA components.

tRGBA& mds::img::CRGBA::getRGBA ( ) [inherited]
CRGBPixel& mds::img::CRGBPixel::operator*= ( const CRGBPixel p)

Component wise multiplication.

CRGBPixel& mds::img::CRGBPixel::operator*= ( double  Value)

Mutliplies all components by scalar.

CRGBPixel& mds::img::CRGBPixel::operator+= ( const CRGBPixel p)

Component wise addition.

CRGBPixel& mds::img::CRGBPixel::operator+= ( tComponent  c)

Adds scalar to all components.

CRGBPixel& mds::img::CRGBPixel::operator-= ( const CRGBPixel p)

Component wise subtraction.

CRGBPixel& mds::img::CRGBPixel::operator-= ( tComponent  c)

Subtracts scalar from all components.

CRGBPixel& mds::img::CRGBPixel::operator/= ( const CRGBPixel p)

Component wise division.

CRGBPixel& mds::img::CRGBPixel::operator/= ( double  Value)

Divides all components by scalar.

CRGBPixel& mds::img::CRGBPixel::operator= ( CRGBPixel  Pixel)

Assignment operator.

CRGBPixel& mds::img::CRGBPixel::operator= ( tRGBA  Pixel)

Assignment operator.

Reimplemented from mds::img::CRGBA.

const tComponent& mds::img::CRGBA::r ( ) const [inherited]

Returns reference to the red component.

tComponent& mds::img::CRGBA::r ( ) [inherited]
const tRGBA& mds::img::CRGBA::rgba ( ) const [inherited]

Returns reference to the all RGBA components.

tRGBA& mds::img::CRGBA::rgba ( ) [inherited]
CRGBA& mds::img::CRGBA::set ( tComponent  Red,
tComponent  Green,
tComponent  Blue,
tComponent  Alpha = 255 
) [inherited]

Changes component values.

CRGBA& mds::img::CRGBA::setAlpha ( tComponent  Alpha) [inherited]
CRGBA& mds::img::CRGBA::setBlue ( tComponent  Blue) [inherited]
CRGBA& mds::img::CRGBA::setGreen ( tComponent  Green) [inherited]
CRGBA& mds::img::CRGBA::setRed ( tComponent  Red) [inherited]

Changes component value.


Friends And Related Function Documentation

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

Comparison operator.


Member Data Documentation

union { ... } [protected, inherited]

RGBA components.

Separated RGBA components.

RGBa represented as a one unsigned long value.


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