v2.0.0
Loading...
Searching...
No Matches
imagesc.h
Go to the documentation of this file.
1//=============================================================================================================
24
25#ifndef IMAGESC_H
26#define IMAGESC_H
27
28//=============================================================================================================
29// INCLUDES
30//=============================================================================================================
31
32#include "../disp_global.h"
33#include "graph.h"
34
35//=============================================================================================================
36// QT INCLUDES
37//=============================================================================================================
38
39#include <QPixmap>
40
41//=============================================================================================================
42// EIGEN INCLUDES
43//=============================================================================================================
44
45#include <Eigen/Core>
46
47//=============================================================================================================
48// FORWARD DECLARATIONS
49//=============================================================================================================
50
51//=============================================================================================================
52// DEFINE NAMESPACE DISPLIB
53//=============================================================================================================
54
55namespace DISPLIB
56{
57
58//=============================================================================================================
59// DISPLIB FORWARD DECLARATIONS
60//=============================================================================================================
61
62//=============================================================================================================
74{
75 Q_OBJECT
76
77public:
78 typedef QSharedPointer<ImageSc> SPtr;
79 typedef QSharedPointer<const ImageSc> ConstSPtr;
80
81 //=========================================================================================================
87 explicit ImageSc(QWidget* parent = 0);
88
89 //=========================================================================================================
96 explicit ImageSc(Eigen::MatrixXd& p_dMat,
97 QWidget* parent = 0);
98
99 //=========================================================================================================
106 explicit ImageSc(Eigen::MatrixXf& p_fMat,
107 QWidget* parent = 0);
108
109 //=========================================================================================================
116 explicit ImageSc(Eigen::MatrixXi& p_iMat,
117 QWidget* parent = 0);
118
119 //=========================================================================================================
124
125 //=========================================================================================================
129 void init();
130
131 //=========================================================================================================
137 void updateData(Eigen::MatrixXd& p_dMat);
138
139 //=========================================================================================================
145 void updateData(Eigen::MatrixXf& p_fMat);
146 //=========================================================================================================
152 void updateData(Eigen::MatrixXi& p_iMat);
153
154 //=========================================================================================================
160 void setColorMap(const QString& p_sColorMap);
161
162protected:
163 //=========================================================================================================
167 void updateMaps();
168
169 //=========================================================================================================
175 void paintEvent(QPaintEvent* event);
176
177 QPixmap m_pixmapData;
179
180 QString m_sColorMap;
181
182 Eigen::MatrixXd m_matCentNormData;
183
184 double m_dMinValue;
185 double m_dMaxValue;
186
188 QVector<double> m_qVecScaleValues;
194
195 QRgb (*pColorMapper)(double, const QString&);
196};
197
198//=============================================================================================================
199// INLINE DEFINITIONS
200//=============================================================================================================
201} // NAMESPACE
202
203#endif // IMAGESC_H
Abstract base widget providing title, axis labels and resize handling for the in-house 2-D plots.
Export macros and build-info hooks for the DISPLIB shared library.
#define DISPSHARED_EXPORT
Definition disp_global.h:38
2-D display widgets and visualisation helpers (charts, topography, colour maps).
Graph(QWidget *parent=0)
Definition graph.cpp:43
qint32 m_iColorbarSteps
Definition imagesc.h:190
void updateData(Eigen::MatrixXi &p_iMat)
void paintEvent(QPaintEvent *event)
Definition imagesc.cpp:209
QString m_sColorMap
Definition imagesc.h:180
void setColorMap(const QString &p_sColorMap)
Definition imagesc.cpp:200
Eigen::MatrixXd m_matCentNormData
Definition imagesc.h:182
ImageSc(QWidget *parent=0)
Definition imagesc.cpp:39
ImageSc(Eigen::MatrixXi &p_iMat, QWidget *parent=0)
QVector< double > m_qVecScaleValues
Definition imagesc.h:188
double m_dMinValue
Definition imagesc.h:184
QPen m_qPenColorbar
Definition imagesc.h:193
QFont m_qFontColorbar
Definition imagesc.h:192
QSharedPointer< ImageSc > SPtr
Definition imagesc.h:78
ImageSc(Eigen::MatrixXf &p_fMat, QWidget *parent=0)
void updateData(Eigen::MatrixXf &p_fMat)
qint32 m_iColorbarGradSteps
Definition imagesc.h:191
ImageSc(Eigen::MatrixXd &p_dMat, QWidget *parent=0)
double m_dMaxValue
Definition imagesc.h:185
void updateData(Eigen::MatrixXd &p_dMat)
qint32 m_iColorbarWidth
Definition imagesc.h:189
QRgb(* pColorMapper)(double, const QString &)
Definition imagesc.h:195
QPixmap m_pixmapData
Definition imagesc.h:177
QPixmap m_pixmapColorbar
Definition imagesc.h:178
QSharedPointer< const ImageSc > ConstSPtr
Definition imagesc.h:79