]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.h
#3485 ShowNPionts for Multiple Groups
[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_();
23           void OnSetPoint(wxCommandEvent& event);
24       void OnTrackPoint(wxCommandEvent& event);
25       void OnTrackPoint_();
26       void OnTrackPoint_tool();
27       void TrackingPoint();
28       void StopTrackPoint();
29       void DetectCollectionActive();
30
31           void OnRenamePoint(wxCommandEvent& event);
32       void OnErasePoint_();
33           void OnErasePoint(wxCommandEvent& event);
34           void OnEraseLastPoint(wxCommandEvent &event); 
35           void OnDeleteAllPoints(wxCommandEvent &event);
36     
37           void OnSavePoints(wxCommandEvent &event);   
38           void OnLoadPoints(wxCommandEvent &event);
39
40           virtual void UpdatePoints(wxCommandEvent &event);
41       void UpdatePoints_();
42
43       void InsertCollection();
44       void OnInsertCollectionBefore(wxCommandEvent &event);
45       void OnInsertCollectionAfter_();
46       void OnInsertCollectionAfter(wxCommandEvent &event);
47       void OnDeleteCollection_();
48       void OnDeleteCollection(wxCommandEvent &event);
49       void DeleteCollection_();
50       void OnBackCollection(wxCommandEvent &event);
51       void OnNextCollection(wxCommandEvent &event);
52       void OnSaveCollections(wxCommandEvent &event);
53       void OnLoadCollections(wxCommandEvent &event);
54
55       void RefreshCollectionText();
56       void RefreshColourCollection();
57
58     
59       // EED 2022-05-19
60           //void RefreshPoint(int id);
61       //void RefreshPoints();
62       //void AddVtkPoint();
63
64           void SetColour(std::vector<double> colour);
65           void SetOpacity(double opacity);
66           void SetRadio(double radio);
67           void SetImage(vtkImageData *image);
68           void SetRenderer(vtkRenderer *renderer);
69           void SetReferencePoint(std::vector<int> point);
70
71           void AddPoint(int x, int y, int z, std::string label);
72       void OnInsertPoint_();
73           void InsertPoint(int x, int y, int z, std::string label);//CFT
74           void DeleteAllPoints();
75
76           ModelShowNPoints* GetModelShowNPoints();
77       ViewShowNPoints* GetViewShowNPoints();
78           void SetInitLstPoints( std::vector<int> initLstPointsX,  std::vector<int> initLstPointsY, std::vector<int> initLstPointsZ, std::vector<std::string> initLstLabels );
79
80                 void SetType(int type);
81                 int  GetType();
82
83                 double GetRadio();
84                 double GetOpacity();
85     
86     void CreatePatch01();
87     
88     std::vector<int> GetLstPointsX();
89     std::vector<int> GetLstPointsY();
90     std::vector<int> GetLstPointsZ();
91     std::vector<std::string> GetLstLabels();
92     std::vector<int> GetLstIndexs();
93
94     
95
96   protected:
97           virtual void                          SetOutputBox();
98
99   private:
100           void                                      ErasePoint(int id);
101     
102       // EED 2022-05-19
103       //vtkRenderer                       *renderer;
104           //std::vector<vtkActor*>            lstActorsSphere;//NTU changed from prop3D to Actor
105           //std::vector<vtkTextActor3D*>      lstActorsText;
106       //std::vector<vtkSphereSource*>     lstSourceSphere;
107       //std::vector<double>               mcolour;
108       //ModelShowNPoints*                 mmodelShowNPoints;
109       //double                            mopacity;
110       std::vector<ViewShowNPoints*>       lstViewShowNPoints;
111
112     
113           //NTU: For updating points
114           wxStaticText                              * askPointLabel;
115           wxTextCtrl                                * textCtrl;
116       wxStaticText                      * txtNrCollections;
117       wxStaticText                          * txtNrPoints;
118           wxSlider                                  * sdrOpacity;
119           wxSlider                                  * sdrRadio;
120       wxCheckBox                        * cbTrackPoint;
121     
122       std::vector<ModelShowNPoints*>    lstModelShowNPoints;
123           int                                                       mtype;
124       int                               mActualCollection;
125 //      bool                              trackPointFlag;
126       int                               idTrack;
127 };
128
129
130
131
132
133
134 #endif // __WidgetShowNPoints_h_INCLUDED__
135