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
23 void OnSetPoint(wxCommandEvent& event);
24 void OnTrackPoint(wxCommandEvent& event);
26 void OnTrackPoint_tool();
28 void StopTrackPoint();
29 void DetectCollectionActive();
31 void OnRenamePoint(wxCommandEvent& event);
33 void OnErasePoint(wxCommandEvent& event);
34 void OnEraseLastPoint(wxCommandEvent &event);
35 void OnDeleteAllPoints(wxCommandEvent &event);
37 void OnSavePoints(wxCommandEvent &event);
38 void OnLoadPoints(wxCommandEvent &event);
40 virtual void UpdatePoints(wxCommandEvent &event);
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);
55 void RefreshCollectionText();
56 void RefreshColourCollection();
60 //void RefreshPoint(int id);
61 //void RefreshPoints();
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);
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();
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 );
80 void SetType(int type);
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();
97 virtual void SetOutputBox();
100 void ErasePoint(int id);
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;
110 std::vector<ViewShowNPoints*> lstViewShowNPoints;
113 //NTU: For updating points
114 wxStaticText * askPointLabel;
115 wxTextCtrl * textCtrl;
116 wxStaticText * txtNrCollections;
117 wxStaticText * txtNrPoints;
118 wxSlider * sdrOpacity;
120 wxCheckBox * cbTrackPoint;
122 std::vector<ModelShowNPoints*> lstModelShowNPoints;
124 int mActualCollection;
125 // bool trackPointFlag;
134 #endif // __WidgetShowNPoints_h_INCLUDED__