]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPanelCuttingImageData.h
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxPanelCuttingImageData.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 WXPANELCUTTINGIMAGEDATA_H_
27 #define WXPANELCUTTINGIMAGEDATA_H_
28
29 #include "vtkClipping3DDataViewer.h"
30
31 #include "figureCuttingCylinderModel.h"
32 #include "figureCuttingCubeModel.h"
33 #include "figureCuttingSphereModel.h"
34 #include "figureCuttingModel.h"
35
36 #include "wxVtk3DBaseView.h"
37
38 #include "vtkXYPlotActor.h"
39 #include "vtkCubeSource.h"
40 #include "vtkCylinderSource.h"
41 #include "vtkSphereSource.h"
42
43 #include "vtkPolyDataMapper.h"
44
45 class wxPanelCuttingImageData : public wxPanel
46 {
47 public:
48         wxPanelCuttingImageData (wxWindow *parent);
49         ~wxPanelCuttingImageData ();
50         void OnTransform(wxScrollEvent& event);
51         void OnOpacityFig(wxScrollEvent& event);
52         void OnTypeFig(wxCommandEvent& event);
53         void OnExtract(wxCommandEvent& event);
54         void SetVtkMPRBaseData( vtkMPRBaseData *vtkmprbasedata );
55         void SetVtkClipping3DDataViewer( vtkClipping3DDataViewer *vtkclipping3Ddataviewer );
56         void SetWxVtk3DBaseView( wxVtk3DBaseView * wxvtk3Dbaseview );
57
58         void SetParamsOfTransformation( );
59         void Configure();
60         void Refresh();
61         void RefreshView();
62         void RemoveActors();
63
64
65 private:
66         wxSlider                                                *_opacityFig;
67         wxSlider                                                *_scaleX;
68         wxSlider                                                *_scaleY;
69         wxSlider                                                *_scaleZ;
70         wxSlider                                                *_rotationX;
71         wxSlider                                                *_rotationY;
72         wxSlider                                                *_rotationZ;
73         
74         wxRadioButton                                   *_volIntern;
75         wxRadioButton                                   *_volExtern;
76         wxCheckBox                                              *_histogrammeAccumulated;
77         wxSlider                                                *_isoValue;
78         wxSlider                                                *_valueBeforeIsoValue;
79         wxSlider                                                *_valueAfterIsoValue;
80         wxChoice                                                *_typeFig;
81
82         wxStaticText                                    *_infoToVo;
83         wxStaticText                                    *_infoSuVo;
84         wxStaticText                                    *_infoSuVoA;
85         wxStaticText                                    *_infoPixLe;
86         wxStaticText                                    *_infoPixHi;
87
88         // Model
89         figureCuttingCylinderModel              *_modelCylinder;
90         figureCuttingCubeModel                  *_modelCube;
91         figureCuttingSphereModel                *_modelSphere;
92         figureCuttingModel                              *_actualCuttingModel;
93
94         // view
95         vtkCubeSource                                   *_vtkcube;
96         vtkSphereSource                                 *_vtksphere;
97         vtkCylinderSource                               *_vtkcylinder;
98         vtkPolyDataMapper                               *_cubeMapper;
99         vtkPolyDataMapper                               *_sphereMapper;
100         vtkPolyDataMapper                               *_cylinderMapper;
101         vtkActor                                                *_cubeActor;
102         vtkActor                                                *_sphereActor;
103         vtkActor                                                *_cylinderActor;
104         vtkActor                                                *_actualActor;
105
106
107         vtkMPRBaseData                                  *_vtkmprbasedata;
108         wxVtk3DBaseView                                 *_wxvtk3Dbaseview;
109         vtkImageData                                    *_imageData;
110         vtkClipping3DDataViewer                 *_vtkclipping3Ddataviewer;
111
112         vtkImageData                                    *_histogrammeVector;
113         vtkXYPlotActor                                  *_xyplot;
114         wxVtkBaseView                                   *_wxvtkbaseView;
115         vtkRenderer                                             *_renplotter;
116
117         void    CreateModel();
118         void    CreateInterface();
119         void    Create3DViewObjects();
120         void    RefreshOpacity();
121         wxWindow *CreatePlotHistogrammeInterface();
122         void    InitHistogramme();
123
124
125 protected:
126 };
127
128 #endif /*WXPANELCUTTINGIMAGEDATA_H_*/