]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceSTLWidget.h
BUG vtk contours
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxSurfaceSTLWidget.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: wxSurfaceSTLWidget.h,v $
5   Language:  C++
6   Date:      $Date: 2008/10/31 16:32:43 $
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 #ifndef __WX__3D__SURF__STL__WDG__
18 #define __WX__3D__SURF__STL__WDG__
19
20 //#include "wxVTKRenderWindowInteractor.h"
21 #include "vtk3DSurfaceSTLWidget.h"
22 #include <wx/wx.h>
23 #include <wx/slider.h>
24 #include <kernel/marInterface.h>
25
26 //----------------------------------------------------------------------------
27 /**
28  * \brief Panel class composed of a vtk renderwindow with double click available
29  * and add some buttons
30  */
31 class wxSurfaceSTLWidget : public wxPanel
32 {
33 public:
34     enum ToolBarIDs
35     {
36         ID_TOOL_BAR = 300,
37         ID_BUTTON_NEW_AXIS,
38         ID_BUTTON_DELETE_AXIS,
39         ID_CHECKBOX_ISOVISIBLE,
40         ID_SLIDER_ISOVAL,
41         ID_SLIDER_OPACITY,
42         ID_BUTTON_CHOOSE_COLOR,
43         ID_BUTTON_VESSELS_CONSTRUCTION,
44         ID_BUTTON_3D_CUTTER,
45         ID_BUTTON_EXPORT_STL,
46         ID_CHECKBOX_STL_VISIBLE,
47         ID_SLIDER_STL_THRESH,
48                 ID_CHECKBOX_INVERT_SLICE_ORDER,
49     };
50     enum WidgetsIDs
51     {
52         ID_WORLD3D = 800
53     };
54
55 public:
56
57     wxSurfaceSTLWidget(
58         wxWindow* parent,
59         wxWindowID id = -1,
60         const wxPoint& pos = wxDefaultPosition,
61         const wxSize& size = wxDefaultSize,
62         long style = wxScrolledWindowStyle,
63         const wxString& name = wxPanelNameStr
64         );
65
66     ~wxSurfaceSTLWidget( );
67
68
69         //vessels toolbar
70     void OnVesselConstruction(wxCommandEvent& event);
71     void On3DCutter(wxCommandEvent& event);
72     void OnExportAsSTL(wxCommandEvent& event);
73
74     //surface
75     void OnChooseSurfaceColor(wxCommandEvent& event);
76     void OnIsoVisible(wxCommandEvent& event);
77     void OnSTLSurfaceVisible(wxCommandEvent& event);
78
79     //slider isovalue
80     void OnSliderIsovalueScrollThumbrelease(wxScrollEvent& event);
81
82     //slider opacity
83     void OnSliderOpacityScrollThumbrelease(wxScrollEvent& event);
84
85         // Invers lecture order
86    void OnInvertSliceOrder(wxCommandEvent& WXUNUSED(event));
87
88
89     void OnSliderSTLSurfaceValueThumbrelease(wxScrollEvent& event);
90
91     void ShowMARACASData( marInterface* mar );
92
93     wxToolBar   *_axis_tb;
94     wxToolBar   *_vessels_tb;
95     wxCheckBox  *_isoVisible;
96     wxSlider    *_isoValue;
97     wxSlider    *_opacity;
98     wxButton    *_surface_color; //mat
99     wxCheckBox  *_stlIntSurfaceVisible;
100     wxCheckBox  *_stlExtSurfaceVisible;
101     wxSlider    *_stlSurfaceValue;
102     wxCheckBox  *_chkInvertSliceOrder;
103
104     marInterface* _mar;
105     
106     vtk3DSurfaceSTLWidget *_3DWorldSTL;
107
108     DECLARE_EVENT_TABLE( );
109 };
110
111 #endif // __WX__3D__SURF__STL__WDG__