00001 // Author: Steven Bergner 00002 // Created: Oct01 00003 00004 #ifndef _vuSpectralFVRUtility_h_ 00005 #define _vuSpectralFVRUtility_h_ 00006 00007 #include "../vuBasicUtility.h" 00008 #include "../../wxUIElements/vuTransferCanvas.h" 00009 #include "../../wxUIElements/vuTFDialogSpec.h" 00010 #include "../../wxUIElements/vuLightDial.h" 00011 #include "../../wxUIElements/vuSpecPalette.h" 00012 #include "vuCamera.h" 00013 #include "Volume/Regular/Unimodal/3d/1B/Intensity/SpecFVR/specfvr.h" 00014 #include "vuTFunc/vuTFDesignSpec.h" 00015 #include "vuPreviewWin.h" 00016 00018 class vuSpecFVR : public vuBasicUtility 00019 { 00020 enum { 00021 idDOSPECULAR, 00022 idDRAWPREV, 00023 }; 00024 public: 00026 vuSpecFVR(); 00028 ~vuSpecFVR(); 00029 00031 static const char* getFileType(); 00032 00036 bool init(const char* DataFile); 00037 00039 void notifyDataChanged(); 00040 00041 virtual vuCamera* getCamera (); 00042 virtual vuImage* getCurrentImage (); 00043 virtual void DrawFromImage (); 00044 virtual void DrawAgain(); 00045 00047 void handleGUIevent(wxCommandEvent& ev); 00048 public: 00049 //The following methods are overridden to add controls to the window. 00051 virtual void addRight(wxSizer *sizer); 00052 00053 protected: 00058 bool glInit(); 00059 00063 void glRender(); 00065 void glResize(); 00067 00071 void glOnMouse(wxMouseEvent &ev); 00072 00074 void OnChar(wxKeyEvent& event); 00075 00077 void OnSlideLight( wxScrollEvent& event); 00079 void OnButtonRender( wxCommandEvent& event); 00081 void OnButtonTransform( wxCommandEvent& event); 00083 void OnButtonLightPos(wxCommandEvent& ev); 00084 00085 private: 00087 vu1112118 *m_Data; 00090 vuTFDesignSpec m_TFunc; 00091 vuTFDialogSpec m_TFuncDlg; 00092 vuLightDial m_LightDial; 00093 00094 00097 wxSlider *m_LightColour, *m_LightIntensity; 00098 00100 int m_x; 00102 int m_y; 00103 00107 bool m_DrawBBox; 00108 00110 vuPreviewWin *m_Preview; 00111 00112 DECLARE_EVENT_TABLE() 00113 }; 00114 00115 #endif