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);
74 void SetActualCollection( int actual );
76 void OnUndo(wxCommandEvent &event);
77 void OnRedo(wxCommandEvent &event);
78 void UndoRedo_SaveCollection();
79 std::string GetUndoRedoFileName();
82 void RefreshCollectionText();
83 void RefreshColourCollection();
84 void InvertLstPoints_();
85 void OnInvertLstPoints_();
88 //void RefreshPoint(int id);
89 //void RefreshPoints();
92 void SetColour(std::vector<double> colour);
93 void SetOpacity(double opacity);
94 void SetRadio(double radio);
95 void SetImage(vtkImageData *image);
96 void SetRenderer(vtkRenderer *renderer);
97 void SetReferencePoint(std::vector<double> point);
99 void AddPoint(double x, double y, double z, std::string label);
100 void OnInsertPoint_();
101 void InsertPoint(double x, double y, double z, std::string label);//CFT
103 int GetLstModelShowNPointsSize();
104 ModelShowNPoints* GetModelShowNPoints();
105 ModelShowNPoints* GetModelShowNPoints(int id);
106 ViewShowNPoints* GetViewShowNPoints();
107 void SetInitLstPoints( std::vector<double> initLstPointsX, std::vector<double> initLstPointsY, std::vector<double> initLstPointsZ, std::vector<std::string> initLstLabels, std::vector<int> initLstIndexs );
109 void SetType(int type);
113 virtual void SetOutputBox();
114 void ErasePoint(int id);
116 std::vector<double> GetLstPointsX();
117 std::vector<double> GetLstPointsY();
118 std::vector<double> GetLstPointsZ();
119 std::vector<std::string> GetLstLabels();
120 std::vector<int> GetLstIndexs();
124 std::vector<ViewShowNPoints*> lstViewShowNPoints;
125 //NTU: For updating points
126 wxStaticText * askPointLabel;
127 wxTextCtrl * textCtrl;
128 wxStaticText * txtNrCollections;
129 wxStaticText * txtNrPoints;
130 wxSlider * sdrOpacity;
132 wxCheckBox * cbTrackPoint;
133 wxCheckBox * cbAutoAddPoints;
135 std::vector<ModelShowNPoints*> lstModelShowNPoints;
137 int mActualCollection;
141 std::string UndoRedoDir;
149 #endif // __WidgetShowNPoints_h_INCLUDED__