Spline class for histogram display using Qtcharts/QSpline.
More...
#include <spline.h>
|
void | borderChanged (double leftThreshold, double middleThreshold, double rightThreshold) |
|
|
| Spline (QWidget *parent=0, const QString &title="Spline Histogram") |
|
template<typename T > |
void | setData (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &matClassLimitData, const Eigen::Matrix< int, Eigen::Dynamic, 1 > &matClassFrequencyData) |
|
template<typename T > |
void | setData (const Eigen::Matrix< T, 1, Eigen::Dynamic > &matClassLimitData, const Eigen::Matrix< int, 1, Eigen::Dynamic > &matClassFrequencyData) |
|
template<typename T > |
void | updatePlot (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &matClassLimitData, const Eigen::VectorXi &matClassFrequencyData) |
|
void | mousePressEvent (QMouseEvent *event) |
|
template<typename T > |
void | splitCoefficientAndExponent (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &matClassLimitData, int iClassAmount, Eigen::VectorXd &vecCoefficientResults, Eigen::VectorXi &vecExponentValues) |
|
void | setThreshold (const QVector3D &vecThresholdValues) |
|
const QVector3D & | getThreshold () |
|
QVector3D | correctionDisplayTrueValue (QVector3D vecOriginalValues, QString functionName) |
|
void | setColorMap (const QString &colorMap) |
|
Spline class for histogram display using Qtcharts/QSpline.
Histogram display using Qtcharts/QSpline
Definition at line 89 of file spline.h.
◆ ConstSPtr
Const shared pointer type for Spline class.
Definition at line 95 of file spline.h.
◆ SPtr
◆ Spline()
Spline::Spline |
( |
QWidget * |
parent = 0 , |
|
|
const QString & |
title = "Spline Histogram" |
|
) |
| |
The constructor for Spline
- Parameters
-
[in] | title | string to specify the title displayed on the histogram, defaults to "Spline Histogram". |
[in] | parent | sets the behaviour of Spline as an object, defaults to no parent QWidget. |
Definition at line 69 of file spline.cpp.
◆ borderChanged
void DISPLIB::Spline::borderChanged |
( |
double |
leftThreshold, |
|
|
double |
middleThreshold, |
|
|
double |
rightThreshold |
|
) |
| |
|
signal |
emit signal consisting of three threshold lines x-axis value if any one of them is changed
- Parameters
-
[out] | leftThreshold | value of the left threshold line (initialized as minAxisX). |
[out] | middleThreshold | value of the middle threshold line (initialized as maxAxisX). |
[out] | rightThreshold | value of the right threshold line (initialized as maxAxisX). |
◆ correctionDisplayTrueValue()
QVector3D Spline::correctionDisplayTrueValue |
( |
QVector3D |
vecOriginalValues, |
|
|
QString |
functionName |
|
) |
| |
correctionDisplayTrueValue takes in QVector value from outside sources and create the necessary adjustment of exponential multiplication with base 10
- Parameters
-
[in] | vecOriginalValues | QVector3D consisting of 3 original values. |
[in] | functionName | Choice between getThreshold or setThreshold. |
- Returns
- returns QVector3D after necessary adjustment.
Definition at line 345 of file spline.cpp.
◆ getThreshold()
const QVector3D & Spline::getThreshold |
( |
| ) |
|
getThreshold takes in QVector value from outside sources and create the corresponding lines in the histogram
- Returns
- returns QList consisting of QVector3D corresponding to the x-axis value of the threshold lines.
Definition at line 327 of file spline.cpp.
◆ mousePressEvent()
void Spline::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
constructor for mouse press event behaviour to create threshold lines and signal emit
- Parameters
-
[in] | event | mouse press input. |
Definition at line 93 of file spline.cpp.
◆ setColorMap()
void Spline::setColorMap |
( |
const QString & |
colorMap | ) |
|
updateColorMap takes in string name of color map and the three threshold lines and creates the color gradient
- Parameters
-
[in] | colorMap | qstring of the color gradient from user input. |
Definition at line 297 of file spline.cpp.
◆ setData()
template<typename T >
void DISPLIB::Spline::setData |
( |
const Eigen::Matrix< T, Eigen::Dynamic, 1 > & |
matClassLimitData, |
|
|
const Eigen::Matrix< int, Eigen::Dynamic, 1 > & |
matClassFrequencyData |
|
) |
| |
creates a qspline chart histogram from 2 vectors: class limits and class frequency
- Parameters
-
[in] | matClassLimitData | vector input filled with class limits. |
[in] | matClassFrequencyData | vector input filled with class frequency to the corresponding class. |
Definition at line 237 of file spline.h.
◆ setThreshold()
void Spline::setThreshold |
( |
const QVector3D & |
vecThresholdValues | ) |
|
setThreshold takes in QVector value from outside sources and create the corresponding lines in the histogram
- Parameters
-
[in] | vecThresholdValues | QVector3D consisting of 3 values corresponding to the x-axis value of the threshold lines. |
Definition at line 179 of file spline.cpp.
◆ splitCoefficientAndExponent()
template<typename T >
void DISPLIB::Spline::splitCoefficientAndExponent |
( |
const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & |
matClassLimitData, |
|
|
int |
iClassAmount, |
|
|
Eigen::VectorXd & |
vecCoefficientResults, |
|
|
Eigen::VectorXi & |
vecExponentValues |
|
) |
| |
splitCoefficientAndExponent takes in QVector value of coefficient and exponent (example: 1.2e-10) and finds the coefficient (1.2) and the appropriate exponent (-12), normalize the exponents to either the lowest or highest exponent in the list then places the values in two separate QVectors
- Parameters
-
[in] | matClassLimitData | vector input filled with values of class limits (in coefficient and exponent form). |
[in] | iClassCount | user input to determine the amount of classes in the histogram. |
[out] | vecCoefficientResults | vector filled with values of coefficient only. |
[out] | vecExponentResults | vector filled with values of exponent only. |
Definition at line 316 of file spline.h.
◆ updatePlot()
template<typename T >
void DISPLIB::Spline::updatePlot |
( |
const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & |
matClassLimitData, |
|
|
const Eigen::VectorXi & |
matClassFrequencyData |
|
) |
| |
Updates the spline with new data
- Parameters
-
[in] | matClassLimitData | vector input filled with class limits. |
[in] | matClassFrequencyData | vector input filled with class frequency to the corresponding class. |
Definition at line 259 of file spline.h.
◆ updateThreshold()
void Spline::updateThreshold |
( |
QLineSeries * |
lineSeries | ) |
|
|
protected |
updateThreshold takes in string name of threshold and its corresponding Qlineseries and creates the line in the QChart
- Parameters
-
[in] | cThresholdName | name of the Line. |
[in] | lineSeries | qlineseries of the corresponding threshold line. |
Definition at line 271 of file spline.cpp.
◆ m_colorMap
QString DISPLIB::Spline::m_colorMap |
|
protected |
QString that will be used to set the color mapping on the histogram
Definition at line 217 of file spline.h.
◆ m_dMaxAxisX
double DISPLIB::Spline::m_dMaxAxisX |
Display value of the largest point on the series in x-axis.
Definition at line 190 of file spline.h.
◆ m_dMinAxisX
double DISPLIB::Spline::m_dMinAxisX |
Display value of the smallest point of the series in x-axis.
Definition at line 189 of file spline.h.
◆ m_iMaximumFrequency
int DISPLIB::Spline::m_iMaximumFrequency |
|
protected |
Highest value of frequency (y-axis).
Definition at line 215 of file spline.h.
◆ m_pChart
QChart* DISPLIB::Spline::m_pChart |
|
protected |
Qchart object that will be shown in the widget.
Definition at line 209 of file spline.h.
◆ m_pLeftThreshold
QLineSeries* DISPLIB::Spline::m_pLeftThreshold |
|
protected |
Vertical line series for the left threshold.
Definition at line 211 of file spline.h.
◆ m_pMiddleThreshold
QLineSeries* DISPLIB::Spline::m_pMiddleThreshold |
|
protected |
Vertical line series for the middle threshold.
Definition at line 212 of file spline.h.
◆ m_pReturnList
QList<QVector3D> DISPLIB::Spline::m_pReturnList |
|
protected |
QList consisting of 2 QVector3D used in getThreshold function
Definition at line 216 of file spline.h.
◆ m_pRightThreshold
QLineSeries* DISPLIB::Spline::m_pRightThreshold |
|
protected |
Vertical line series for the right threshold.
Definition at line 213 of file spline.h.
◆ m_pSeries
QSplineSeries* DISPLIB::Spline::m_pSeries |
|
protected |
Spline data series that will contain the histogram data
Definition at line 210 of file spline.h.
◆ m_vecResultExponentValues
Eigen::VectorXi DISPLIB::Spline::m_vecResultExponentValues |
Common exponent values for the entire histogram
Definition at line 188 of file spline.h.
◆ m_vecReturnVector
QVector3D DISPLIB::Spline::m_vecReturnVector |
|
protected |
QVector3D after correction with correctionDisplayTrueValue function
Definition at line 218 of file spline.h.
The documentation for this class was generated from the following files: