00001 #ifndef CGLHISTOGRAM_H 00002 #define CGLHISTOGRAM_H 00003 00004 /**************************************************************************\ 00005 * REQUIRED HEADERS * 00006 \**************************************************************************/ 00007 00008 //QT 00009 #include <QColor> 00010 //OWN 00011 #include "CGLSurface.h" 00012 #include "Definitions.h" 00013 #include "modules/Memory/mmgr.h" 00014 00015 /**************************************************************************\ 00016 * DEFINITIONS * 00017 \**************************************************************************/ 00018 00019 class QMouseEvent; 00020 class QGLFramebufferObject; 00021 class CVolumeStatistics; 00022 00023 /**************************************************************************\ 00024 * CLASS * 00025 \**************************************************************************/ 00026 class CGLHistogram : public CGLSurface 00027 { 00028 Q_OBJECT 00029 00030 /**************************************************************************\ 00031 * PUBLIC CLASS FUNCTIONS * 00032 \**************************************************************************/ 00033 public: 00034 00035 CGLHistogram(QWidget *parent); 00036 ~CGLHistogram(); 00037 00038 void DisplayData(float * data,int dataSize); 00039 void ResetDataView(){ResetView();} 00040 void ResetDataViewH(){ResetViewH();} 00041 void ResetDataViewV(){ResetViewV();} 00042 00043 signals: 00044 00045 void TransformChange(float,float); 00046 00047 /**************************************************************************\ 00048 * PROTECTED CLASS FUNCTIONS * 00049 \**************************************************************************/ 00050 protected: 00051 virtual void Update(){emit TransformChange(panX,zoomX); CGLSurface::Update();} 00052 virtual void onDraw(); 00053 virtual void mouseMoveEvent(QMouseEvent *event); 00054 virtual void mousePressEvent(QMouseEvent *event); 00055 virtual void mouseReleaseEvent(QMouseEvent *event); 00056 virtual void onLOG(QString &){} 00057 virtual void onLOG(const char*){} 00058 00059 /**************************************************************************\ 00060 * PRIVATE CLASS FUNCTIONS * 00061 \**************************************************************************/ 00062 00063 private: 00064 00065 void ResetView(); 00066 void ResetViewH(); 00067 void ResetViewV(); 00068 00069 /**************************************************************************\ 00070 * PRIVATE CLASS MEMBERS * 00071 \**************************************************************************/ 00072 private: 00073 00074 QGLFramebufferObject * fboObject1; 00075 float bgColor[4]; 00076 00077 float zoomX,zoomY,panX,panY; 00078 bool doZoom; 00079 bool doPan; 00080 }; 00081 00082 #endif // CGLHISTOGRAM_H