JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
|
Classes | |
struct | JKQTPColorPaletteSingleColorLinSegment |
for building palettes from linear segments of single colors using JKQTPBuildColorPaletteLUTLinSegmentsSorted() and JKQTPBuildColorPaletteLUTLinSegments() More... | |
class | JKQTPPaletteList |
for building palettes from list of colors and position values, using JKQTPBuildColorPaletteLUTLinInterpolateSorted(), ... More... | |
Functions | |
QRgb | jkqtp_qRgbOpaque (QRgb col) |
version of qRgb() that does not require to add the alpha part | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPBuildColorPaletteLUT (const QMap< double, QRgb > &items, int lut_size=JKQTPImageTools::LUTSIZE) |
like JKQTPBuildColorPaletteLUTSorted(), but accepts a QMap<double,QRgb> as parameter instead of QList<QPair<double,QRgb>> | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPBuildColorPaletteLUT (const std::function< float(float)> &rFunc, const std::function< float(float)> &gFunc, const std::function< float(float)> &bFunc, const std::function< float(float)> &aFunc, int lut_size=JKQTPImageTools::LUTSIZE, float vMin=0.0, float vMax=1.0) |
Builds a LUT by evaluating the quadruple RGBA = ( rFunc(v) , gFunc(v) , bFunc(v) ) for v in the range vMin ... vMax at lut_size equally distributed locations. | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPBuildColorPaletteLUT (const std::function< float(float)> &rFunc, const std::function< float(float)> &gFunc, const std::function< float(float)> &bFunc, int lut_size=JKQTPImageTools::LUTSIZE, float vMin=0.0, float vMax=1.0) |
Builds a LUT by evaluating the triple RGB = ( rFunc(v) , gFunc(v) , bFunc(v) ) for v in the range vMin ... vMax at lut_size equally distributed locations. | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPBuildColorPaletteLUT (const std::function< QRgb(float)> &palFunc, int lut_size=JKQTPImageTools::LUTSIZE, float vMin=0.0, float vMax=1.0) |
Builds a LUT by evaluating palFunc(v) for v in the range vMin ... vMax at lut_size equally distributed locations. | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPBuildColorPaletteLUT (JKQTPPaletteList items, int lut_size=JKQTPImageTools::LUTSIZE) |
like JKQTPBuildColorPaletteLUTSorted(), but sorts items before processing it! | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPBuildColorPaletteLUTBySubsampling (const JKQTPImageTools::LUTType &items, int lut_size=JKQTPImageTools::NDEFAULTSTEPS) |
takes an existing JKQTPImageTools::LUTType and subsamples lut_size elements from it | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPBuildColorPaletteLUTColorsOnlySteps (JKQTPPaletteList items) |
takes the QRgb-values in items and builds a stepped palette from them, ignoring the double-values. the palette will have items.size() entries. | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPBuildColorPaletteLUTLinInterpolate (const QMap< double, QRgb > &items, int lut_size=JKQTPImageTools::LUTSIZE) |
like JKQTPBuildColorPaletteLUTLinInterpolateSorted(), but accepts a QMap<double,QRgb> as parameter instead of QList<QPair<double,QRgb>> | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPBuildColorPaletteLUTLinInterpolate (JKQTPPaletteList items, int lut_size=JKQTPImageTools::LUTSIZE) |
like JKQTPBuildColorPaletteLUTLinInterpolateSorted(), but sorts items before processing it! | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPBuildColorPaletteLUTLinInterpolateSorted (const JKQTPPaletteList &items, int lut_size=JKQTPImageTools::LUTSIZE) |
build a linearly interpolated palette (as a look-up table) with lut_size entries by linearly interpolating between the nodes in items . NOTE: items is assumed to be sorted by the first component of the QPair<double,QRgb> entries! | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPBuildColorPaletteLUTLinSegments (QList< JKQTPColorPaletteSingleColorLinSegment > itemsR, QList< JKQTPColorPaletteSingleColorLinSegment > itemsG, QList< JKQTPColorPaletteSingleColorLinSegment > itemsB, int lut_size=JKQTPImageTools::LUTSIZE) |
like JKQTPBuildColorPaletteLUTLinSegmentsSorted(), but sorts itemsR, itemB, itemsG before processing them! | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPBuildColorPaletteLUTLinSegmentsSorted (const QList< JKQTPColorPaletteSingleColorLinSegment > &itemsR, const QList< JKQTPColorPaletteSingleColorLinSegment > &itemsG, const QList< JKQTPColorPaletteSingleColorLinSegment > &itemsB, int lut_size=JKQTPImageTools::LUTSIZE) |
build an interpolated palette with lut_size entries from the linear segments defined for the color channels R, G and B in itemsR, itemG and itemB respectively NOTE: The entries in itemsR, itemsG, itemsB are assumed to be sorted by the position entry. | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPBuildColorPaletteLUTSorted (const JKQTPPaletteList &items, int lut_size=JKQTPImageTools::LUTSIZE) |
build a palette (as a look-up table) with lut_size entries that step between the nodes provided in items. NOTE: items is assumed to be sorted by the first component of the QPair<double,QRgb> entries! | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPCreateGreensCubeHelixLUT (float start, float rotation, float gamma=1.0, int lutsize=JKQTPImageTools::LUTSIZE, float lambda_min=0.0, float lambda_max=1.0, float saturation_min=1.2, float saturation_max=1.2) |
create color palettes/LUTs by using Green's CubeHelix method | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPModifyLUT (JKQTPImageTools::LUTType lut, std::function< QRgb(int, QRgb)> f) |
modify each element of a given lut with a given functor that receives the color and an index | |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT | JKQTPModifyLUT (JKQTPImageTools::LUTType lut, std::function< QRgb(QRgb)> f) |
modify each element of a given lut with a given functor that receives the color | |
|
inline |
version of qRgb() that does not require to add the alpha part
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUT | ( | const QMap< double, QRgb > & | items, |
int | lut_size = JKQTPImageTools::LUTSIZE |
||
) |
like JKQTPBuildColorPaletteLUTSorted(), but accepts a QMap<double,QRgb>
as parameter instead of QList<QPair<double,QRgb>>
The LUT is built following these rules:
items.first()
.seconditems.last()
.secondQPair<double,QRgb>
entries:JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUT | ( | const std::function< float(float)> & | rFunc, |
const std::function< float(float)> & | gFunc, | ||
const std::function< float(float)> & | bFunc, | ||
const std::function< float(float)> & | aFunc, | ||
int | lut_size = JKQTPImageTools::LUTSIZE , |
||
float | vMin = 0.0 , |
||
float | vMax = 1.0 |
||
) |
Builds a LUT by evaluating the quadruple RGBA = ( rFunc(v) , gFunc(v) , bFunc(v) ) for v
in the range vMin ... vMax at lut_size equally distributed locations.
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUT | ( | const std::function< float(float)> & | rFunc, |
const std::function< float(float)> & | gFunc, | ||
const std::function< float(float)> & | bFunc, | ||
int | lut_size = JKQTPImageTools::LUTSIZE , |
||
float | vMin = 0.0 , |
||
float | vMax = 1.0 |
||
) |
Builds a LUT by evaluating the triple RGB = ( rFunc(v) , gFunc(v) , bFunc(v) ) for v
in the range vMin ... vMax at lut_size equally distributed locations.
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUT | ( | const std::function< QRgb(float)> & | palFunc, |
int | lut_size = JKQTPImageTools::LUTSIZE , |
||
float | vMin = 0.0 , |
||
float | vMax = 1.0 |
||
) |
Builds a LUT by evaluating palFunc(v) for v
in the range vMin ... vMax at lut_size equally distributed locations.
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUT | ( | JKQTPPaletteList | items, |
int | lut_size = JKQTPImageTools::LUTSIZE |
||
) |
like JKQTPBuildColorPaletteLUTSorted(), but sorts items before processing it!
The LUT is built following these rules:
items.first()
.seconditems.last()
.secondQPair<double,QRgb>
entries:JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUTBySubsampling | ( | const JKQTPImageTools::LUTType & | items, |
int | lut_size = JKQTPImageTools::NDEFAULTSTEPS |
||
) |
takes an existing JKQTPImageTools::LUTType and subsamples lut_size elements from it
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUTColorsOnlySteps | ( | JKQTPPaletteList | items | ) |
takes the QRgb-values in items and builds a stepped palette from them, ignoring the double-values. the palette will have items.size() entries.
double
sortiert JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUTLinInterpolate | ( | const QMap< double, QRgb > & | items, |
int | lut_size = JKQTPImageTools::LUTSIZE |
||
) |
like JKQTPBuildColorPaletteLUTLinInterpolateSorted(), but accepts a QMap<double,QRgb>
as parameter instead of QList<QPair<double,QRgb>>
The LUT is built following these rules:
items.first()
.seconditems.last()
.secondQPair<double,QRgb>
entries:JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUTLinInterpolate | ( | JKQTPPaletteList | items, |
int | lut_size = JKQTPImageTools::LUTSIZE |
||
) |
like JKQTPBuildColorPaletteLUTLinInterpolateSorted(), but sorts items before processing it!
The LUT is built following these rules:
items.first()
.seconditems.last()
.secondQPair<double,QRgb>
entries:JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUTLinInterpolateSorted | ( | const JKQTPPaletteList & | items, |
int | lut_size = JKQTPImageTools::LUTSIZE |
||
) |
build a linearly interpolated palette (as a look-up table) with lut_size entries by linearly interpolating between the nodes in items . NOTE: items is assumed to be sorted by the first component of the QPair<double,QRgb>
entries!
The LUT is built following these rules:
items.first()
.seconditems.last()
.secondQPair<double,QRgb>
entries:JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUTLinSegments | ( | QList< JKQTPColorPaletteSingleColorLinSegment > | itemsR, |
QList< JKQTPColorPaletteSingleColorLinSegment > | itemsG, | ||
QList< JKQTPColorPaletteSingleColorLinSegment > | itemsB, | ||
int | lut_size = JKQTPImageTools::LUTSIZE |
||
) |
like JKQTPBuildColorPaletteLUTLinSegmentsSorted(), but sorts itemsR, itemB, itemsG before processing them!
This is used to build a table of linear segments as a QList<JKQTPColorPaletteSingleColorLinSegment>
:
i position colval1 colval2 ~~~ ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ 0 0.0 0 (IGNORED) 0 1 0.5 100 100 2 0.8 255 255 3 1.0 255 255 (IGNORED)
This will build a graph:
colval ^ | 250 - #**********# | *** 200 - *** | *** 150 - ** | ** 100 - *****# | **** 50 - ***** | ***** 0 - #***** | ---|----|----|----|----|----|----|----|----|----|----|--> position 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
You can also build graphs with a jump at a certain position
i position colval1 colval2 ~~~ ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ 0 0.0 0 (IGNORED) 0 1 0.5 100 0 2 1.0 255 255 (IGNORED)
This results in:
colval ^ | 250 - **# | ** 200 - ** | ** 150 - *** | ** 100 - # ** | ****** ** 50 - ****** ** | ****** ** 0 - #****** #** | ---|----|----|----|----|----|----|----|----|----|----|--> position 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUTLinSegmentsSorted | ( | const QList< JKQTPColorPaletteSingleColorLinSegment > & | itemsR, |
const QList< JKQTPColorPaletteSingleColorLinSegment > & | itemsG, | ||
const QList< JKQTPColorPaletteSingleColorLinSegment > & | itemsB, | ||
int | lut_size = JKQTPImageTools::LUTSIZE |
||
) |
build an interpolated palette with lut_size entries from the linear segments defined for the color channels R, G and B in itemsR, itemG and itemB respectively NOTE: The entries in itemsR, itemsG, itemsB are assumed to be sorted by the position entry.
This is used to build a table of linear segments as a QList<JKQTPColorPaletteSingleColorLinSegment>
:
i position colval1 colval2 ~~~ ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ 0 0.0 0 (IGNORED) 0 1 0.5 100 100 2 0.8 255 255 3 1.0 255 255 (IGNORED)
This will build a graph:
colval ^ | 250 - #**********# | *** 200 - *** | *** 150 - ** | ** 100 - *****# | **** 50 - ***** | ***** 0 - #***** | ---|----|----|----|----|----|----|----|----|----|----|--> position 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
You can also build graphs with a jump at a certain position
i position colval1 colval2 ~~~ ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ 0 0.0 0 (IGNORED) 0 1 0.5 100 0 2 1.0 255 255 (IGNORED)
This results in:
colval ^ | 250 - **# | ** 200 - ** | ** 150 - *** | ** 100 - # ** | ****** ** 50 - ****** ** | ****** ** 0 - #****** #** | ---|----|----|----|----|----|----|----|----|----|----|--> position 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUTSorted | ( | const JKQTPPaletteList & | items, |
int | lut_size = JKQTPImageTools::LUTSIZE |
||
) |
build a palette (as a look-up table) with lut_size entries that step between the nodes provided in items. NOTE: items is assumed to be sorted by the first component of the QPair<double,QRgb>
entries!
The LUT is built following these rules:
items.first()
.seconditems.last()
.secondQPair<double,QRgb>
entries:JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPCreateGreensCubeHelixLUT | ( | float | start, |
float | rotation, | ||
float | gamma = 1.0 , |
||
int | lutsize = JKQTPImageTools::LUTSIZE , |
||
float | lambda_min = 0.0 , |
||
float | lambda_max = 1.0 , |
||
float | saturation_min = 1.2 , |
||
float | saturation_max = 1.2 |
||
) |
create color palettes/LUTs by using Green's CubeHelix method
start | start-hue for the palette |
rotation | rotation paremeter for the palette |
gamma | optional gamma parameter |
lutsize | number of entries in LUT |
lambda_min | start value for the in Green's formula |
lambda_max | end value for the in Green's formula |
saturation_min | start value for the saturation in Green's formula, usually the saturation is a single value, then saturation_min == saturation_max! |
saturation_max | end value for the saturation in Green's formula, usually the saturation is a single value, then saturation_min == saturation_max! |
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPModifyLUT | ( | JKQTPImageTools::LUTType | lut, |
std::function< QRgb(int, QRgb)> | f | ||
) |
modify each element of a given lut with a given functor that receives the color and an index
JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPModifyLUT | ( | JKQTPImageTools::LUTType | lut, |
std::function< QRgb(QRgb)> | f | ||
) |
modify each element of a given lut with a given functor that receives the color