ColorMap Class Reference

Simple colormaps with N colors. More...

#include <Image/ColorMap.H>

Inheritance diagram for ColorMap:
Inheritance graph
[legend]
Collaboration diagram for ColorMap:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ColorMap ()
 Default constructor (empty colormap).
 ColorMap (const int n)
 Default constructor (uninitialized color values, n entries).
 ColorMap (const Image< PixRGB< byte > > &cmap)
 Build from an Image of pixels (used by the pseudo-constructors).
virtual ~ColorMap ()
 Destructor.

Static Public Member Functions

static ColorMap GREY (const int n=256)
 Pseudo-constructor for a greyscale with n entries.
static ColorMap GRADIENT (const PixRGB< byte > &from, const PixRGB< byte > &to, const int n=256)
 Pseudo-constructor for a transition from 'from' to 'to' with n entries.
static ColorMap JET (const int n=256)
 Pseudo-constructor for "jet" colormap a la matlab.
static ColorMap LINES (const int n=256)
 Pseudo-constructor for "lines" colormap a la matlab.

Detailed Description

Simple colormaps with N colors.

ColorMap derives from Image< PixRGB<byte> > and hence inherits all the associated functions. Here we just provide a bunch of constructors. A ColorMap then is merely an Image< PixRGB<byte> > of width N and height 1.

Definition at line 49 of file ColorMap.H.


Constructor & Destructor Documentation

ColorMap::ColorMap (  ) 

Default constructor (empty colormap).

Definition at line 47 of file ColorMap.C.

Referenced by GRADIENT(), GREY(), JET(), and LINES().

ColorMap::ColorMap ( const int  n  ) 

Default constructor (uninitialized color values, n entries).

Definition at line 52 of file ColorMap.C.

ColorMap::ColorMap ( const Image< PixRGB< byte > > &  cmap  ) 

Build from an Image of pixels (used by the pseudo-constructors).

Will throw a fatal error if cmap has height != 1

Definition at line 57 of file ColorMap.C.

References Image< PixRGB< byte > >::getHeight().

ColorMap::~ColorMap (  )  [virtual]

Destructor.

Definition at line 64 of file ColorMap.C.


Member Function Documentation

ColorMap ColorMap::GRADIENT ( const PixRGB< byte > &  from,
const PixRGB< byte > &  to,
const int  n = 256 
) [static]

Pseudo-constructor for a transition from 'from' to 'to' with n entries.

Definition at line 78 of file ColorMap.C.

References Image< T >::beginw(), ColorMap(), and NO_INIT.

ColorMap ColorMap::GREY ( const int  n = 256  )  [static]

Pseudo-constructor for a greyscale with n entries.

Definition at line 68 of file ColorMap.C.

References Image< T >::beginw(), ColorMap(), and NO_INIT.

ColorMap ColorMap::JET ( const int  n = 256  )  [static]

Pseudo-constructor for "jet" colormap a la matlab.

Definition at line 93 of file ColorMap.C.

References Image< T >::beginw(), ColorMap(), and NO_INIT.

ColorMap ColorMap::LINES ( const int  n = 256  )  [static]

Pseudo-constructor for "lines" colormap a la matlab.

Definition at line 140 of file ColorMap.C.

References Image< T >::beginw(), ColorMap(), and NO_INIT.


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:16 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3