Visualisierung 2
Comparison of Hue Preserving Rendering to Alpha Composing
MainWindow.h
Go to the documentation of this file.
1 
8 #ifndef MAINWINDOW_H
9 #define MAINWINDOW_H
10 
11 #include <stdio.h>
12 #include <stdlib.h>
13 
14 #include "ui_MainWindow.h"
15 #include "Volume.h"
16 
17 #include <QMainWindow>
18 #include <QPushButton>
19 #include <QLabel>
20 #include <QProgressBar>
21 #include <QStatusBar>
22 #include <QVariant>
23 #include <QColorDialog>
24 #include <QColor>
25 
26 using namespace std;
27 
31 class MainWindow : public QMainWindow
32 {
33  Q_OBJECT
34 
35  public:
36  MainWindow(QWidget *parent = 0);
37  ~MainWindow();
38 
39  protected slots :
45  void openFileAction();
46 
50  void closeAction();
51 
52  private slots:
53 
59  void on_renderButton_clicked();
60 
66  void on_color1Button_clicked();
67 
73  void on_color2Button_clicked();
74 
79  void on_region1Slider_valueChanged();
80 
85  void on_region1Slider_sliderReleased();
86 
91  void updateBothViews();
92 
93  void on_orientationBox_currentIndexChanged(int index);
94 
95 private:
96  // User Interface Elements
97  Ui::MainWindow *mainWindow;
98 
99  // File loaded successfully
100  bool readyToDraw = false;
101 
102  // Volume Data
103  Volume *volume;
104 
105  // Region seperator value (0,1)
106  float regionSeperator=0.5;
107 
108  // Region colors;
109  QColor regionColor1;
110  QColor regionColor2;
111 };
112 
113 #endif
Modified volume loader class from Vis 1.
Definition: Volume.h:76
uniform vec4 regionColor1
Definition: alpha.frag:21
uniform sampler3D volume
Definition: alpha.frag:16
uniform vec4 regionColor2
Definition: alpha.frag:22
uniform float regionSeperator
Definition: alpha.frag:17
The MainWindow class handliung GUI interactions.
Definition: MainWindow.h:31