Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

LevelSetWidget.hh

00001 //=============================================================================
00002 //
00003 //  CLASS LevelSetWidget
00004 //
00005 //=============================================================================
00006 
00007 #ifndef LEVELSETWIDGET_HH
00008 #define LEVELSETWIDGET_HH
00009 
00010 
00011 //== INCLUDES =================================================================
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 //== CLASS DEFINITION =========================================================
00023 
00024 
00025 class LevelSetWidget : public QMainWindow
00026 {
00027   Q_OBJECT
00028   
00029 public:
00030    
00031   // constructor
00032   LevelSetWidget(QWidget* _parent=0, const char* _name=0);
00033   // destructor
00034   ~LevelSetWidget();
00035 
00036   // open volume dataset
00037   void open_mesh(const char* _filename);
00038   void open_vol(const char* _filename);
00039   // save volume to _filename
00040   void save_vol(const char* _filename);
00041   // save mesh to_ filename 
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   // menu items
00054   enum MenuItems {
00055     // file menu
00056     CLEAR,
00057     OPEN_MESH,
00058     OPEN_VOL,
00059     SAVE_VOL,
00060     SAVE_MESH,
00061     QUIT,
00062     // levelset menu
00063     EROSION,
00064     DILATION,
00065     MEANCURV,
00066     DIFFUSION,
00067     TIMESTEP,
00068     JUST_GROW,
00069     JUST_SHRINK,
00070     EVOLVE,
00071     // color menu
00072     DEFAULT_COLOR,
00073     PPT_COLOR
00074   };
00075 
00076 
00077   void set_color_scheme(int _scheme);
00078 
00079 
00080   
00081   // widgets
00082   ACG::QtWidgets::QtExaminerViewer  *examiner_widget_;
00083   QPopupMenu  *levelset_menu_;
00084 
00085   // volume 
00086   LevelSetSurface ls_;
00087 
00088   // mesh
00089   MyMesh  mesh_;
00090 
00091   // scenegraph  
00092   SeparatorNode root_node_;
00093   MaterialNode  mat_node_;
00094   MeshNode      mesh_node_;
00095 
00096   // level set evolution
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 //=============================================================================

Generated on Mon Jul 5 18:07:08 2004 for IsoEx by doxygen 1.3.6-20040222