]> Creatis software - creaMaracasVisu.git/blob - lib/GUI/Wx/VolumeRenderer/wxMaracasMultipleVolumeRendererView.h
d6a6dfc304bda9a9fbfd30d3e365b2ad7dd4c2e9
[creaMaracasVisu.git] / lib / GUI / Wx / VolumeRenderer / wxMaracasMultipleVolumeRendererView.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: wxMaracasMultipleVolumeRendererView.h,v $
5   Language:  C++
6   Date:      $Date: 2011/05/31 18:58:10 $
7   Version:   $Revision: 1.1 $
8
9   Copyright: (c) 2002, 2003
10   License:
11
12      This software is distributed WITHOUT ANY WARRANTY; without even
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14      PURPOSE.  See the above copyright notice for more information.
15
16 =========================================================================*/
17
18 #ifndef __wxMaracasMultipleVolumeRendererViewPanelH__
19 #define __wxMaracasMultipleVolumeRendererViewPanelH__
20
21 #include <vector>
22 #include <wx/wx.h>
23 #include "wx/aui/aui.h"
24 #include <iostream>
25 #include "marTypes.h"
26 #include "vtkProp3D.h"
27
28 #include "volumerenderermanager.h"
29 #include "wxMaracasMultipleVolumeRendererPanel.h"
30
31
32
33 class  creaMaracasVisu_EXPORT  wxMaracasMultipleVolumeRendererView : public wxPanel
34 {
35
36 public:
37         wxMaracasMultipleVolumeRendererView( wxWindow* parent, std::string path);
38     ~wxMaracasMultipleVolumeRendererView( );
39
40         static wxMaracasMultipleVolumeRendererView* getInstance(wxWindow* parent,std::string path="");
41
42         static wxMaracasMultipleVolumeRendererView* getInstance();
43
44         void setRenderer(vtkRenderer*  renderer);
45         
46         void addVolume(vtkImageData* img, std::string dataname="");             
47
48         void loadVolume(wxString filename, wxString dataname);
49
50         void onLoadImageFile();
51
52         void addVolumeRendererPanel(wxMaracasMultipleVolumeRendererPanel* irmview, std::string dataname="");
53
54         std::string getPath();
55
56         void deleteVolume(int volid);
57
58         void addRemoveActor(int id, bool remove);       
59
60         void SetValuesColorPointsFunction(int volid, std::vector<double> greylevelcolors,std::vector<double> red,std::vector<double> green,std::vector<double> blue);
61         void SetValuesPointsFunction(int volid, std::vector<double> greylevel, std::vector<double> values);
62
63         void addVolumeViewPanel(wxMaracasMultipleVolumeRendererPanel* irmview, std::string dataname);
64
65         vtkPiecewiseFunction* GetTransferFunction(int volumeid);
66         vtkColorTransferFunction* GetColorFunction(int volumeid);
67
68         std::vector<vtkImageData*> GetOutputImages();
69
70         void changeCompositeMIPFunction(int id, int function);
71
72         VolumeRendererManager* getVolumeRenderManager();
73
74 private:
75         static wxMaracasMultipleVolumeRendererView* instance;
76
77         VolumeRendererManager* volmanager;
78         wxAuiManager* wxauimanager;
79         wxToolBar* _toolb;
80         
81         std::string _path;
82     std::vector<vtkImageData*> imgVect;
83 };
84
85 class ToolBarEventHandlerMultipleVolumeRenderer : public wxEvtHandler{
86
87         public:
88                 ToolBarEventHandlerMultipleVolumeRenderer();
89                 ~ToolBarEventHandlerMultipleVolumeRenderer();
90
91                 void onLoadImageFile(wxCommandEvent& event);
92
93         private:
94
95                 DECLARE_EVENT_TABLE()
96         };
97
98 class ToolBarMultipleVolumeRenderer : public wxToolBar{
99
100         
101 public:
102         ToolBarMultipleVolumeRenderer(wxWindow * parent,std::string iconsdir);
103         ~ToolBarMultipleVolumeRenderer(void);
104
105
106 private:
107
108         ToolBarEventHandlerMultipleVolumeRenderer* _evthand;
109
110 };
111
112 #endif
113