svgui  1.9
ColourMapper Class Reference

A class for mapping intensity values onto various colour maps. More...

#include <ColourMapper.h>

List of all members.

Public Types

enum  StandardMap {
  DefaultColours, Sunset, WhiteOnBlack, BlackOnWhite,
  RedOnBlue, YellowOnBlack, BlueOnBlack, FruitSalad,
  Banded, Highlight, Printer, HighGain
}

Public Member Functions

 ColourMapper (int map, float minValue, float maxValue)
virtual ~ColourMapper ()
int getMap () const
float getMinValue () const
float getMaxValue () const
QColor map (float value) const
QColor getContrastingColour () const
bool hasLightBackground () const

Static Public Member Functions

static int getColourMapCount ()
static QString getColourMapName (int n)

Protected Attributes

int m_map
float m_min
float m_max

Detailed Description

A class for mapping intensity values onto various colour maps.

Definition at line 27 of file ColourMapper.h.


Member Enumeration Documentation

Enumerator:
DefaultColours 
Sunset 
WhiteOnBlack 
BlackOnWhite 
RedOnBlue 
YellowOnBlack 
BlueOnBlack 
FruitSalad 
Banded 
Highlight 
Printer 
HighGain 

Definition at line 35 of file ColourMapper.h.


Constructor & Destructor Documentation

ColourMapper::ColourMapper ( int  map,
float  minValue,
float  maxValue 
)

Definition at line 24 of file ColourMapper.cpp.

References m_max, and m_min.

Definition at line 37 of file ColourMapper.cpp.


Member Function Documentation

int ColourMapper::getMap ( ) const [inline]

Definition at line 50 of file ColourMapper.h.

References m_map.

float ColourMapper::getMinValue ( ) const [inline]

Definition at line 51 of file ColourMapper.h.

References m_min.

float ColourMapper::getMaxValue ( ) const [inline]

Definition at line 52 of file ColourMapper.h.

References m_max.


Member Data Documentation

int ColourMapper::m_map [protected]

Definition at line 63 of file ColourMapper.h.

Referenced by getContrastingColour(), getMap(), hasLightBackground(), and map().

float ColourMapper::m_min [protected]

Definition at line 64 of file ColourMapper.h.

Referenced by ColourMapper(), getMinValue(), and map().

float ColourMapper::m_max [protected]

Definition at line 65 of file ColourMapper.h.

Referenced by ColourMapper(), getMaxValue(), and map().


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