Public Member Functions | Protected Attributes | List of all members
BinToGamma Class Reference

The class derived from the BinToColor class. More...

#include <BinToGamma.h>

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

Public Member Functions

virtual bool acceptChangeColor () const
 Returns true if object can accept changing color,i.e.
 BinToGamma (const char *name)
 The constructor.
 BinToGamma (const std::string &model_name)
 Another constructor with control points specified.
 BinToGamma (const BinToGamma &)
 The copy constructor.
BinToColorclone () const
 Creates a copy of itself.
virtual void doubleToColor (double value, Color &color) const
 This function does the actual calculation that transforms the given value into a color using the current Range.
const std::vector< double > & getControlPoints () const
 Returns a list of control points.
Range getRange () const
 Get the Range of expected values.
virtual bool hasControlPoints () const
 Returns true.
virtual bool isUserDefined () const
 Returns true.
const std::string & name () const
 Returns the name of the value to color transform.
virtual void setControlPoints (const std::vector< double > &points)
 Set the value of the control points.
void setRange (const Range &r)
 Sets the range of the values passed.

Protected Attributes

std::vector< double > m_control_points
 A set of control points that might be used for the value to color transform.
double m_dv
 The distance of the expected values, i.e.
std::string m_name
 The name of this value transform.
double m_vmin
 The minimum value expected.

Detailed Description

The class derived from the BinToColor class.

The BinToColor class implements the transformation of a value to a color which belongs to a grey scale with gamma correction. If gamma value is equal to 1, this will reduce to Grey Scale.

Author
Tao Xu taox@.nosp@m.stan.nosp@m.ford..nosp@m.edu

Definition at line 29 of file BinToGamma.h.

Constructor & Destructor Documentation

BinToGamma ( const char *  name)

The constructor.

Definition at line 22 of file BinToGamma.cxx.

References BinToColor::m_control_points.

Referenced by BinToGamma::clone().

BinToGamma ( const std::string &  model_name)

Another constructor with control points specified.

BinToGamma ( const BinToGamma bin_to_color)

The copy constructor.

Definition at line 29 of file BinToGamma.cxx.

Member Function Documentation

bool acceptChangeColor ( ) const
virtual

Returns true if object can accept changing color,i.e.

enable the "Change color" button in plot inspector tabbed panel within inspector. Reimplemented in BinToBlack and BinToGreyScale. The base class implementation returns false.

Reimplemented from BinToColor.

Definition at line 85 of file BinToGamma.cxx.

BinToColor * clone ( ) const
virtual

Creates a copy of itself.

Implements BinToColor.

Definition at line 34 of file BinToGamma.cxx.

References BinToGamma::BinToGamma().

void doubleToColor ( double  value,
Color color 
) const
virtual

This function does the actual calculation that transforms the given value into a color using the current Range.

Implements BinToColor.

Definition at line 42 of file BinToGamma.cxx.

References Color::getBlue(), Color::getGreen(), Color::getRed(), BinToColor::m_control_points, BinToColor::m_dv, BinToColor::m_vmin, and Color::setColor().

const std::vector< double > & getControlPoints ( ) const
inherited

Returns a list of control points.

If a derived class has control points to vary the transform of value to color returns the list of control points. Otherwise, the returned list is empty.

Definition at line 71 of file BinToColor.cxx.

References BinToColor::m_control_points.

Referenced by BinToColorXML::createElement().

Range getRange ( ) const
inherited

Get the Range of expected values.

Definition at line 55 of file BinToColor.cxx.

References BinToColor::m_dv, and BinToColor::m_vmin.

Referenced by ContourPointRep::createContours(), and AxisRepColor::drawColorScale().

bool hasControlPoints ( ) const
virtual

Returns true.

Returns true as this class has control points with which the gamma value can be varied.

Reimplemented from BinToColor.

Definition at line 71 of file BinToGamma.cxx.

bool isUserDefined ( ) const
virtual

Returns true.

Reimplemented from BinToColor.

Definition at line 78 of file BinToGamma.cxx.

const std::string & name ( ) const
inherited

Returns the name of the value to color transform.

Reimplemented in BinToColorMap.

Definition at line 42 of file BinToColor.cxx.

References BinToColor::m_name.

Referenced by BinToColorXML::createElement(), ContourPointRep::drawProjectedValues(), and DisplayController::saveValueCtrlPts().

void setControlPoints ( const std::vector< double > &  points)
virtualinherited

Set the value of the control points.

Interpretation of control points is left to derived classes.

Reimplemented in BinToColorMap.

Definition at line 78 of file BinToColor.cxx.

References BinToColor::m_control_points.

void setRange ( const Range r)
inherited

Member Data Documentation

std::vector< double > m_control_points
protectedinherited

A set of control points that might be used for the value to color transform.

Note
This vector is declared in the base class so that the implementation of getControlPoints in this base class can return an empty vector, otherwise some compilers would flag an error for not returning anything.

Definition at line 46 of file BinToColor.h.

Referenced by BinToColor::BinToColor(), BinToColorMap::BinToColorMap(), BinToColorScaleMovingBrkPt::BinToColorScaleMovingBrkPt(), BinToGamma::BinToGamma(), BinToMovingBrkPt::BinToMovingBrkPt(), BinToUsrDefinedScale::BinToUsrDefinedScale(), BinToColorMap::calcGamma(), BinToGamma::doubleToColor(), BinToMovingBrkPt::doubleToColor(), BinToUsrDefinedScale::doubleToColor(), BinToColorScaleMovingBrkPt::doubleToColor(), BinToColor::getControlPoints(), BinToColorMap::setControlPoints(), and BinToColor::setControlPoints().

double m_dv
protectedinherited
std::string m_name
protectedinherited

The name of this value transform.

Definition at line 36 of file BinToColor.h.

Referenced by BinToColor::name().

double m_vmin
protectedinherited

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

Generated for HippoDraw Class Library by doxygen