InterpolatedColorMap Class Reference

#include <InterpolatedColorMap.hpp>

Collaboration diagram for InterpolatedColorMap:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class represents a 2d pixel map of colors.

Each color is represented by an index into the given palette.

Definition at line 42 of file InterpolatedColorMap.hpp.

Public Member Functions

 InterpolatedColorMap ()
 Default constructor.
 InterpolatedColorMap (int icols, int irows, const Palette &pp, double base=0.0)
 Constructor.
 InterpolatedColorMap (const InterpolatedColorMap &o)
 Copy constructor.
 ~InterpolatedColorMap ()
 Destructor.
InterpolatedColorMapoperator= (InterpolatedColorMap o)
 Copy operator.
void setColor (int row, int col, double f)
 Set the color at a row and column.
Color get (int row, int col) const
 Get the color at a row and column.
double getIndex (int row, int col) const
 Get the color index at a row and column.
int getCols () const
 Get the cols of the map.
int getRows () const
 Get the rows of the map.
const Palette getPalette () const
 Get Palette.

Protected Member Functions

void init (int icols, int irows)
 Initialization helper.
void reset ()
 Reset helper.

Protected Attributes

int cols
 Width of the map.
int rows
 Height of the map.
Palette p
 The color palette.
double ** c
 Index array.


Constructor & Destructor Documentation

InterpolatedColorMap  )  [inline]
 

Default constructor.

Definition at line 48 of file InterpolatedColorMap.hpp.

InterpolatedColorMap int  icols,
int  irows,
const Palette pp,
double  base = 0.0
 

Constructor.

Parameters:
icols Width of the map
irows Height of the map
pp Palette to use
base Base color for the map to be initialized to

InterpolatedColorMap const InterpolatedColorMap o  ) 
 

Copy constructor.

~InterpolatedColorMap  )  [inline]
 

Destructor.

Definition at line 67 of file InterpolatedColorMap.hpp.


Member Function Documentation

Color get int  row,
int  col
const [inline]
 

Get the color at a row and column.

Definition at line 90 of file InterpolatedColorMap.hpp.

Referenced by PSImageBase::bitmap().

int getCols  )  const [inline]
 

Get the cols of the map.

Definition at line 96 of file InterpolatedColorMap.hpp.

Referenced by PSImageBase::bitmap(), PNG::cost_constant(), PNG::cost_indexed(), and PNG::data().

double getIndex int  row,
int  col
const [inline]
 

Get the color index at a row and column.

Definition at line 93 of file InterpolatedColorMap.hpp.

Referenced by PNG::data(), and SurfacePlot::get().

const Palette getPalette  )  const [inline]
 

Get Palette.

Definition at line 102 of file InterpolatedColorMap.hpp.

Referenced by PNG::plte().

int getRows  )  const [inline]
 

Get the rows of the map.

Definition at line 99 of file InterpolatedColorMap.hpp.

Referenced by PSImageBase::bitmap(), PNG::cost_constant(), PNG::cost_indexed(), and PNG::data().

void init int  icols,
int  irows
[protected]
 

Initialization helper.

InterpolatedColorMap& operator= InterpolatedColorMap  o  ) 
 

Copy operator.

This is in replacement for operators like:

  • InterpolatedColorMap& operator=(const InterpolatedColorMap& o);

As this is what happens:

 InterpolatedColorMap ic(...);  
 ...; //init ic
 InterpolatedColorMap c;
 c = ic; // c.operator=(ic);
 InterpolatedColorMap c2 = ic // c2(ic);

void reset  )  [protected]
 

Reset helper.

void setColor int  row,
int  col,
double  f
[inline]
 

Set the color at a row and column.

Definition at line 87 of file InterpolatedColorMap.hpp.

Referenced by SurfacePlot::set().


Member Data Documentation

double** c [protected]
 

Index array.

Definition at line 121 of file InterpolatedColorMap.hpp.

int cols [protected]
 

Width of the map.

Definition at line 112 of file InterpolatedColorMap.hpp.

Palette p [protected]
 

The color palette.

Definition at line 118 of file InterpolatedColorMap.hpp.

int rows [protected]
 

Height of the map.

Definition at line 115 of file InterpolatedColorMap.hpp.


The documentation for this class was generated from the following file:
Generated on Sat May 18 03:31:33 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1