MNE-CPP  beta 1.0
imagesc.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef IMAGESC_H
37 #define IMAGESC_H
38 
39 //*************************************************************************************************************
40 //=============================================================================================================
41 // INCLUDES
42 //=============================================================================================================
43 
44 #include "disp_global.h"
45 #include "graph.h"
46 
47 
48 //*************************************************************************************************************
49 //=============================================================================================================
50 // QT INCLUDES
51 //=============================================================================================================
52 
53 #include <QWidget>
54 #include <QImage>
55 #include <QString>
56 #include <QPen>
57 #include <QSharedPointer>
58 
59 
60 //*************************************************************************************************************
61 //=============================================================================================================
62 // Eigen INCLUDES
63 //=============================================================================================================
64 
65 #include <Eigen/Core>
66 
67 
68 //*************************************************************************************************************
69 //=============================================================================================================
70 // DEFINE NAMESPACE DISP3DLIB
71 //=============================================================================================================
72 
73 namespace DISPLIB
74 {
75 
76 //*************************************************************************************************************
77 //=============================================================================================================
78 // USED NAMESPACES
79 //=============================================================================================================
80 
81 using namespace Eigen;
82 
83 
84 //*************************************************************************************************************
85 //=============================================================================================================
86 // FORWARD DECLARATIONS
87 //=============================================================================================================
88 
89 
90 //=============================================================================================================
97 {
98  Q_OBJECT
99 public:
100  typedef QSharedPointer<ImageSc> SPtr;
101  typedef QSharedPointer<const ImageSc> ConstSPtr;
103  //=========================================================================================================
109  explicit ImageSc(QWidget *parent = 0);
110 
111  //=========================================================================================================
118  explicit ImageSc(MatrixXd &p_dMat, QWidget *parent = 0);
119 
120  //=========================================================================================================
127  explicit ImageSc(MatrixXf &p_fMat, QWidget *parent = 0);
128 
129  //=========================================================================================================
136  explicit ImageSc(MatrixXi &p_iMat, QWidget *parent = 0);
137 
138  //=========================================================================================================
142  ~ImageSc();
143 
144  //=========================================================================================================
148  void init();
149 
150  //=========================================================================================================
156  void updateData(MatrixXd &p_dMat);
157  //=========================================================================================================
163  void updateData(MatrixXf &p_fMat);
164  //=========================================================================================================
170  void updateData(MatrixXi &p_iMat);
171 
172  //=========================================================================================================
178  void setColorMap(const QString &p_sColorMap);
179 
180 protected:
181  //=========================================================================================================
185  void updateMaps();
186 
187  void paintEvent(QPaintEvent*);
188 
189  QPixmap* m_pPixmapData;
190  QPixmap* m_pPixmapColorbar;
192  MatrixXd m_matCentNormData;
194  double m_dMinValue;
195  double m_dMaxValue;
197  QRgb (*pColorMapper)(double);
199  bool m_bColorbar;
200  QVector<double> m_qVecScaleValues;
206 };
207 
208 //*************************************************************************************************************
209 //=============================================================================================================
210 // INLINE DEFINITIONS
211 //=============================================================================================================
212 
213 } // NAMESPACE
214 
215 #endif // IMAGESC_H
QPen m_qPenColorbar
Definition: imagesc.h:205
#define DISPSHARED_EXPORT
Definition: disp_global.h:57
double m_dMinValue
Definition: imagesc.h:194
QPixmap * m_pPixmapData
Definition: imagesc.h:189
QSharedPointer< ImageSc > SPtr
Definition: imagesc.h:100
double m_dMaxValue
Definition: imagesc.h:195
MatrixXd m_matCentNormData
Definition: imagesc.h:192
qint32 m_iColorbarWidth
Definition: imagesc.h:201
Eigen matrix visualization.
Definition: imagesc.h:96
QVector< double > m_qVecScaleValues
Definition: imagesc.h:200
QPixmap * m_pPixmapColorbar
Definition: imagesc.h:190
QFont m_qFontColorbar
Definition: imagesc.h:204
qint32 m_iColorbarGradSteps
Definition: imagesc.h:203
Graph class declaration.
Base class for graphs.
Definition: graph.h:95
disp library export/import macros.
bool m_bColorbar
Definition: imagesc.h:199
QSharedPointer< const ImageSc > ConstSPtr
Definition: imagesc.h:101
qint32 m_iColorbarSteps
Definition: imagesc.h:202