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 SetCurrentPoint(int idCurrentPoint );
21 void OnBackPoint(wxCommandEvent &event);
22 void OnNextPoint(wxCommandEvent &event);
23 void StopAutoAddPoints();
25 void OnAutoAddPoints_tool();
26 void OnAutoAddPoints_();
27 void OnAutoAddPoints(wxCommandEvent& event);
30 void OnAddPoint(wxCommandEvent &event);
31 void OnInsertPoint(wxCommandEvent& event);//CFT
33 void OnSetPoint(wxCommandEvent& event);
34 void OnTrackPoint(wxCommandEvent& event);
36 void OnTrackPoint_tool();
38 void StopTrackPoint();
39 void DetectCollectionActive();
41 void OnRenamePoint(wxCommandEvent& event);
43 void OnErasePoint(wxCommandEvent& event);
44 void OnEraseLastPoint(wxCommandEvent &event);
45 void DeleteAllPoints_();
46 void OnDeleteAllPoints_();
47 void OnDeleteAllPoints(wxCommandEvent &event);
49 void OnSavePoints(wxCommandEvent &event);
50 void OnLoadPoints(wxCommandEvent &event);
52 virtual void UpdatePoints(wxCommandEvent &event);
55 void InsertCollection();
56 void InsertCollectionBefore_();
57 void OnInsertCollectionBefore_();
58 void OnInsertCollectionBefore(wxCommandEvent &event);
59 void InsertCollectionAfter_();
60 void OnInsertCollectionAfter_();
61 void OnInsertCollectionAfter(wxCommandEvent &event);
62 void CreatePointsIntoNewCollection();
63 void OnDeleteCollection_();
64 void OnDeleteCollection(wxCommandEvent &event);
65 void DeleteCollection_();
66 void OnBackCollection(wxCommandEvent &event);
67 void OnNextCollection(wxCommandEvent &event);
68 void OnSaveCollections(wxCommandEvent &event);
69 void OnSaveCollections_( std::string filename );
70 void OnLoadCollections(wxCommandEvent &event);
71 void OnLoadCollections_( std::string filename );
72 void ResetCollections_();
73 void OnResetCollections_();
74 void OnResetCollections(wxCommandEvent &event);
75 void GetCollectionPoint(int idCol,int idPoint, double *pPoint);
77 void SetCollectionPoint(int idCol, int idPoint, std::vector<double> modPoint);
78 void SetActualCollection( int actual );
80 void OnUndo(wxCommandEvent &event);
81 void OnRedo(wxCommandEvent &event);
82 void UndoRedo_SaveCollection();
83 std::string GetUndoRedoFileName();
86 void RefreshCollectionText();
87 void RefreshColourCollection();
88 void InvertLstPoints_();
89 void OnInvertLstPoints_();
92 //void RefreshPoint(int id);
93 //void RefreshPoints();
96 void SetColour(std::vector<double> colour);
97 void SetOpacity(double opacity);
98 void SetRadio(double radio);
99 void SetImage(vtkImageData *image);
100 void SetRenderer(vtkRenderer *renderer);
101 void SetReferencePoint(std::vector<double> point);
103 void AddPoint(double x, double y, double z, std::string label);
104 void OnInsertPoint_();
105 void InsertPoint(double x, double y, double z, std::string label);//CFT
107 int GetLstModelShowNPointsSize();
108 ModelShowNPoints* GetModelShowNPoints();
109 ModelShowNPoints* GetModelShowNPoints(int id);
110 ViewShowNPoints* GetViewShowNPoints();
111 void SetInitLstPoints( std::vector<double> initLstPointsX, std::vector<double> initLstPointsY, std::vector<double> initLstPointsZ, std::vector<std::string> initLstLabels, std::vector<int> initLstIndexs );
113 void SetType(int type);
117 virtual void SetOutputBox();
118 void ErasePoint(int id);
120 std::vector<double> GetLstPointsX();
121 std::vector<double> GetLstPointsY();
122 std::vector<double> GetLstPointsZ();
123 std::vector<std::string> GetLstLabels();
124 std::vector<int> GetLstIndexs();
128 std::vector<ViewShowNPoints*> lstViewShowNPoints;
129 //NTU: For updating points
130 wxStaticText * askPointLabel;
131 wxTextCtrl * textCtrl;
132 wxStaticText * txtNrCollections;
133 wxStaticText * txtNrPoints;
134 wxSlider * sdrOpacity;
136 wxCheckBox * cbTrackPoint;
137 wxCheckBox * cbAutoAddPoints;
139 std::vector<ModelShowNPoints*> lstModelShowNPoints;
141 int mActualCollection;
145 std::string UndoRedoDir;
153 #endif // __WidgetShowNPoints_h_INCLUDED__