MNE-CPP  0.1.9
A Framework for Electrophysiology
Public Types | Signals | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
DISPLIB::Spline Class Reference

Spline class for histogram display using Qtcharts/QSpline. More...

#include <spline.h>

Public Types

typedef QSharedPointer< SplineSPtr
 
typedef QSharedPointer< const SplineConstSPtr
 

Signals

void borderChanged (double leftThreshold, double middleThreshold, double rightThreshold)
 

Public Member Functions

 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)
 

Public Attributes

Eigen::VectorXi m_vecResultExponentValues
 
double m_dMinAxisX
 
double m_dMaxAxisX
 

Protected Member Functions

void updateThreshold (QLineSeries *lineSeries)
 

Protected Attributes

QChart * m_pChart
 
QSplineSeries * m_pSeries
 
QLineSeries * m_pLeftThreshold
 
QLineSeries * m_pMiddleThreshold
 
QLineSeries * m_pRightThreshold
 
int m_iMaximumFrequency
 
QList< QVector3D > m_pReturnList
 
QString m_colorMap
 
QVector3D m_vecReturnVector
 

Detailed Description

Spline class for histogram display using Qtcharts/QSpline.

Histogram display using Qtcharts/QSpline

Definition at line 89 of file spline.h.

Inheritance diagram for DISPLIB::Spline:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const Spline> DISPLIB::Spline::ConstSPtr

Const shared pointer type for Spline class.

Definition at line 95 of file spline.h.

◆ SPtr

typedef QSharedPointer<Spline> DISPLIB::Spline::SPtr

Shared pointer type for Spline class.

Definition at line 94 of file spline.h.

Constructor & Destructor Documentation

◆ Spline()

Spline::Spline ( QWidget *  parent = 0,
const QString &  title = "Spline Histogram" 
)

The constructor for Spline

Parameters
[in]titlestring to specify the title displayed on the histogram, defaults to "Spline Histogram".
[in]parentsets the behaviour of Spline as an object, defaults to no parent QWidget.

Definition at line 69 of file spline.cpp.

Member Function Documentation

◆ 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]leftThresholdvalue of the left threshold line (initialized as minAxisX).
[out]middleThresholdvalue of the middle threshold line (initialized as maxAxisX).
[out]rightThresholdvalue 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]vecOriginalValuesQVector3D consisting of 3 original values.
[in]functionNameChoice 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]eventmouse 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]colorMapqstring 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]matClassLimitDatavector input filled with class limits.
[in]matClassFrequencyDatavector 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]vecThresholdValuesQVector3D 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]matClassLimitDatavector input filled with values of class limits (in coefficient and exponent form).
[in]iClassCountuser input to determine the amount of classes in the histogram.
[out]vecCoefficientResultsvector filled with values of coefficient only.
[out]vecExponentResultsvector 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]matClassLimitDatavector input filled with class limits.
[in]matClassFrequencyDatavector 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]cThresholdNamename of the Line.
[in]lineSeriesqlineseries of the corresponding threshold line.

Definition at line 271 of file spline.cpp.

Member Data Documentation

◆ 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: