]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererView.h
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxMaracasMultipleVolumeRendererView.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: wxMaracasMultipleVolumeRendererView.h,v $
5   Language:  C++
6   Date:      $Date: 2009/11/20 17:09:05 $
7   Version:   $Revision: 1.5 $
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 "wxMaracasMultipleVolumeRendererManager.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 private:
73         static wxMaracasMultipleVolumeRendererView* instance;
74
75         wxMaracasMultipleVolumeRendererManager* volmanager;
76         wxAuiManager* wxauimanager;
77         wxToolBar* _toolb;
78         
79         std::string _path;
80     std::vector<vtkImageData*> imgVect;
81 };
82
83 class ToolBarEventHandlerMultipleVolumeRenderer : public wxEvtHandler{
84
85         public:
86                 ToolBarEventHandlerMultipleVolumeRenderer();
87                 ~ToolBarEventHandlerMultipleVolumeRenderer();
88
89                 void onLoadImageFile(wxCommandEvent& event);
90
91         private:
92
93                 DECLARE_EVENT_TABLE()
94         };
95
96 class ToolBarMultipleVolumeRenderer : public wxToolBar{
97
98         
99 public:
100         ToolBarMultipleVolumeRenderer(wxWindow * parent,std::string iconsdir);
101         ~ToolBarMultipleVolumeRenderer(void);
102
103
104 private:
105
106         ToolBarEventHandlerMultipleVolumeRenderer* _evthand;
107
108 };
109
110 #endif
111