00001 // Author: Steven Bergner 00002 // Created: Oct01 00003 00004 #ifndef _vuSpectralUtility_h_ 00005 #define _vuSpectralUtility_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/Spectral/spectral.h" 00014 #include "vuTFunc/vuTFDesignSpec.h" 00015 #include "vuPreviewWin.h" 00016 00017 using namespace ns_vu1112112; 00018 00020 00026 class vuSpectral : public vuBasicUtility 00027 { 00028 enum { 00029 idDOSPECULAR, 00030 idDRAWPREV, 00031 }; 00032 public: 00034 vuSpectral(); 00036 ~vuSpectral(); 00037 00039 static const char* getFileType(); 00040 00044 bool init(const char* DataFile); 00045 00047 void notifyDataChanged(); 00048 00049 virtual vuCamera* getCamera (); 00050 virtual vuImage* getCurrentImage (); 00051 virtual void DrawFromImage (); 00052 virtual void DrawAgain(); 00053 00055 void handleGUIevent(wxCommandEvent& ev); 00056 public: 00057 //The following methods are overridden to add controls to the window. 00059 virtual void addRight(wxSizer *sizer); 00060 00061 protected: 00066 bool glInit(); 00067 00073 void glRender(); 00075 void glResize(); 00077 00081 void onMouse(wxMouseEvent &ev); 00082 00084 void OnSlideLight( wxScrollEvent& event); 00086 void OnButtonRender( wxCommandEvent& event); 00088 void OnButtonLoadSetup( wxCommandEvent& event); 00090 void OnButtonLightPos(wxCommandEvent& ev); 00091 00092 vu1 *vuSpectral::getVolume(); 00093 00094 private: 00096 vu1112112 *m_Data; 00099 vuTFDesignSpec m_TFunc; 00100 vuTFDialogSpec m_TFuncDlg; 00101 vuLightDial m_LightDial; 00102 00103 00106 wxSlider *m_LightColour, *m_LightIntensity; 00107 00109 int m_x; 00111 int m_y; 00112 00114 vuPreviewWin *m_Preview; 00115 00116 DECLARE_EVENT_TABLE() 00117 }; 00118 00119 #endif