]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.h
e1308c3f6ad135f38f4434c877ea46733f7f7aa7
[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 #include "ViewShowNPoints.h"
11
12 #include <wx/panel.h>
13 #include <wx/textctrl.h>
14 #include <wx/slider.h>
15 #include <wx/stattext.h>
16
17
18 class WidgetShowNPoints : public wxPanel
19 {
20   public:
21           WidgetShowNPoints( wxWindow *parent , int type );
22           ~WidgetShowNPoints(); 
23           void OnAddPoint(wxCommandEvent &event);   
24           void OnInsertPoint (wxCommandEvent& event);//CFT
25           void OnSetPoint(wxCommandEvent& event);
26           void OnRenamePoint(wxCommandEvent& event);
27           void OnErasePoint(wxCommandEvent& event);
28           void OnEraseLastPoint(wxCommandEvent &event); 
29           void OnDeleteAllPoints(wxCommandEvent &event);   
30           void OnSavePoints(wxCommandEvent &event);   
31           void OnLoadPoints(wxCommandEvent &event);
32
33           virtual void UpdatePoints(wxCommandEvent &event);
34           
35     // EED 2022-05-19
36           //void RefreshPoint(int id);
37       //void RefreshPoints();
38       //void AddVtkPoint();
39
40           void SetColour(std::vector<double> colour);
41           void SetOpacity(double opacity);
42           void SetRadio(double radio);
43           void SetImage(vtkImageData *image);
44           void SetRenderer(vtkRenderer *renderer);
45           void SetReferencePoint(std::vector<int> point);
46
47           void AddPoint(int x, int y, int z, std::string label);
48           void InsertPoint(int x, int y, int z, std::string label);//CFT
49           void DeleteAllPoints();
50
51           ModelShowNPoints* GetModelShowNPoints();
52       ViewShowNPoints* GetViewShowNPoints();
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     
67       // EED 2022-05-19
68       //vtkRenderer                       *renderer;
69           //std::vector<vtkActor*>            lstActorsSphere;//NTU changed from prop3D to Actor
70           //std::vector<vtkTextActor3D*>      lstActorsText;
71       //std::vector<vtkSphereSource*>     lstSourceSphere;
72       //std::vector<double>               mcolour;
73       //ModelShowNPoints                *mmodelShowNPoints;
74       //double                            mopacity;
75       std::vector<ViewShowNPoints*>     lstViewShowNPoints;
76
77           //NTU: For updating points
78           wxStaticText                              *askPointLabel;
79           wxTextCtrl                                *textCtrl;
80           wxStaticText                              *txtNrPoints;
81           wxSlider                                  *sdrOpacity;
82           wxSlider                                  *sdrRadio;
83     
84     std::vector<ModelShowNPoints*>    lstModelShowNPoints;
85       int                               mActualLstPoints;
86   
87           int                                                       mtype;
88 };
89
90
91
92
93
94
95 #endif // __WidgetShowNPoints_h_INCLUDED__
96