00001
00002
00003 #ifndef _VU_SPHERIC_BROWSER_H_
00004 #define _VU_SPHERIC_BROWSER_H_
00005
00006 #include "../../vuBasicUtility.h"
00007 #include "Volume/Lightfield/Unimodal/Spheric/Browser/browser.h"
00008
00009 template<int SIZE,class TYPE>
00010 class vuSphericBrowser : public vuBasicUtility
00011 {
00012 protected:
00013
00014 enum
00015 {
00016 idBROWSELIGHTFIELD,
00017 idIMAGESCALE,
00018 idIMAGESCALE2ONE
00019 };
00020
00021 public:
00023 vuSphericBrowser();
00024
00026 ~vuSphericBrowser();
00027
00028 virtual const char *_titleString();
00029
00033 virtual bool init(const char* DataFile);
00034
00035
00036
00037
00038 virtual vuCamera* getCamera();
00039 virtual vuImage* getCurrentImage();
00040 virtual void DrawFromImage();
00041 virtual void DrawAgain();
00042
00044 wxString helpText();
00045
00046 public:
00047
00049 virtual void addRight(wxSizer *sizer);
00050 virtual void addBottom(wxSizer *sizer);
00051
00052 protected:
00057 bool glInit();
00058
00062 void glRender();
00063
00065
00066 void glResize();
00067
00068 void glOnMouse(wxMouseEvent &ev);
00069
00071 void OnChar(wxKeyEvent &event);
00072
00074 void OnBrowseViews(wxScrollEvent& event);
00075
00077 void OnScaleImage(wxScrollEvent& event);
00078
00080 #if wxMINOR_VERSION < 5
00081 void OnScaleImage2One(wxScrollEvent& event);
00082 #else
00083 void OnScaleImage2One(wxCommandEvent& event);
00084 #endif
00085
00087 void _updateIndexAndRefresh(dword idx);
00088
00090 void _updateScaleAndRefresh(int scale);
00091
00092 protected:
00094 vu1611_1<SIZE,TYPE> *m_Data;
00095
00098 wxSlider *m_ViewSlider;
00099 wxSlider *m_ImageScale;
00100
00101
00102 wxStaticText *m_ViewsText;
00103 };
00104
00105 template class vuSphericBrowser<1,byte>;
00106 template class vuSphericBrowser<2,byte>;
00107 template class vuSphericBrowser<3,byte>;
00108 template class vuSphericBrowser<1,float>;
00109 template class vuSphericBrowser<2,float>;
00110 template class vuSphericBrowser<3,float>;
00111
00112 #endif