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 StopAutoAddPoints();
22 void OnAutoAddPoints_tool();
23 void OnAutoAddPoints_();
24 void OnAutoAddPoints(wxCommandEvent& event);
25 void OnAddPoint(wxCommandEvent &event);
28 void OnInsertPoint(wxCommandEvent& event);//CFT
30 void OnSetPoint(wxCommandEvent& event);
31 void OnTrackPoint(wxCommandEvent& event);
33 void OnTrackPoint_tool();
35 void StopTrackPoint();
36 void DetectCollectionActive();
38 void OnRenamePoint(wxCommandEvent& event);
40 void OnErasePoint(wxCommandEvent& event);
41 void OnEraseLastPoint(wxCommandEvent &event);
42 void DeleteAllPoints_();
43 void OnDeleteAllPoints_();
44 void OnDeleteAllPoints(wxCommandEvent &event);
46 void OnSavePoints(wxCommandEvent &event);
47 void OnLoadPoints(wxCommandEvent &event);
49 virtual void UpdatePoints(wxCommandEvent &event);
52 void InsertCollection();
53 void InsertCollectionBefore_();
54 void OnInsertCollectionBefore_();
55 void OnInsertCollectionBefore(wxCommandEvent &event);
56 void InsertCollectionAfter_();
57 void OnInsertCollectionAfter_();
58 void OnInsertCollectionAfter(wxCommandEvent &event);
59 void OnDeleteCollection_();
60 void OnDeleteCollection(wxCommandEvent &event);
61 void DeleteCollection_();
62 void OnBackCollection(wxCommandEvent &event);
63 void OnNextCollection(wxCommandEvent &event);
64 void OnSaveCollections(wxCommandEvent &event);
65 void OnSaveCollections_( std::string filename );
66 void OnLoadCollections(wxCommandEvent &event);
67 void OnLoadCollections_( std::string filename );
68 void ResetCollections_();
69 void OnResetCollections_();
70 void OnResetCollections(wxCommandEvent &event);
71 void GetCollectionPoint(int idCol,int idPoint, double *pPoint);
73 void SetCollectionPoint(int idCol, int idPoint, std::vector<double> modPoint);
75 void OnUndo(wxCommandEvent &event);
76 void OnRedo(wxCommandEvent &event);
77 void UndoRedo_SaveCollection();
78 std::string GetUndoRedoFileName();
81 void RefreshCollectionText();
82 void RefreshColourCollection();
83 void InvertLstPoints_();
84 void OnInvertLstPoints_();
87 //void RefreshPoint(int id);
88 //void RefreshPoints();
91 void SetColour(std::vector<double> colour);
92 void SetOpacity(double opacity);
93 void SetRadio(double radio);
94 void SetImage(vtkImageData *image);
95 void SetRenderer(vtkRenderer *renderer);
96 void SetReferencePoint(std::vector<int> point);
98 void AddPoint(int x, int y, int z, std::string label);
99 void OnInsertPoint_();
100 void InsertPoint(int x, int y, int z, std::string label);//CFT
102 int GetLstModelShowNPointsSize();
103 ModelShowNPoints* GetModelShowNPoints();
104 ViewShowNPoints* GetViewShowNPoints();
105 void SetInitLstPoints( std::vector<int> initLstPointsX, std::vector<int> initLstPointsY, std::vector<int> initLstPointsZ, std::vector<std::string> initLstLabels );
107 void SetType(int type);
111 virtual void SetOutputBox();
112 void ErasePoint(int id);
114 std::vector<int> GetLstPointsX();
115 std::vector<int> GetLstPointsY();
116 std::vector<int> GetLstPointsZ();
117 std::vector<std::string> GetLstLabels();
118 std::vector<int> GetLstIndexs();
127 //vtkRenderer *renderer;
128 //std::vector<vtkActor*> lstActorsSphere;//NTU changed from prop3D to Actor
129 //std::vector<vtkTextActor3D*> lstActorsText;
130 //std::vector<vtkSphereSource*> lstSourceSphere;
131 //std::vector<double> mcolour;
132 //ModelShowNPoints* mmodelShowNPoints;
134 std::vector<ViewShowNPoints*> lstViewShowNPoints;
137 //NTU: For updating points
138 wxStaticText * askPointLabel;
139 wxTextCtrl * textCtrl;
140 wxStaticText * txtNrCollections;
141 wxStaticText * txtNrPoints;
142 wxSlider * sdrOpacity;
144 wxCheckBox * cbTrackPoint;
145 wxCheckBox * cbAutoAddPoints;
147 std::vector<ModelShowNPoints*> lstModelShowNPoints;
149 int mActualCollection;
150 // bool trackPointFlag;
154 std::string UndoRedoDir;
162 #endif // __WidgetShowNPoints_h_INCLUDED__