]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.h
b701facde79d0d9e83175ef20128a161b41dd5e9
[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
13 class WidgetShowNPoints : public wxPanel
14 {
15   public:
16           WidgetShowNPoints( wxWindow *parent , int type );
17           ~WidgetShowNPoints(); 
18           void OnAddPoint(wxCommandEvent &event);   
19           void OnInsertPoint(wxCommandEvent& event);//CFT
20           void OnSetPoint(wxCommandEvent& event);
21           void OnRenamePoint(wxCommandEvent& event);
22           void OnErasePoint(wxCommandEvent& event);
23           void OnEraseLastPoint(wxCommandEvent &event); 
24           void OnDeleteAllPoints(wxCommandEvent &event);   
25           void OnSavePoints(wxCommandEvent &event);   
26           void OnLoadPoints(wxCommandEvent &event);
27
28           virtual void UpdatePoints(wxCommandEvent &event);
29
30       void InsertCollection();
31       void OnInsertCollectionBefore(wxCommandEvent &event);
32       void OnInsertCollectionAfter(wxCommandEvent &event);
33       void OnDeleteCollection(wxCommandEvent &event);
34       void OnBackCollection(wxCommandEvent &event);
35       void OnNextCollection(wxCommandEvent &event);
36       void OnSaveCollections(wxCommandEvent &event);
37       void OnLoadCollections(wxCommandEvent &event);
38
39       void RefreshCollectionText();
40       void RefreshColourCollection();
41
42     
43       // EED 2022-05-19
44           //void RefreshPoint(int id);
45       //void RefreshPoints();
46       //void AddVtkPoint();
47
48           void SetColour(std::vector<double> colour);
49           void SetOpacity(double opacity);
50           void SetRadio(double radio);
51           void SetImage(vtkImageData *image);
52           void SetRenderer(vtkRenderer *renderer);
53           void SetReferencePoint(std::vector<int> point);
54
55           void AddPoint(int x, int y, int z, std::string label);
56           void InsertPoint(int x, int y, int z, std::string label);//CFT
57           void DeleteAllPoints();
58
59           ModelShowNPoints* GetModelShowNPoints();
60       ViewShowNPoints* GetViewShowNPoints();
61           void SetInitLstPoints( std::vector<int> initLstPointsX,  std::vector<int> initLstPointsY, std::vector<int> initLstPointsZ, std::vector<std::string> initLstLabels );
62
63                 void SetType(int type);
64                 int  GetType();
65
66                 double GetRadio();
67                 double GetOpacity();
68
69   protected:
70           virtual void                                  SetOutputBox();
71
72   private:
73           void                                      ErasePoint(int id);
74     
75       // EED 2022-05-19
76       //vtkRenderer                       *renderer;
77           //std::vector<vtkActor*>            lstActorsSphere;//NTU changed from prop3D to Actor
78           //std::vector<vtkTextActor3D*>      lstActorsText;
79       //std::vector<vtkSphereSource*>     lstSourceSphere;
80       //std::vector<double>               mcolour;
81       //ModelShowNPoints*                 mmodelShowNPoints;
82       //double                            mopacity;
83       std::vector<ViewShowNPoints*>       lstViewShowNPoints;
84
85           //NTU: For updating points
86           wxStaticText                              * askPointLabel;
87           wxTextCtrl                                * textCtrl;
88       wxStaticText                      * txtNrCollections;
89       wxStaticText                          * txtNrPoints;
90           wxSlider                                  * sdrOpacity;
91           wxSlider                                  * sdrRadio;
92     
93       std::vector<ModelShowNPoints*>    lstModelShowNPoints;
94           int                                                       mtype;
95       int                               mActualCollection;
96 };
97
98
99
100
101
102
103 #endif // __WidgetShowNPoints_h_INCLUDED__
104