1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
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
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.
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
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 # ------------------------------------------------------------------------ */
26 #ifndef wxMaracasRenderTabbedPanel_H_
27 #define wxMaracasRenderTabbedPanel_H_
30 #include <wx/notebook.h>
32 #include "wxMaracasRenderImageManagementPanel.h"
33 #include "volumerenderermanager.h"
34 #include "wxMaracasSurfaceRenderingManager.h"
35 #include "wxVtkBaseView.h"
36 #include "wxMPRWidget.h"
39 class wxMaracasRenderTabbedPanel : public wxPanel
43 wxMaracasRenderTabbedPanel(wxWindow* parent, int id, wxVtk3DBaseView* _baseView);
44 ~wxMaracasRenderTabbedPanel();
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);
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);
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);
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);
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);
84 void onOpenParameters(wxCommandEvent& event);
85 void onColorChange(wxCommandEvent& event);
86 void onOpenCutter(wxCommandEvent& event);
87 void OnRefreshView(wxCommandEvent& event);
89 vtkImageData* getVolImage();
90 vtkImageData* getSurfAImage();
91 vtkImageData* getSurfBImage();
92 vtkImageData* getSurfCImage();
97 wxCheckBox* checkboxVol;
98 wxCheckBox* checkboxSA;
99 wxCheckBox* checkboxSB;
100 wxCheckBox* checkboxSC;
101 wxCheckBox* checkboxViewer;
102 wxPanel* controlPanelMPR3D;
106 wxVtk3DBaseView* baseView;
107 wxVtkMPR3DView* mwxvtkmpr3Dview;
108 vtkMPR3DDataViewer* vtkmpr3Ddataviewer;
113 wxMaracasRenderImageManagementPanel* dialog;
114 VolumeRendererManager* volmanager;
115 wxMaracasSurfaceRenderingManager* surrendmanager1;
116 wxMaracasSurfaceRenderingManager* surrendmanager2;
117 wxMaracasSurfaceRenderingManager* surrendmanager3;
119 DECLARE_EVENT_TABLE( );
122 #endif /*wxMaracasMultipleVolumeRendererPanel_H_*/