Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Plot::RGBPixel Template Class Reference

Red,Green,Blue image Pixel. More...

#include <pixel.h>

Inheritance diagram for Plot::RGBPixel

Inheritance graph

[legend]
Collaboration diagram for Plot::RGBPixel:

Collaboration graph

[legend]
List of all members.

Functions written in terms of the public access functions

template<classOutputType> void write_binary<OutputType> (ostream& s, OutputType max_val)
 Writes raw data to a binary file. More...

template<classOComponent> ostream& operator<<<OComponent> (ostream& s, const RGBPixel<OComponent>& o)
 Writes a readable representation to a stream.

template<classOComponent> RGBPixel<OComponent> operator+<OComponent> (const RGBPixel<OComponent>& A, const RGBPixel<OComponent>& B)
 Writes raw data to a binary file. More...


Public Methods

self operator+= (const self &B)
 Unary addition. More...

self& operator *= (const Bounded::LargeFloat m)
 Multiplicative scaling. More...

Constructors and destructors
 RGBPixel ()
 Default constructor; pixel remains transparent. More...

 RGBPixel (FComponent value)
 Constructor taking a single greyscale value (required by some matrix types). More...

 RGBPixel (FComponent red, FComponent green, FComponent blue, bool visible=true)
 Constructor taking floating-point RGB triple. More...

 RGBPixel (const self& other)
 Copy constructor. More...

template<classOComponent, classOHComponent>  RGBPixel<OComponent, OHComponent> (const HSVPixel<OComponent,OHComponent>& O)
 Constructor for an RGBPixel from an HSVPixel. More...

Access functions for the components of the pixel
Bounded::Magnitude red () const
 Returns the red component on a scale [0.0,1.0]. More...

Bounded::Magnitude green () const
 Returns the green component on a scale [0.0,1.0]. More...

Bounded::Magnitude blue () const
 Returns the blue component on a scale [0.0,1.0]. More...


Detailed Description

template<class Component = Pixel::IComponent> template class Plot::RGBPixel

Red,Green,Blue image Pixel.

Definition at line 70 of file pixel.h.


Constructor & Destructor Documentation

template<classComponent = Pixel::IComponent>
Plot::RGBPixel<Component>::RGBPixel<Component> ( )
 

Default constructor; pixel remains transparent.

Definition at line 78 of file pixel.h.

template<classComponent = Pixel::IComponent>
Plot::RGBPixel<Component>::RGBPixel<Component> ( FComponent value )
 

Constructor taking a single greyscale value (required by some matrix types).

The pixel remains transparent, although it's unclear (no pun intended) if that's appropriate.

Definition at line 86 of file pixel.h.

template<classComponent = Pixel::IComponent>
Plot::RGBPixel<Component>::RGBPixel<Component> ( FComponent red,
FComponent green,
FComponent blue,
bool visible = true )
 

Constructor taking floating-point RGB triple.

Definition at line 89 of file pixel.h.

template<classComponent = Pixel::IComponent>
Plot::RGBPixel<Component>::RGBPixel<Component> ( const self & other )
 

Copy constructor.

Definition at line 93 of file pixel.h.

template<classComponent>
template<classOComponent, classOHComponent>
Plot::RGBPixel< Component >::RGBPixel<Component> ( const HSVPixel< OComponent,OHComponent >& other )
 

Constructor for an RGBPixel from an HSVPixel.

Algorithm is from _Computer_Graphics_, 2nd Ed., Foley et al, 1990, except Hue modified to lie in [0,1] instead of [0,360].

Definition at line 218 of file pixel.h.


Member Function Documentation

template<classComponent = Pixel::IComponent>
Bounded::Magnitude Plot::RGBPixel<Component>::blue ( ) const [inline]
 

Returns the blue component on a scale [0.0,1.0].

Definition at line 105 of file pixel.h.

template<classComponent = Pixel::IComponent>
Bounded::Magnitude Plot::RGBPixel<Component>::green ( ) const [inline]
 

Returns the green component on a scale [0.0,1.0].

Definition at line 104 of file pixel.h.

template<classComponent = Pixel::IComponent>
self & Plot::RGBPixel<Component>::operator *= ( const Bounded::LargeFloat m ) [inline]
 

Multiplicative scaling.

Definition at line 113 of file pixel.h.

template<classComponent = Pixel::IComponent>
self Plot::RGBPixel<Component>::operator+= ( const self & B ) [inline]
 

Unary addition.

Definition at line 109 of file pixel.h.

template<classComponent = Pixel::IComponent>
Bounded::Magnitude Plot::RGBPixel<Component>::red ( ) const [inline]
 

Returns the red component on a scale [0.0,1.0].

Definition at line 103 of file pixel.h.

template<classComponent = Pixel::IComponent>
template<classOutputType>
void Plot::RGBPixel<Component>::write_binary ( ostream & s,
OutputType max_val ) [inline]
 

Writes raw data to a binary file.

You must ensure that the max_val is of the type you want the output to use.

Definition at line 129 of file pixel.h.


Friends And Related Function Documentation

template<classComponent = Pixel::IComponent>
template<classOComponent>
RGBPixel< OComponent > operator+<OComponent> ( const RGBPixel< OComponent >& A,
const RGBPixel< OComponent >& B ) [friend]
 

Writes raw data to a binary file.

You must ensure that the max_val is of the type you want the output to use.


The documentation for this class was generated from the following file:
Generated at Mon Aug 21 00:31:25 2000 for RF-LISSOM by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000