2 #ifndef __WidgetShowNPoints_h_INCLUDED__
3 #define __WidgetShowNPoints_h_INCLUDED__
5 #include "ModelShowNPoints.h"
6 #include "ViewShowNPoints.h"
9 #include <wx/textctrl.h>
10 #include <wx/slider.h>
11 #include <wx/stattext.h>
12 #include <wx/checkbox.h>
15 class WidgetShowNPoints : public wxPanel
18 WidgetShowNPoints( wxWindow *parent , int type );
20 void OnAddPoint(wxCommandEvent &event);
21 void OnInsertPoint(wxCommandEvent& event);//CFT
22 void OnSetPoint(wxCommandEvent& event);
23 void OnTrackPoint(wxCommandEvent& event);
25 void StopTrackPoint();
26 void DetectCollectionActive();
28 void OnRenamePoint(wxCommandEvent& event);
29 void OnErasePoint(wxCommandEvent& event);
30 void OnEraseLastPoint(wxCommandEvent &event);
31 void OnDeleteAllPoints(wxCommandEvent &event);
33 void OnSavePoints(wxCommandEvent &event);
34 void OnLoadPoints(wxCommandEvent &event);
36 virtual void UpdatePoints(wxCommandEvent &event);
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);
49 void RefreshCollectionText();
50 void RefreshColourCollection();
54 //void RefreshPoint(int id);
55 //void RefreshPoints();
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);
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();
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 );
73 void SetType(int type);
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();
89 virtual void SetOutputBox();
92 void ErasePoint(int id);
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;
102 std::vector<ViewShowNPoints*> lstViewShowNPoints;
105 //NTU: For updating points
106 wxStaticText * askPointLabel;
107 wxTextCtrl * textCtrl;
108 wxStaticText * txtNrCollections;
109 wxStaticText * txtNrPoints;
110 wxSlider * sdrOpacity;
112 wxCheckBox * cbTrackPoint;
114 std::vector<ModelShowNPoints*> lstModelShowNPoints;
116 int mActualCollection;
117 // bool trackPointFlag;
126 #endif // __WidgetShowNPoints_h_INCLUDED__