DGtal  0.9.4beta
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
DGtal::RandomColorMap Class Reference

#include <DGtal/io/colormaps/RandomColorMap.h>

Collaboration diagram for DGtal::RandomColorMap:
[legend]

Public Types

typedef unsigned int Value
 

Public Member Functions

 RandomColorMap (const RandomColorMap &other)
 
RandomColorMapoperator= (const RandomColorMap &anOther)
 
 RandomColorMap (const unsigned int &aFirstIndex, const unsigned int &aLastIndex, const Color &aFirstColor=Color::White, const Color &aLastColor=Color::Red)
 
void addColor (const Color &aColor)
 
Color operator() (const unsigned int &aValue) const
 
const unsigned int & min () const
 
const unsigned int & max () const
 
 ~RandomColorMap ()
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Protected Member Functions

 RandomColorMap ()
 

Protected Attributes

unsigned int myMin
 
unsigned int myMax
 

Private Member Functions

void associateRandomIndexColor ()
 

Private Attributes

GradientColorMap< unsigned int > * myGradientMap
 
std::vector< unsigned int > myColorIndex
 
std::vector< unsigned int > myFreeColorIndex
 

Detailed Description

Aim: access to random color from a gradientColorMap.

Description of class 'RandomColorMap'

Definition at line 59 of file RandomColorMap.h.

Member Typedef Documentation

typedef unsigned int DGtal::RandomColorMap::Value

Definition at line 65 of file RandomColorMap.h.

Constructor & Destructor Documentation

DGtal::RandomColorMap::RandomColorMap ( const RandomColorMap other)

Copy constructor.

Parameters
otherthe object to clone. Forbidden by default.
DGtal::RandomColorMap::RandomColorMap ( const unsigned int &  aFirstIndex,
const unsigned int &  aLastIndex,
const Color aFirstColor = Color::White,
const Color aLastColor = Color::Red 
)

Constructor from two unsigned intergers and two Colors.

DGtal::RandomColorMap::~RandomColorMap ( )

Destructor.

DGtal::RandomColorMap::RandomColorMap ( )
protected

Constructor. Forbidden by default (protected to avoid g++ warnings).

Member Function Documentation

void DGtal::RandomColorMap::addColor ( const Color aColor)

Adds a color to the list of color steps.

Parameters
aColorA color.
void DGtal::RandomColorMap::associateRandomIndexColor ( )
private
bool DGtal::RandomColorMap::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
const unsigned int& DGtal::RandomColorMap::max ( ) const

Returns the upper bound of the value range.

Returns
The upper bound of the value range.
const unsigned int& DGtal::RandomColorMap::min ( ) const

Returns the lower bound of the value range.

Returns
The lower bound of the value range.
Color DGtal::RandomColorMap::operator() ( const unsigned int &  aValue) const

Computes the color associated with a value in a given range.

Parameters
aValueA value within the value range.
Returns
A random color identified by an unique [aValue] within the current range.
RandomColorMap& DGtal::RandomColorMap::operator= ( const RandomColorMap anOther)

Assignment.

Parameters
anOtherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.
void DGtal::RandomColorMap::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

std::vector<unsigned int> DGtal::RandomColorMap::myColorIndex
private

Definition at line 161 of file RandomColorMap.h.

std::vector<unsigned int> DGtal::RandomColorMap::myFreeColorIndex
private

Definition at line 162 of file RandomColorMap.h.

GradientColorMap<unsigned int>* DGtal::RandomColorMap::myGradientMap
private

Definition at line 160 of file RandomColorMap.h.

unsigned int DGtal::RandomColorMap::myMax
protected

The lower bound of the value range.

Definition at line 153 of file RandomColorMap.h.

unsigned int DGtal::RandomColorMap::myMin
protected

The lower bound of the value range.

Definition at line 152 of file RandomColorMap.h.


The documentation for this class was generated from the following file: