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

Plot::RGBPixel< Component > Class Template Reference

#include <pixel.h>

Inheritance diagram for Plot::RGBPixel< Component >:

Inheritance graph
[legend]
Collaboration diagram for Plot::RGBPixel< Component >:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Red,Green,Blue image Pixel.

Definition at line 72 of file pixel.h.

Public Methods

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

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

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

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

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

 RGBPixel (const self &other)
 Copy constructor.

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

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

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

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

Functions written in terms of the public access functions
std::ostream & put (std::ostream &s) const
 Writes a readable representation to a stream.

self operator+ (const self &o)
 Binary addition of RGBPixel values.

template<class OutputType> void write_binary (std::ostream &s, OutputType max_val) const
 Writes raw data to a binary file.


Constructor & Destructor Documentation

template<class Component = Pixel::IComponent>
Plot::RGBPixel< Component >::RGBPixel FComponent    value [inline]
 

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 88 of file pixel.h.

template<class Component>
template<class OComponent, class OHComponent>
Plot::RGBPixel< Component >::RGBPixel 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 219 of file pixel.h.


Member Function Documentation

template<class Component = Pixel::IComponent>
template<class OutputType>
void Plot::RGBPixel< Component >::write_binary std::ostream &    s,
OutputType    max_val
const [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 137 of file pixel.h.

References Plot::RGBPixel< Component >::blue(), Plot::RGBPixel< Component >::green(), and Plot::RGBPixel< Component >::red().


The documentation for this class was generated from the following file:
Generated on Mon Jan 20 02:37:43 2003 for RF-LISSOM by doxygen1.3-rc2