ColourMapper Class Reference

#include <ColourMapper.h>

List of all members.


Detailed Description

A class for mapping intensity values onto various colour maps.

Definition at line 27 of file ColourMapper.h.

Public Types

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

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


Member Enumeration Documentation

enum ColourMapper::StandardMap

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

Definition at line 35 of file ColourMapper.h.


Constructor & Destructor Documentation

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

Definition at line 22 of file ColourMapper.cpp.

References m_max, and m_min.

ColourMapper::~ColourMapper (  )  [virtual]

Definition at line 35 of file ColourMapper.cpp.


Member Function Documentation

int ColourMapper::getMap (  )  const [inline]

Definition at line 49 of file ColourMapper.h.

References m_map.

float ColourMapper::getMinValue (  )  const [inline]

Definition at line 50 of file ColourMapper.h.

References m_min.

float ColourMapper::getMaxValue (  )  const [inline]

Definition at line 51 of file ColourMapper.h.

References m_max.

int ColourMapper::getColourMapCount (  )  [static]

Definition at line 40 of file ColourMapper.cpp.

Referenced by getColourMapName(), getContrastingColour(), TimeValueLayer::getPropertyRangeAndValue(), SpectrogramLayer::getPropertyRangeAndValue(), SliceLayer::getPropertyRangeAndValue(), Colour3DPlotLayer::getPropertyRangeAndValue(), hasLightBackground(), and map().

QString ColourMapper::getColourMapName ( int  n  )  [static]

Definition at line 46 of file ColourMapper.cpp.

References Banded, BlackOnWhite, BlueOnBlack, DefaultColours, FruitSalad, getColourMapCount(), Highlight, map(), Printer, RedOnBlue, Sunset, WhiteOnBlack, and YellowOnBlack.

Referenced by TimeValueLayer::getPropertyValueLabel(), SpectrogramLayer::getPropertyValueLabel(), SliceLayer::getPropertyValueLabel(), and Colour3DPlotLayer::getPropertyValueLabel().

QColor ColourMapper::map ( float  value  )  const

Definition at line 69 of file ColourMapper.cpp.

References Banded, BlackOnWhite, BlueOnBlack, DefaultColours, FruitSalad, getColourMapCount(), Highlight, m_map, m_max, m_min, Printer, RedOnBlue, Sunset, WhiteOnBlack, and YellowOnBlack.

Referenced by Colour3DPlotLayer::fillCache(), getColourMapName(), getContrastingColour(), hasLightBackground(), SpectrogramLayer::initialisePalette(), SpectrumLayer::paint(), and SliceLayer::paint().

QColor ColourMapper::getContrastingColour (  )  const

Definition at line 193 of file ColourMapper.cpp.

References Banded, BlackOnWhite, BlueOnBlack, DefaultColours, FruitSalad, getColourMapCount(), Highlight, m_map, map(), Printer, RedOnBlue, Sunset, WhiteOnBlack, and YellowOnBlack.

Referenced by SpectrogramLayer::initialisePalette(), and SpectrumLayer::paintCrosshairs().

bool ColourMapper::hasLightBackground (  )  const

Definition at line 238 of file ColourMapper.cpp.

References BlackOnWhite, getColourMapCount(), m_map, map(), and Printer.


Member Data Documentation

int ColourMapper::m_map [protected]

Definition at line 62 of file ColourMapper.h.

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

float ColourMapper::m_min [protected]

Definition at line 63 of file ColourMapper.h.

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

float ColourMapper::m_max [protected]

Definition at line 64 of file ColourMapper.h.

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


The documentation for this class was generated from the following files:
Generated on Wed Feb 20 15:45:32 2008 for SonicVisualiser by  doxygen 1.5.1