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 OnUndo(wxCommandEvent &event);
74 void OnRedo(wxCommandEvent &event);
75 void UndoRedo_SaveCollection();
76 std::string GetUndoRedoFileName();
79 void RefreshCollectionText();
80 void RefreshColourCollection();
81 void InvertLstPoints_();
82 void OnInvertLstPoints_();
85 //void RefreshPoint(int id);
86 //void RefreshPoints();
89 void SetColour(std::vector<double> colour);
90 void SetOpacity(double opacity);
91 void SetRadio(double radio);
92 void SetImage(vtkImageData *image);
93 void SetRenderer(vtkRenderer *renderer);
94 void SetReferencePoint(std::vector<int> point);
96 void AddPoint(int x, int y, int z, std::string label);
97 void OnInsertPoint_();
98 void InsertPoint(int x, int y, int z, std::string label);//CFT
100 int GetLstModelShowNPointsSize();
101 ModelShowNPoints* GetModelShowNPoints();
102 ViewShowNPoints* GetViewShowNPoints();
103 void SetInitLstPoints( std::vector<int> initLstPointsX, std::vector<int> initLstPointsY, std::vector<int> initLstPointsZ, std::vector<std::string> initLstLabels );
105 void SetType(int type);
109 virtual void SetOutputBox();
110 void ErasePoint(int id);
112 std::vector<int> GetLstPointsX();
113 std::vector<int> GetLstPointsY();
114 std::vector<int> GetLstPointsZ();
115 std::vector<std::string> GetLstLabels();
116 std::vector<int> GetLstIndexs();
125 //vtkRenderer *renderer;
126 //std::vector<vtkActor*> lstActorsSphere;//NTU changed from prop3D to Actor
127 //std::vector<vtkTextActor3D*> lstActorsText;
128 //std::vector<vtkSphereSource*> lstSourceSphere;
129 //std::vector<double> mcolour;
130 //ModelShowNPoints* mmodelShowNPoints;
132 std::vector<ViewShowNPoints*> lstViewShowNPoints;
135 //NTU: For updating points
136 wxStaticText * askPointLabel;
137 wxTextCtrl * textCtrl;
138 wxStaticText * txtNrCollections;
139 wxStaticText * txtNrPoints;
140 wxSlider * sdrOpacity;
142 wxCheckBox * cbTrackPoint;
143 wxCheckBox * cbAutoAddPoints;
145 std::vector<ModelShowNPoints*> lstModelShowNPoints;
147 int mActualCollection;
148 // bool trackPointFlag;
152 std::string UndoRedoDir;
160 #endif // __WidgetShowNPoints_h_INCLUDED__