]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRenderTabbedPanel.h
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxMaracasRenderTabbedPanel.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26 #ifndef wxMaracasRenderTabbedPanel_H_
27 #define wxMaracasRenderTabbedPanel_H_
28
29 #include <wx/wx.h>
30 #include <wx/notebook.h> 
31
32 #include "wxMaracasRenderImageManagementPanel.h"
33 #include "volumerenderermanager.h"
34 #include "wxMaracasSurfaceRenderingManager.h"
35 #include "wxVtkBaseView.h"
36 #include "wxMPRWidget.h"
37
38
39 class wxMaracasRenderTabbedPanel : public wxPanel
40 {
41         
42 public:
43         wxMaracasRenderTabbedPanel(wxWindow* parent, int id, wxVtk3DBaseView* _baseView);
44         ~wxMaracasRenderTabbedPanel();
45
46         void createControls(vtkImageData* inImg, std::string pathfile, std::string filename);
47         void setRenderer(vtkRenderer* rend);
48         void addVolume(vtkImageData* img, std::string dataname);
49         void addSurface1(vtkImageData* img, std::string dataname);
50         void addSurface2(vtkImageData* img, std::string dataname);
51         void addSurface3(vtkImageData* img, std::string dataname);
52
53         void deleteVolume(int volid);
54         void addRemoveActorV(int id, bool addremove);
55         void addRemoveActorSA(int id, bool addremove);
56         void addRemoveActorSB(int id, bool addremove);
57         void addRemoveActorSC(int id, bool addremove);
58         void addRemoveActorMPR(bool addremove);
59         void addMPROptions();
60
61         // ----- Volume rendering functions ----- //
62         void SetValuesColorPointsFunction(int volid, std::vector<double> greylevelcolors,std::vector<double> red,std::vector<double> green,std::vector<double> blue);
63         void SetValuesPointsFunction(int volid, std::vector<double> greylevel, std::vector<double> values);
64         vtkPiecewiseFunction* GetTransferFunction(int volumeid);
65         vtkColorTransferFunction* GetColorFunction(int volumeid);
66
67         // ----- Surface rendering functions ----- //
68         void changeOpacityA(int _propid, int value);
69         void changeIsoValueA(int propid, double value);
70         void changeColorA(int propid, double red, double green, double blue);
71         void changeOpacityB(int _propid, int value);
72         void changeIsoValueB(int propid, double value);
73         void changeColorB(int propid, double red, double green, double blue);
74         void changeOpacityC(int _propid, int value);
75         void changeIsoValueC(int propid, double value);
76         void changeColorC(int propid, double red, double green, double blue);
77         
78         void onCheckBoxVChange(wxCommandEvent& event);
79         void onCheckBoxSAChange(wxCommandEvent& event);
80         void onCheckBoxSBChange(wxCommandEvent& event);
81         void onCheckBoxSCChange(wxCommandEvent& event);
82         void onMPROptions(wxCommandEvent& event);
83
84         void onOpenParameters(wxCommandEvent& event);
85         void onColorChange(wxCommandEvent& event);
86         void onOpenCutter(wxCommandEvent& event);
87         void OnRefreshView(wxCommandEvent& event);
88
89         vtkImageData* getVolImage();
90         vtkImageData* getSurfAImage();
91         vtkImageData* getSurfBImage();
92         vtkImageData* getSurfCImage();
93
94         int getPropIdV();
95         
96 private:
97         wxCheckBox* checkboxVol;
98         wxCheckBox* checkboxSA;
99         wxCheckBox* checkboxSB;
100         wxCheckBox* checkboxSC;
101         wxCheckBox* checkboxViewer;
102         wxPanel*        controlPanelMPR3D;
103         wxNotebook* wxtabs;
104         wxString        volname;
105         
106         wxVtk3DBaseView*        baseView;
107         wxVtkMPR3DView*         mwxvtkmpr3Dview;
108         vtkMPR3DDataViewer* vtkmpr3Ddataviewer;
109
110         bool first;
111         int _id;
112
113         wxMaracasRenderImageManagementPanel*    dialog;
114         VolumeRendererManager* volmanager;
115         wxMaracasSurfaceRenderingManager*               surrendmanager1;
116         wxMaracasSurfaceRenderingManager*               surrendmanager2;
117         wxMaracasSurfaceRenderingManager*               surrendmanager3;
118
119         DECLARE_EVENT_TABLE( );
120 };
121
122 #endif /*wxMaracasMultipleVolumeRendererPanel_H_*/
123