]> 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
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
37       void RefreshCollectionText();
38
39     
40     // EED 2022-05-19
41           //void RefreshPoint(int id);
42       //void RefreshPoints();
43       //void AddVtkPoint();
44
45           void SetColour(std::vector<double> colour);
46           void SetOpacity(double opacity);
47           void SetRadio(double radio);
48           void SetImage(vtkImageData *image);
49           void SetRenderer(vtkRenderer *renderer);
50           void SetReferencePoint(std::vector<int> point);
51
52           void AddPoint(int x, int y, int z, std::string label);
53           void InsertPoint(int x, int y, int z, std::string label);//CFT
54           void DeleteAllPoints();
55
56           ModelShowNPoints* GetModelShowNPoints();
57       ViewShowNPoints* GetViewShowNPoints();
58           void SetInitLstPoints( std::vector<int> initLstPointsX,  std::vector<int> initLstPointsY, std::vector<int> initLstPointsZ, std::vector<std::string> initLstLabels );
59
60                 void SetType(int type);
61                 int  GetType();
62
63                 double GetRadio();
64                 double GetOpacity();
65
66   protected:
67           virtual void                                  SetOutputBox();
68
69   private:
70           void                                      ErasePoint(int id);
71     
72       // EED 2022-05-19
73       //vtkRenderer                       *renderer;
74           //std::vector<vtkActor*>            lstActorsSphere;//NTU changed from prop3D to Actor
75           //std::vector<vtkTextActor3D*>      lstActorsText;
76       //std::vector<vtkSphereSource*>     lstSourceSphere;
77       //std::vector<double>               mcolour;
78       //ModelShowNPoints*                 mmodelShowNPoints;
79       //double                            mopacity;
80       std::vector<ViewShowNPoints*>       lstViewShowNPoints;
81
82           //NTU: For updating points
83           wxStaticText                              * askPointLabel;
84           wxTextCtrl                                * textCtrl;
85       wxStaticText                      * txtNrCollections;
86       wxStaticText                          * txtNrPoints;
87           wxSlider                                  * sdrOpacity;
88           wxSlider                                  * sdrRadio;
89     
90       std::vector<ModelShowNPoints*>    lstModelShowNPoints;
91           int                                                       mtype;
92       int                               mActualCollection;
93 };
94
95
96
97
98
99
100 #endif // __WidgetShowNPoints_h_INCLUDED__
101