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//=============================================================================================================
40// EIGEN INCLUDES
41//=============================================================================================================
42
43#include <Eigen/Core>
44
45//=============================================================================================================
46// FORWARD DECLARATIONS
47//=============================================================================================================
48
49//=============================================================================================================
50// DEFINE NAMESPACE DISPLIB
51//=============================================================================================================
52
53namespace DISPLIB
54{
55
56//=============================================================================================================
57// DISPLIB FORWARD DECLARATIONS
58//=============================================================================================================
59
60//=============================================================================================================
70{
71 Q_OBJECT
72
73public:
74 typedef QSharedPointer<ImageSc> SPtr;
75 typedef QSharedPointer<const ImageSc> ConstSPtr;
76
77 //=========================================================================================================
83 explicit ImageSc(QWidget *parent = 0);
84
85 //=========================================================================================================
92 explicit ImageSc(Eigen::MatrixXd &p_dMat,
93 QWidget *parent = 0);
94
95 //=========================================================================================================
102 explicit ImageSc(Eigen::MatrixXf &p_fMat,
103 QWidget *parent = 0);
104
105 //=========================================================================================================
112 explicit ImageSc(Eigen::MatrixXi &p_iMat,
113 QWidget *parent = 0);
114
115 //=========================================================================================================
119 ~ImageSc();
120
121 //=========================================================================================================
125 void init();
126
127 //=========================================================================================================
133 void updateData(Eigen::MatrixXd &p_dMat);
134
135 //=========================================================================================================
141 void updateData(Eigen::MatrixXf &p_fMat);
142 //=========================================================================================================
148 void updateData(Eigen::MatrixXi &p_iMat);
149
150 //=========================================================================================================
156 void setColorMap(const QString &p_sColorMap);
157
158protected:
159 //=========================================================================================================
163 void updateMaps();
164
165 //=========================================================================================================
171 void paintEvent(QPaintEvent* event);
172
173 QPixmap* m_pPixmapData;
175
176 QString m_sColorMap;
177
178 Eigen::MatrixXd m_matCentNormData;
179
180 double m_dMinValue;
181 double m_dMaxValue;
182
184 QVector<double> m_qVecScaleValues;
190
191 QRgb (*pColorMapper)(double, const QString&);
192};
193
194//=============================================================================================================
195// INLINE DEFINITIONS
196//=============================================================================================================
197} // NAMESPACE
198
199#endif // IMAGESC_H
Export macros and build-info hooks for the DISPLIB shared library.
#define DISPSHARED_EXPORT
Definition disp_global.h:38
Abstract base widget providing title, axis labels and resize handling for the in-house 2-D plots.
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:186
void updateData(Eigen::MatrixXi &p_iMat)
void paintEvent(QPaintEvent *event)
Definition imagesc.cpp:229
QString m_sColorMap
Definition imagesc.h:176
void setColorMap(const QString &p_sColorMap)
Definition imagesc.cpp:220
Eigen::MatrixXd m_matCentNormData
Definition imagesc.h:178
ImageSc(QWidget *parent=0)
Definition imagesc.cpp:39
ImageSc(Eigen::MatrixXi &p_iMat, QWidget *parent=0)
QVector< double > m_qVecScaleValues
Definition imagesc.h:184
double m_dMinValue
Definition imagesc.h:180
QPen m_qPenColorbar
Definition imagesc.h:189
QFont m_qFontColorbar
Definition imagesc.h:188
QSharedPointer< ImageSc > SPtr
Definition imagesc.h:74
ImageSc(Eigen::MatrixXf &p_fMat, QWidget *parent=0)
QPixmap * m_pPixmapData
Definition imagesc.h:173
void updateData(Eigen::MatrixXf &p_fMat)
qint32 m_iColorbarGradSteps
Definition imagesc.h:187
ImageSc(Eigen::MatrixXd &p_dMat, QWidget *parent=0)
double m_dMaxValue
Definition imagesc.h:181
void updateData(Eigen::MatrixXd &p_dMat)
qint32 m_iColorbarWidth
Definition imagesc.h:185
QRgb(* pColorMapper)(double, const QString &)
Definition imagesc.h:191
QPixmap * m_pPixmapColorbar
Definition imagesc.h:174
QSharedPointer< const ImageSc > ConstSPtr
Definition imagesc.h:75