00001 #ifndef MYCLASS_H
00002 #define MYCLASS_H
00003
00004 #include <glew.h>
00005 #include <QtOpenGL\QGLWidget>
00006
00007 #include "Arguments.h"
00008 #include "Volume.h"
00009
00018 class MyClass : public QGLWidget
00019 {
00020 Q_OBJECT
00021
00022 public:
00023 MyClass(QWidget *parent = NULL);
00024
00025
00026 private:
00027
00035 void loadVolume(const std::string &fname);
00036
00044 void drawBoundingBox();
00045
00046 protected:
00047
00048 GLhandleARB my_program;
00049 Arguments g_argArguments;
00050 Volume g_Volume;
00051 unsigned int g_uExampleTexture;
00052 unsigned int g_gradientTexture;
00053 GLuint FBTextureFront, FBTextureBack;
00054 GLuint FBufferFront, FBufferBack;
00055 float g_fCoordZ;
00056 int mode;
00057 int compMode;
00058 int shadeMode;
00059 float stepSize;
00060 float xyxoffset, xyyoffset;
00061 float yzyoffset, yzzoffset;
00062 float xzxoffset, xzzoffset;
00063
00064 GLuint transferTexture;
00065 QImage transferImage;
00066 bool draw;
00067
00073 void initializeGL();
00074
00085 void resizeGL(int w, int h);
00086
00092 void paintGL();
00093
00094 void mousePressEvent(QMouseEvent *event);
00095 void mouseMoveEvent(QMouseEvent *event);
00096 void keyPressEvent(QKeyEvent *event);
00097 void mouseReleaseEvent(QMouseEvent* event);
00098
00099 public slots:
00100
00106 void toggleDraw();
00107
00115 void changeValue(float i);
00116
00124 void SetTransferFunction(const QImage &i);
00125
00131 void loadDataFile();
00132
00140 void ChangeAxis(int id);
00141
00142 void ChangeCompositingMode(int id);
00143
00144 void ChangeShading(bool shade);
00145
00146 void ChangeStepSize(float s);
00147 };
00148
00149 #endif // MYCLASS_H