CVD::La< T > Class Template Reference
[Image storage and manipulation]

#include <la.h>

List of all members.


Detailed Description

template<typename T>
class CVD::La< T >

A colour consisting of luminance and alpha components.

Parameters:
T The datatype of each component

Definition at line 38 of file la.h.


Public Member Functions

 La ()
 La (T l, T a)
La< T > & operator= (const La< T > &c)
template<typename T2>
La< T > & operator= (const La< T2 > &c)
bool operator== (const La< T > &c) const
bool operator!= (const La< T > &c) const

Public Attributes

luminance
alpha

Related Functions

(Note that these are not member functions.)

template<typename T>
std::ostream & operator<< (std::ostream &os, const La< T > &x)
std::ostream & operator<< (std::ostream &os, const La< unsigned char > &x)

Constructor & Destructor Documentation

template<typename T>
CVD::La< T >::La (  )  [inline]

Default constructor. Does nothing.

Definition at line 42 of file la.h.

template<typename T>
CVD::La< T >::La ( l,
a 
) [inline]

Constructs a colour as specified.

Parameters:
l The luminance component
a The alpha component

Definition at line 46 of file la.h.


Member Function Documentation

template<typename T>
La<T>& CVD::La< T >::operator= ( const La< T > &  c  )  [inline]

Assignment operator.

Parameters:
c The colour to copy from

Definition at line 53 of file la.h.

References CVD::La< T >::alpha, and CVD::La< T >::luminance.

template<typename T>
template<typename T2>
La<T>& CVD::La< T >::operator= ( const La< T2 > &  c  )  [inline]

Assignment operator between two different storage types, using the standard casts as necessary.

Parameters:
c The colour to copy from

Definition at line 59 of file la.h.

References CVD::La< T >::alpha, and CVD::La< T >::luminance.

template<typename T>
bool CVD::La< T >::operator== ( const La< T > &  c  )  const [inline]

Logical equals operator.

Returns true if each component is the same.

Parameters:
c La to compare with

Definition at line 67 of file la.h.

References CVD::La< T >::alpha, and CVD::La< T >::luminance.

template<typename T>
bool CVD::La< T >::operator!= ( const La< T > &  c  )  const [inline]

Logical not-equals operator.

Returns true unless each component is the same.

Parameters:
c La to compare with

Definition at line 72 of file la.h.

References CVD::La< T >::alpha, and CVD::La< T >::luminance.


Friends And Related Function Documentation

template<typename T>
std::ostream & operator<< ( std::ostream &  os,
const La< T > &  x 
) [related]

Write the colour to a stream in the format "(luminance,alpha)".

Parameters:
os The stream
x The colour object

Definition at line 82 of file la.h.

template<typename T>
std::ostream & operator<< ( std::ostream &  os,
const La< unsigned char > &  x 
) [related]

Write the colour to a stream in the format "(luminance,alpha)".

Parameters:
os The stream
x The colour object

Definition at line 91 of file la.h.


Member Data Documentation

template<typename T>
T CVD::La< T >::luminance

The luminance component.

Definition at line 48 of file la.h.

Referenced by CVD::La< T >::operator!=(), CVD::La< T >::operator=(), and CVD::La< T >::operator==().

template<typename T>
T CVD::La< T >::alpha

The alpha component.

Definition at line 49 of file la.h.

Referenced by CVD::La< T >::operator!=(), CVD::La< T >::operator=(), and CVD::La< T >::operator==().


The documentation for this class was generated from the following file:
Generated on Wed Feb 18 10:23:07 2009 for CVD by  doxygen 1.5.3