|
svgui
1.9
|
A class for mapping intensity values onto various colour maps. More...
#include <ColourMapper.h>


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 |
A class for mapping intensity values onto various colour maps.
Definition at line 27 of file ColourMapper.h.
| Enumerator | |
|---|---|
| DefaultColours | |
| Sunset | |
| WhiteOnBlack | |
| BlackOnWhite | |
| RedOnBlue | |
| YellowOnBlack | |
| BlueOnBlack | |
| FruitSalad | |
| Banded | |
| Highlight | |
| Printer | |
| HighGain | |
Definition at line 35 of file ColourMapper.h.
| ColourMapper::ColourMapper | ( | int | map, |
| float | minValue, | ||
| float | maxValue | ||
| ) |
Definition at line 24 of file ColourMapper.cpp.
|
virtual |
Definition at line 37 of file ColourMapper.cpp.
|
inline |
Definition at line 50 of file ColourMapper.h.
References m_map.
|
inline |
Definition at line 51 of file ColourMapper.h.
References m_min.
|
inline |
Definition at line 52 of file ColourMapper.h.
References m_max.
|
static |
Definition at line 42 of file ColourMapper.cpp.
Referenced by getColourMapName(), getContrastingColour(), SliceLayer::getPropertyRangeAndValue(), Colour3DPlotLayer::getPropertyRangeAndValue(), TimeValueLayer::getPropertyRangeAndValue(), RegionLayer::getPropertyRangeAndValue(), SpectrogramLayer::getPropertyRangeAndValue(), hasLightBackground(), and map().
|
static |
Definition at line 48 of file ColourMapper.cpp.
References Banded, BlackOnWhite, BlueOnBlack, DefaultColours, FruitSalad, getColourMapCount(), HighGain, Highlight, map(), Printer, RedOnBlue, Sunset, WhiteOnBlack, and YellowOnBlack.
Referenced by SliceLayer::getPropertyValueLabel(), Colour3DPlotLayer::getPropertyValueLabel(), TimeValueLayer::getPropertyValueLabel(), RegionLayer::getPropertyValueLabel(), and SpectrogramLayer::getPropertyValueLabel().
| QColor ColourMapper::map | ( | float | value | ) | const |
Definition at line 72 of file ColourMapper.cpp.
References Banded, BlackOnWhite, BlueOnBlack, DefaultColours, FruitSalad, getColourMapCount(), HighGain, Highlight, m_map, m_max, m_min, Printer, RedOnBlue, Sunset, WhiteOnBlack, and YellowOnBlack.
Referenced by Colour3DPlotLayer::fillCache(), RegionLayer::getColourForValue(), TimeValueLayer::getColourForValue(), getColourMapName(), getContrastingColour(), hasLightBackground(), SpectrogramLayer::initialisePalette(), SliceLayer::paint(), and SpectrumLayer::paint().
| QColor ColourMapper::getContrastingColour | ( | ) | const |
Definition at line 221 of file ColourMapper.cpp.
References Banded, BlackOnWhite, BlueOnBlack, DefaultColours, FruitSalad, getColourMapCount(), HighGain, Highlight, m_map, map(), Printer, RedOnBlue, Sunset, WhiteOnBlack, and YellowOnBlack.
Referenced by SpectrogramLayer::initialisePalette(), and SpectrumLayer::paintCrosshairs().
| bool ColourMapper::hasLightBackground | ( | ) | const |
Definition at line 269 of file ColourMapper.cpp.
References Banded, BlackOnWhite, BlueOnBlack, DefaultColours, FruitSalad, getColourMapCount(), HighGain, Highlight, m_map, map(), Printer, RedOnBlue, Sunset, WhiteOnBlack, and YellowOnBlack.
Referenced by SpectrogramLayer::hasLightBackground().
|
protected |
Definition at line 63 of file ColourMapper.h.
Referenced by getContrastingColour(), getMap(), hasLightBackground(), and map().
|
protected |
Definition at line 64 of file ColourMapper.h.
Referenced by ColourMapper(), getMinValue(), and map().
|
protected |
Definition at line 65 of file ColourMapper.h.
Referenced by ColourMapper(), getMaxValue(), and map().