]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.h
6520d5f3700a0669342107e06987517d2aedac6d
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / WidgetShowNPoints.h
1
2 #ifndef __WidgetShowNPoints_h_INCLUDED__
3 #define __WidgetShowNPoints_h_INCLUDED__
4
5 #include "ModelShowNPoints.h"
6 #include "ViewShowNPoints.h"
7
8 #include <wx/panel.h>
9 #include <wx/textctrl.h>
10 #include <wx/slider.h>
11 #include <wx/stattext.h>
12 #include <wx/checkbox.h>
13
14
15 class WidgetShowNPoints : public wxPanel
16 {
17   public:
18           WidgetShowNPoints( wxWindow *parent , int type );
19           ~WidgetShowNPoints(); 
20           void OnAddPoint(wxCommandEvent &event);   
21           void OnInsertPoint(wxCommandEvent& event);//CFT
22           void OnSetPoint(wxCommandEvent& event);
23       void OnTrackPoint(wxCommandEvent& event);
24       void TrackPoint();
25       void StopTrackPoint();
26       void DetectCollectionActive();
27
28           void OnRenamePoint(wxCommandEvent& event);
29           void OnErasePoint(wxCommandEvent& event);
30           void OnEraseLastPoint(wxCommandEvent &event); 
31           void OnDeleteAllPoints(wxCommandEvent &event);
32     
33           void OnSavePoints(wxCommandEvent &event);   
34           void OnLoadPoints(wxCommandEvent &event);
35
36           virtual void UpdatePoints(wxCommandEvent &event);
37       void UpdatePoints_();
38
39       void InsertCollection();
40       void OnInsertCollectionBefore(wxCommandEvent &event);
41       void OnInsertCollectionAfter(wxCommandEvent &event);
42       void OnDeleteCollection(wxCommandEvent &event);
43       void DeleteCollection_();
44       void OnBackCollection(wxCommandEvent &event);
45       void OnNextCollection(wxCommandEvent &event);
46       void OnSaveCollections(wxCommandEvent &event);
47       void OnLoadCollections(wxCommandEvent &event);
48
49       void RefreshCollectionText();
50       void RefreshColourCollection();
51
52     
53       // EED 2022-05-19
54           //void RefreshPoint(int id);
55       //void RefreshPoints();
56       //void AddVtkPoint();
57
58           void SetColour(std::vector<double> colour);
59           void SetOpacity(double opacity);
60           void SetRadio(double radio);
61           void SetImage(vtkImageData *image);
62           void SetRenderer(vtkRenderer *renderer);
63           void SetReferencePoint(std::vector<int> point);
64
65           void AddPoint(int x, int y, int z, std::string label);
66           void InsertPoint(int x, int y, int z, std::string label);//CFT
67           void DeleteAllPoints();
68
69           ModelShowNPoints* GetModelShowNPoints();
70       ViewShowNPoints* GetViewShowNPoints();
71           void SetInitLstPoints( std::vector<int> initLstPointsX,  std::vector<int> initLstPointsY, std::vector<int> initLstPointsZ, std::vector<std::string> initLstLabels );
72
73                 void SetType(int type);
74                 int  GetType();
75
76                 double GetRadio();
77                 double GetOpacity();
78     
79     
80     std::vector<int> GetLstPointsX();
81     std::vector<int> GetLstPointsY();
82     std::vector<int> GetLstPointsZ();
83     std::vector<std::string> GetLstLabels();
84     std::vector<int> GetLstIndexs();
85
86     
87
88   protected:
89           virtual void                          SetOutputBox();
90
91   private:
92           void                                      ErasePoint(int id);
93     
94       // EED 2022-05-19
95       //vtkRenderer                       *renderer;
96           //std::vector<vtkActor*>            lstActorsSphere;//NTU changed from prop3D to Actor
97           //std::vector<vtkTextActor3D*>      lstActorsText;
98       //std::vector<vtkSphereSource*>     lstSourceSphere;
99       //std::vector<double>               mcolour;
100       //ModelShowNPoints*                 mmodelShowNPoints;
101       //double                            mopacity;
102       std::vector<ViewShowNPoints*>       lstViewShowNPoints;
103
104     
105           //NTU: For updating points
106           wxStaticText                              * askPointLabel;
107           wxTextCtrl                                * textCtrl;
108       wxStaticText                      * txtNrCollections;
109       wxStaticText                          * txtNrPoints;
110           wxSlider                                  * sdrOpacity;
111           wxSlider                                  * sdrRadio;
112       wxCheckBox                        * cbTrackPoint;
113     
114       std::vector<ModelShowNPoints*>    lstModelShowNPoints;
115           int                                                       mtype;
116       int                               mActualCollection;
117 //      bool                              trackPointFlag;
118       int                               idTrack;
119 };
120
121
122
123
124
125
126 #endif // __WidgetShowNPoints_h_INCLUDED__
127