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//=============================================================================================================
72{
73 Q_OBJECT
74
75public:
76 typedef QSharedPointer<ImageSc> SPtr;
77 typedef QSharedPointer<const ImageSc> ConstSPtr;
78
79 //=========================================================================================================
85 explicit ImageSc(QWidget* parent = 0);
86
87 //=========================================================================================================
94 explicit ImageSc(Eigen::MatrixXd& p_dMat,
95 QWidget* parent = 0);
96
97 //=========================================================================================================
104 explicit ImageSc(Eigen::MatrixXf& p_fMat,
105 QWidget* parent = 0);
106
107 //=========================================================================================================
114 explicit ImageSc(Eigen::MatrixXi& p_iMat,
115 QWidget* parent = 0);
116
117 //=========================================================================================================
121 ~ImageSc();
122
123 //=========================================================================================================
127 void init();
128
129 //=========================================================================================================
135 void updateData(Eigen::MatrixXd& p_dMat);
136
137 //=========================================================================================================
143 void updateData(Eigen::MatrixXf& p_fMat);
144 //=========================================================================================================
150 void updateData(Eigen::MatrixXi& p_iMat);
151
152 //=========================================================================================================
158 void setColorMap(const QString& p_sColorMap);
159
160protected:
161 //=========================================================================================================
165 void updateMaps();
166
167 //=========================================================================================================
173 void paintEvent(QPaintEvent* event);
174
175 QPixmap* m_pPixmapData;
177
178 QString m_sColorMap;
179
180 Eigen::MatrixXd m_matCentNormData;
181
182 double m_dMinValue;
183 double m_dMaxValue;
184
186 QVector<double> m_qVecScaleValues;
192
193 QRgb (*pColorMapper)(double, const QString&);
194};
195
196//=============================================================================================================
197// INLINE DEFINITIONS
198//=============================================================================================================
199} // NAMESPACE
200
201#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:188
void updateData(Eigen::MatrixXi &p_iMat)
void paintEvent(QPaintEvent *event)
Definition imagesc.cpp:227
QString m_sColorMap
Definition imagesc.h:178
void setColorMap(const QString &p_sColorMap)
Definition imagesc.cpp:218
Eigen::MatrixXd m_matCentNormData
Definition imagesc.h:180
ImageSc(QWidget *parent=0)
Definition imagesc.cpp:39
ImageSc(Eigen::MatrixXi &p_iMat, QWidget *parent=0)
QVector< double > m_qVecScaleValues
Definition imagesc.h:186
double m_dMinValue
Definition imagesc.h:182
QPen m_qPenColorbar
Definition imagesc.h:191
QFont m_qFontColorbar
Definition imagesc.h:190
QSharedPointer< ImageSc > SPtr
Definition imagesc.h:76
ImageSc(Eigen::MatrixXf &p_fMat, QWidget *parent=0)
QPixmap * m_pPixmapData
Definition imagesc.h:175
void updateData(Eigen::MatrixXf &p_fMat)
qint32 m_iColorbarGradSteps
Definition imagesc.h:189
ImageSc(Eigen::MatrixXd &p_dMat, QWidget *parent=0)
double m_dMaxValue
Definition imagesc.h:183
void updateData(Eigen::MatrixXd &p_dMat)
qint32 m_iColorbarWidth
Definition imagesc.h:187
QRgb(* pColorMapper)(double, const QString &)
Definition imagesc.h:193
QPixmap * m_pPixmapColorbar
Definition imagesc.h:176
QSharedPointer< const ImageSc > ConstSPtr
Definition imagesc.h:77