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>
13 class WidgetShowNPoints : public wxPanel
16 WidgetShowNPoints( wxWindow *parent , int type );
18 void OnAddPoint(wxCommandEvent &event);
19 void OnInsertPoint(wxCommandEvent& event);//CFT
20 void OnSetPoint(wxCommandEvent& event);
21 void OnRenamePoint(wxCommandEvent& event);
22 void OnErasePoint(wxCommandEvent& event);
23 void OnEraseLastPoint(wxCommandEvent &event);
24 void OnDeleteAllPoints(wxCommandEvent &event);
25 void OnSavePoints(wxCommandEvent &event);
26 void OnLoadPoints(wxCommandEvent &event);
28 virtual void UpdatePoints(wxCommandEvent &event);
30 void InsertCollection();
31 void OnInsertCollectionBefore(wxCommandEvent &event);
32 void OnInsertCollectionAfter(wxCommandEvent &event);
33 void OnDeleteCollection(wxCommandEvent &event);
34 void OnBackCollection(wxCommandEvent &event);
35 void OnNextCollection(wxCommandEvent &event);
36 void OnSaveCollections(wxCommandEvent &event);
37 void OnLoadCollections(wxCommandEvent &event);
39 void RefreshCollectionText();
40 void RefreshColourCollection();
44 //void RefreshPoint(int id);
45 //void RefreshPoints();
48 void SetColour(std::vector<double> colour);
49 void SetOpacity(double opacity);
50 void SetRadio(double radio);
51 void SetImage(vtkImageData *image);
52 void SetRenderer(vtkRenderer *renderer);
53 void SetReferencePoint(std::vector<int> point);
55 void AddPoint(int x, int y, int z, std::string label);
56 void InsertPoint(int x, int y, int z, std::string label);//CFT
57 void DeleteAllPoints();
59 ModelShowNPoints* GetModelShowNPoints();
60 ViewShowNPoints* GetViewShowNPoints();
61 void SetInitLstPoints( std::vector<int> initLstPointsX, std::vector<int> initLstPointsY, std::vector<int> initLstPointsZ, std::vector<std::string> initLstLabels );
63 void SetType(int type);
70 virtual void SetOutputBox();
73 void ErasePoint(int id);
76 //vtkRenderer *renderer;
77 //std::vector<vtkActor*> lstActorsSphere;//NTU changed from prop3D to Actor
78 //std::vector<vtkTextActor3D*> lstActorsText;
79 //std::vector<vtkSphereSource*> lstSourceSphere;
80 //std::vector<double> mcolour;
81 //ModelShowNPoints* mmodelShowNPoints;
83 std::vector<ViewShowNPoints*> lstViewShowNPoints;
85 //NTU: For updating points
86 wxStaticText * askPointLabel;
87 wxTextCtrl * textCtrl;
88 wxStaticText * txtNrCollections;
89 wxStaticText * txtNrPoints;
90 wxSlider * sdrOpacity;
93 std::vector<ModelShowNPoints*> lstModelShowNPoints;
95 int mActualCollection;
103 #endif // __WidgetShowNPoints_h_INCLUDED__