]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/CutModule/interface/CutModelView.h
04ba996b4ed80b182cfb426bd610fcc8c2a8f3b9
[creaMaracasVisu.git] / lib / maracasVisuLib / src / CutModule / interface / CutModelView.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: CutModelView.h,v $
5   Language:  C++
6   Date:      $Date: 2009/09/01 14:01:35 $
7   Version:   $Revision: 1.2 $
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 __CutModelViewPanelH__
19 #define __CutModelViewPanelH__
20
21 #include <vector>
22 #include <wx/wx.h>
23 #include <wx/radiobut.h>
24 #include "wx/aui/aui.h"
25 #include <iostream>
26 #include "marTypes.h"
27
28
29 #include "CutModelManager.h"
30 #include "CutModelException.h"
31
32 #include "vtkObject.h"
33 #include "vtkCommand.h"
34
35
36 class  creaMaracasVisu_EXPORT  CutModelView : public wxPanel, public vtkCommand
37 {
38
39 public:
40         CutModelView( wxWindow* parent,double* range);
41     ~CutModelView( );
42
43         virtual void Execute(vtkObject *wdg, unsigned long eventId, void* calldata) ;
44         
45         int getId(){
46                 return _id;
47         }
48         void setId(int id){
49                 _id = id;
50         }
51         
52         void ExecuteCut();
53
54         void SetCurrentColor(wxColour colour);
55         
56 private:        
57
58         int _id;
59
60         wxSlider* _sliderrange;
61         wxRadioBox* _radioinsideout;
62         //wxRadioBox* _radiocutstat;
63         wxStaticText* _currentcolor;
64
65         double* getRange();
66         bool isCut();
67         bool isInside();
68
69
70
71         wxSizer* getBoxControls(wxWindow* parent, double* range);
72
73
74         wxSizer* getActorProperties(wxWindow* parent);
75         wxSizer* getColorChooseActor(wxWindow* parent);
76         wxSizer* getOpacityActor(wxWindow* parent);
77
78         void checkInvariant() throw( CutModelException);
79
80 };
81
82 class CutModelViewEventHandler : public wxEvtHandler{
83
84         public:
85                 CutModelViewEventHandler(): wxEvtHandler(){};
86                 ~CutModelViewEventHandler(){};
87
88                 void onColorChange(wxCommandEvent& event);                      
89                 void onOpacityChange(wxScrollEvent& event);
90                 void onViewBoxChecked(wxCommandEvent& event);
91                 void onShapeChange(wxCommandEvent& event);
92                 void onStatistics(wxCommandEvent& event);
93                 void onExecute(wxCommandEvent& event);
94                 
95
96
97         private:
98                 
99 };
100
101
102 #endif
103