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);
37 void RefreshCollectionText();
41 //void RefreshPoint(int id);
42 //void RefreshPoints();
45 void SetColour(std::vector<double> colour);
46 void SetOpacity(double opacity);
47 void SetRadio(double radio);
48 void SetImage(vtkImageData *image);
49 void SetRenderer(vtkRenderer *renderer);
50 void SetReferencePoint(std::vector<int> point);
52 void AddPoint(int x, int y, int z, std::string label);
53 void InsertPoint(int x, int y, int z, std::string label);//CFT
54 void DeleteAllPoints();
56 ModelShowNPoints* GetModelShowNPoints();
57 ViewShowNPoints* GetViewShowNPoints();
58 void SetInitLstPoints( std::vector<int> initLstPointsX, std::vector<int> initLstPointsY, std::vector<int> initLstPointsZ, std::vector<std::string> initLstLabels );
60 void SetType(int type);
67 virtual void SetOutputBox();
70 void ErasePoint(int id);
73 //vtkRenderer *renderer;
74 //std::vector<vtkActor*> lstActorsSphere;//NTU changed from prop3D to Actor
75 //std::vector<vtkTextActor3D*> lstActorsText;
76 //std::vector<vtkSphereSource*> lstSourceSphere;
77 //std::vector<double> mcolour;
78 //ModelShowNPoints* mmodelShowNPoints;
80 std::vector<ViewShowNPoints*> lstViewShowNPoints;
82 //NTU: For updating points
83 wxStaticText * askPointLabel;
84 wxTextCtrl * textCtrl;
85 wxStaticText * txtNrCollections;
86 wxStaticText * txtNrPoints;
87 wxSlider * sdrOpacity;
90 std::vector<ModelShowNPoints*> lstModelShowNPoints;
92 int mActualCollection;
100 #endif // __WidgetShowNPoints_h_INCLUDED__