]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.h
#3096 creaMaracasVisu Feature New Normal - Box ShowNPoints_Reset
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / WidgetShowNPoints.h
1
2
3 #ifndef __WidgetShowNPoints_h_INCLUDED__
4 #define __WidgetShowNPoints_h_INCLUDED__
5
6
7
8
9 #include "ModelShowNPoints.h"
10
11 #include <wx/panel.h>
12 #include <wx/textctrl.h>
13 #include <wx/slider.h>
14 #include <wx/stattext.h>
15 #include <vtkRenderer.h>
16 #include <vtkTextActor3D.h>
17 #include <vtkSphereSource.h>
18
19
20 class WidgetShowNPoints : public wxPanel
21 {
22   public:
23           WidgetShowNPoints( wxWindow *parent , int type );
24           ~WidgetShowNPoints(); 
25           void OnAddPoint(wxCommandEvent &event);   
26           void OnInsertPoint (wxCommandEvent& event);//CFT
27           void OnSetPoint(wxCommandEvent& event);
28           void OnRenamePoint(wxCommandEvent& event);
29           void OnErasePoint(wxCommandEvent& event);
30           void OnEraseLastPoint(wxCommandEvent &event); 
31           void OnDeleteAllPoints(wxCommandEvent &event);   
32           void OnSavePoints(wxCommandEvent &event);   
33           void OnLoadPoints(wxCommandEvent &event);
34
35           virtual void UpdatePoints(wxCommandEvent &event);
36           
37           void RefreshPoint(int id);
38           
39           void SetColour(std::vector<double> colour);
40           void SetOpacity(double opacity);
41           void SetRadio(double radio);
42           void SetImage(vtkImageData *image);
43           void SetRenderer(vtkRenderer *renderer);
44           void SetReferencePoint(std::vector<int> point);
45
46           void AddPoint(int x, int y, int z, std::string label);
47           void InsertPoint(int x, int y, int z, std::string label);//CFT
48           void DeleteAllPoints();
49
50           ModelShowNPoints* GetModelShowNPoints();
51           void RefreshPoints();
52           void AddVtkPoint();
53           void SetInitLstPoints( std::vector<int> initLstPointsX,  std::vector<int> initLstPointsY, std::vector<int> initLstPointsZ, std::vector<std::string> initLstLabels );
54
55                 void SetType(int type);
56                 int  GetType();
57
58                 double GetRadio();
59                 double GetOpacity();
60
61   protected:
62           virtual void                                  SetOutputBox();
63
64   private:
65           void                                  ErasePoint(int id);
66           vtkRenderer                   *renderer;
67           std::vector<vtkActor*>        lstActorsSphere;//NTU changed from prop3D to Actor
68           std::vector<vtkTextActor3D*>  lstActorsText;
69           //NTU: For updating points
70           std::vector<vtkSphereSource*> lstSourceSphere;
71           std::vector<double>                   mcolour;
72           wxStaticText                          *askPointLabel;
73           wxTextCtrl                            *textCtrl;
74           wxStaticText                          *txtNrPoints;
75           wxSlider                              *sdrOpacity;
76           wxSlider                              *sdrRadio;
77           ModelShowNPoints                              *mmodelShowNPoints;
78           int                                                   mtype;
79           double                                mopacity;
80 };
81
82
83
84
85
86
87 #endif // __WidgetShowNPoints_h_INCLUDED__
88