]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRendererView.h
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxMaracasRendererView.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: wxMaracasRendererView.h,v $
5   Language:  C++
6
7 =========================================================================*/
8
9 #ifndef __wxMaracasRendererViewPanelH__
10 #define __wxMaracasRendererViewPanelH__
11
12 #include <vector>
13 #include <wx/wx.h>
14 #include "wx/aui/aui.h"
15 #include <iostream>
16 #include "marTypes.h"
17 #include "vtkProp3D.h"
18 #include "wxVtkBaseView.h"
19
20 #include "wxMaracasRendererView.h"
21 #include "wxMaracasRenderTabbedPanel.h"
22 #include "wxMaracasMultipleVolumeRendererManager.h"
23 #include "wxMaracasSurfaceRenderingManager.h"
24
25 class  creaMaracasVisu_EXPORT  wxMaracasRendererView : public wxPanel
26 {
27
28 public:
29         wxMaracasRendererView( wxWindow* parent, std::string path);
30         ~wxMaracasRendererView( );
31
32         static wxMaracasRendererView* getInstance(wxWindow* parent,std::string path="");
33         static wxMaracasRendererView* getInstance();
34
35         std::string getPath();
36         wxMaracasRenderTabbedPanel* getTabbedPanel(int id) throw(char*);
37
38         void setRenderer(vtkRenderer*  renderer); /* throw(char*), */   // JPR
39         void setVtkBaseView(wxVtk3DBaseView* base);
40         void onLoadImageFile();
41         void addVolumes(vtkImageData* img, std::string pathfile, std::string filename);
42         void addPanels(wxMaracasRenderTabbedPanel* wxtabs, vtkImageData* img, std::string pathfile, std::string filename);
43
44         void deleteVolume(int volid);
45         std::vector<std::string> getFiles();
46
47 private:
48         static wxMaracasRendererView* instance;
49
50         std::vector<wxMaracasRenderTabbedPanel*> tabsVector;
51         std::vector<std::string> files;
52
53         wxAuiManager* wxauimanager;
54         wxToolBar * _toolb;
55
56         vtkRenderer*  _renderer;
57         wxVtk3DBaseView* baseView;
58         std::string _path;
59
60         int _idCount;
61 };
62
63 class ToolBarEventHandlerRenderer : public wxEvtHandler
64 {
65         public:
66                 ToolBarEventHandlerRenderer();
67                 ~ToolBarEventHandlerRenderer();
68
69                 void onLoadImageFile(wxCommandEvent& event);
70
71         private:
72
73                 DECLARE_EVENT_TABLE()
74         };
75
76 class ToolBarRenderer : public wxToolBar{
77
78 public:
79         ToolBarRenderer(wxWindow * parent,std::string iconsdir);
80         ~ToolBarRenderer(void);
81
82 private:
83
84         ToolBarEventHandlerRenderer* _evthand;
85 };
86
87 #endif