00001 #ifndef _VU_SPHERIC_REVOLVER_UTILITY_H_
00002 #define _VU_SPHERIC_REVOLVER_UTILITY_H_
00003
00004 #include <wx/wx.h>
00005 #include "../../vuBasicUtility.h"
00006 #include "vuCamera.h"
00007 #include "Volume/Lightfield/Unimodal/Spheric/IBR/ibr.h"
00008
00010 template <int SIZE, class TYPE>
00011 class vuSphericRevolver : public vuBasicUtility
00012 {
00013 protected:
00014 enum
00015 {
00016 idNUMBEROFVIEWS,
00017 idIMAGESCALE,
00018 idIMAGESCALE2ONE
00019 };
00020
00021 public:
00023 vuSphericRevolver();
00024
00026 ~vuSphericRevolver();
00027
00028 virtual const char *_titleString();
00029
00033 bool init(const char* DataFile);
00034
00035 public:
00036 virtual void addBottom(wxSizer *sizer);
00037
00038 protected:
00043 bool glInit();
00044
00046 void glRender();
00047
00049 void glResize();
00050
00052 void onMouse(wxMouseEvent &ev);
00053
00055 void onKeyboard(wxKeyEvent& event);
00056
00057 wxString helpText();
00058
00060 vu1 *getVolume();
00061
00062
00064 void OnChoiceNumberOfViews(wxCommandEvent& event);
00065
00067 void OnScaleImage(wxScrollEvent& event);
00068
00070 #if wxMINOR_VERSION < 5
00071 void OnScaleImage2One(wxScrollEvent& event);
00072 #else
00073 void OnScaleImage2One(wxCommandEvent& event);
00074 #endif
00075
00076 private:
00077 void _updateScaleAndRefresh(int scale);
00078
00079 protected:
00081 vu1611_2<SIZE,TYPE> *m_Data;
00082
00083 private:
00084
00085 wxChoice *m_CHOICEnumberOfViews;
00086 wxSlider *m_ImageScale;
00087
00088 public:
00089 virtual vuCamera* getCamera();
00090 virtual vuImage* getCurrentImage();
00091 virtual void DrawFromImage();
00092 virtual void DrawAgain();
00093 };
00094
00095
00096 template class vuSphericRevolver<1,byte>;
00097 template class vuSphericRevolver<2,byte>;
00098 template class vuSphericRevolver<3,byte>;
00099 template class vuSphericRevolver<1,float>;
00100 template class vuSphericRevolver<2,float>;
00101 template class vuSphericRevolver<3,float>;
00102
00103 #endif