Public Member Functions | Protected Attributes | Static Private Attributes | List of all members
BinToOcean Class Reference

This class implements a value to nature colors. More...

#include <BinToOcean.h>

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

Public Member Functions

virtual bool acceptChangeColor () const
 Returns true if object can accept changing color,i.e. More...
 
 BinToOcean (const char *)
 The constructor. More...
 
 BinToOcean (const BinToOcean &)
 The copy constructor. More...
 
BinToColorclone () const
 Creates a copy of itself. More...
 
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. More...
 
const std::vector< double > & getControlPoints () const
 Returns a list of control points. More...
 
Range getRange () const
 Get the Range of expected values. More...
 
bool hasControlPoints () const
 Retruns true. More...
 
virtual bool isUserDefined () const
 Returns true if object can be user defined. More...
 
const std::string & name () const
 Returns the name of the value to color transform. More...
 
virtual void setControlPoints (const std::vector< double > &points)
 Set the value of the control points. More...
 
void setRange (const Range &r)
 Sets the range of the values passed. More...
 

Protected Attributes

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

Static Private Attributes

static int blues [256]
 
static int greens [256]
 
static int reds [256]
 

Detailed Description

This class implements a value to nature colors.

Author
Paul F. Kunz paul_.nosp@m.kunz.nosp@m.@slac.nosp@m..sta.nosp@m.nford.nosp@m..edu

Definition at line 26 of file BinToOcean.h.

Constructor & Destructor Documentation

◆ BinToOcean() [1/2]

BinToOcean ( const char *  name)

◆ BinToOcean() [2/2]

BinToOcean ( const BinToOcean bin_to_color)

The copy constructor.

Definition at line 86 of file BinToOcean.cxx.

Member Function Documentation

◆ acceptChangeColor()

bool acceptChangeColor ( ) const
virtualinherited

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 in BinToGamma, BinToLineStyle, BinToBlack, and BinToGreyScale.

Definition at line 94 of file BinToColor.cxx.

Referenced by BinToColor::isUserDefined().

◆ clone()

BinToColor * clone ( ) const
virtual

Creates a copy of itself.

Implements BinToColorMap.

Definition at line 91 of file BinToOcean.cxx.

References BinToOcean::BinToOcean().

◆ doubleToColor()

void doubleToColor ( double  value,
Color color 
) const
virtualinherited

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

Implements BinToColor.

Definition at line 70 of file BinToColorMap.cxx.

References BinToColorMap::m_blues, BinToColor::m_dv, BinToColorMap::m_gamma, BinToColorMap::m_greens, BinToColorMap::m_reds, BinToColor::m_vmin, and Color::setColor().

Referenced by BinToColorMap::~BinToColorMap().

◆ getControlPoints()

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, and BinToColor::setControlPoints().

Referenced by BinToColorXML::createElement(), and BinToColor::hasControlPoints().

◆ getRange()

Range getRange ( ) const
inherited

◆ hasControlPoints()

bool hasControlPoints ( ) const
virtualinherited

Retruns true.

Reimplemented from BinToColor.

Definition at line 30 of file BinToColorMap.cxx.

References BinToColorMap::setControlPoints().

Referenced by BinToColorMap::BinToColorMap().

◆ isUserDefined()

bool isUserDefined ( ) const
virtualinherited

Returns true if object can be user defined.

Returns true if value to color transform can be user defined. That is, the control points for the transform are editable. This base class implementation returns false.

Reimplemented in BinToUsrDefinedScale, and BinToGamma.

Definition at line 85 of file BinToColor.cxx.

References BinToColor::acceptChangeColor().

Referenced by BinToColor::setControlPoints().

◆ name()

const std::string& name ( ) const
inherited

Returns the name of the value to color transform.

◆ setControlPoints()

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 from BinToColor.

Definition at line 37 of file BinToColorMap.cxx.

References BinToColorMap::calcGamma(), and BinToColor::m_control_points.

Referenced by BinToColorMap::hasControlPoints().

◆ setRange()

void setRange ( const Range r)
inherited

Member Data Documentation

◆ blues

int blues
staticprivate
Initial value:
=
{ 141, 141, 153, 165, 177, 189, 202, 214, 214, 227, 239,
251, 246, 234, 222, 210, 198, 186, 175, 164, 153, 142, 132, 132, 122,
113, 104, 95, 87, 79, 72, 66, 59, 54, 49, 44, 40, 40, 37, 34, 32, 31,
30, 29, 30, 31, 32, 34, 37, 40, 44, 49, 49, 54, 59, 66, 72, 79, 87, 95,
104, 113, 122, 132, 142, 153, 164, 164, 175, 186, 198, 210, 222, 234,
246, 251, 239, 226, 214, 202, 189, 177, 177, 165, 153, 141, 129, 118,
107, 96, 85, 75, 65, 56, 47, 38, 30, 30, 22, 15, 9, 2, 2, 7, 12, 16, 19,
22, 24, 25, 26, 27, 27, 26, 25, 24, 22, 19, 16, 12, 7, 2, 2, 9, 15, 22,
30, 30, 38, 47, 56, 65, 75, 85, 96, 107, 118, 129, 141, 153, 165, 177,
177, 189, 202, 214, 227, 239, 251, 246, 234, 222, 210, 198, 186, 175,
164, 164, 153, 142, 132, 122, 113, 104, 95, 87, 79, 72, 66, 59, 54, 54,
49, 44, 40, 37, 34, 32, 31, 30, 29, 30, 31, 32, 34, 37, 37, 40, 44, 49,
54, 59, 66, 72, 79, 87, 95, 104, 113, 122, 132, 132, 142, 153, 164, 175,
186, 198, 210, 222, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
234, 234, 234, 234, 234, 0, 255, 255}

Definition at line 32 of file BinToOcean.h.

Referenced by BinToOcean::BinToOcean().

◆ greens

int greens
staticprivate
Initial value:
=
{ 67, 67, 67, 67, 67, 67, 67, 66, 66, 66, 65, 64, 64, 63,
62, 61, 60, 59, 57, 56, 55, 54, 53, 53, 52, 51, 49, 48, 47, 47, 46, 45,
44, 44, 44, 43, 43, 43, 43, 43, 44, 44, 45, 46, 47, 48, 50, 51, 53, 55,
57, 60, 60, 62, 65, 68, 71, 74, 78, 81, 85, 88, 92, 96, 100, 104, 108,
108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 151, 154, 158,
161, 161, 164, 166, 169, 171, 173, 175, 176, 178, 179, 180, 180, 180,
180, 180, 180, 179, 179, 178, 176, 175, 173, 171, 169, 166, 164, 161,
158, 155, 152, 152, 148, 145, 141, 138, 134, 131, 127, 124, 120, 117,
113, 110, 107, 104, 104, 101, 99, 97, 95, 93, 91, 90, 89, 88, 88, 88,
88, 88, 89, 89, 91, 92, 94, 96, 99, 102, 105, 109, 113, 117, 122, 127,
132, 137, 137, 142, 148, 154, 160, 166, 173, 179, 186, 192, 199, 205,
212, 218, 218, 225, 231, 237, 243, 248, 254, 251, 246, 241, 237, 233,
229, 226, 223, 223, 220, 218, 216, 215, 214, 213, 213, 214, 214, 216,
217, 219, 222, 224, 224, 228, 231, 235, 239, 244, 248, 253, 251, 246,
246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 0,
255, 255}

Definition at line 31 of file BinToOcean.h.

Referenced by BinToOcean::BinToOcean().

◆ m_blues

std::vector< int > m_blues
protectedinherited

◆ m_control_points

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().

◆ m_dv

double m_dv
protectedinherited

◆ m_greens

std::vector< int > m_greens
protectedinherited

◆ m_name

std::string m_name
protectedinherited

The name of this value transform.

Definition at line 36 of file BinToColor.h.

Referenced by BinToColor::name().

◆ m_reds

std::vector< int > m_reds
protectedinherited

◆ m_vmin

double m_vmin
protectedinherited

◆ reds

int reds
staticprivate
Initial value:
=
{ 54, 54, 59, 63, 68, 73, 77, 82, 82, 87, 91, 96, 100, 105,
110, 114, 119, 123, 127, 131, 135, 139, 143, 143, 147, 150, 154, 157,
160, 163, 165, 168, 170, 172, 174, 176, 177, 177, 179, 180, 180, 181,
181, 182, 181, 181, 180, 180, 179, 177, 176, 174, 174, 172, 170, 168,
165, 163, 160, 157, 154, 150, 147, 143, 139, 135, 131, 131, 127, 123,
119, 114, 110, 105, 100, 96, 91, 86, 82, 77, 73, 68, 68, 63, 59, 54, 50,
46, 42, 38, 34, 30, 26, 23, 19, 16, 13, 13, 13, 8, 5, 3, 1, 0, 2, 3, 5,
6, 6, 7, 7, 8, 8, 7, 7, 6, 6, 5, 3, 2, 0, 1, 3, 5, 8, 13, 13, 13, 16,
19, 23, 26, 30, 34, 38, 42, 46, 50, 54, 59, 63, 68, 68, 73, 77, 82, 87,
91, 96, 100, 105, 110, 114, 119, 123, 127, 131, 131, 135, 139, 143, 147,
150, 154, 157, 160, 163, 165, 168, 170, 172, 172, 174, 176, 177, 179,
180, 180, 181, 181, 182, 181, 181, 180, 180, 179, 179, 177, 176, 174,
172, 170, 168, 165, 163, 160, 157, 154, 150, 147, 143, 143, 139, 135,
131, 127, 123, 119, 114, 110, 105, 105, 105, 105, 105, 105, 105, 105,
105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
105, 105, 105, 105, 105, 105, 105, 0, 255, 255}

Definition at line 30 of file BinToOcean.h.

Referenced by BinToOcean::BinToOcean().


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

Generated for HippoDraw Class Library by doxygen