00001
00002
00003
00004
00005
00006
00007 #ifndef LEVELSETWIDGET_HH
00008 #define LEVELSETWIDGET_HH
00009
00010
00011
00012
00013
00014 #include "Types.hh"
00015 #include <ACG/QtWidgets/QtExaminerViewer.hh>
00016 #include <qmainwindow.h>
00017
00018 class QTimer;
00019 class QPopupMenu;
00020
00021
00022
00023
00024
00025 class LevelSetWidget : public QMainWindow
00026 {
00027 Q_OBJECT
00028
00029 public:
00030
00031
00032 LevelSetWidget(QWidget* _parent=0, const char* _name=0);
00033
00034 ~LevelSetWidget();
00035
00036
00037 void open_mesh(const char* _filename);
00038 void open_vol(const char* _filename);
00039
00040 void save_vol(const char* _filename);
00041
00042 void save_mesh(const char* _filename);
00043
00044
00045 private slots:
00046
00047 void slotMenu(int _item);
00048 void evolve();
00049
00050
00051 private:
00052
00053
00054 enum MenuItems {
00055
00056 CLEAR,
00057 OPEN_MESH,
00058 OPEN_VOL,
00059 SAVE_VOL,
00060 SAVE_MESH,
00061 QUIT,
00062
00063 EROSION,
00064 DILATION,
00065 MEANCURV,
00066 DIFFUSION,
00067 TIMESTEP,
00068 JUST_GROW,
00069 JUST_SHRINK,
00070 EVOLVE,
00071
00072 DEFAULT_COLOR,
00073 PPT_COLOR
00074 };
00075
00076
00077 void set_color_scheme(int _scheme);
00078
00079
00080
00081
00082 ACG::QtWidgets::QtExaminerViewer *examiner_widget_;
00083 QPopupMenu *levelset_menu_;
00084
00085
00086 LevelSetSurface ls_;
00087
00088
00089 MyMesh mesh_;
00090
00091
00092 SeparatorNode root_node_;
00093 MaterialNode mat_node_;
00094 MeshNode mesh_node_;
00095
00096
00097 int evolution_;
00098 double timestep_;
00099 QTimer* timer_;
00100
00101 int res_;
00102 float scale_;
00103
00104 };
00105
00106
00107
00108 #endif // LEVELSETWIDGET_HH defined
00109