2 #ifndef __bbcreaMaracasVisuShowNPoints_h_INCLUDED__
3 #define __bbcreaMaracasVisuShowNPoints_h_INCLUDED__
4 #include "bbtkWxBlackBox.h"
8 #include "vtkImageData.h"
9 #include "vtkRenderer.h"
11 namespace bbcreaMaracasVisu
16 //--------------------------------------------------------------------------
17 class WidgetShowNPoints : public wxPanel
20 WidgetShowNPoints( wxWindow *parent, ShowNPoints *box);
22 void OnAddPoint(wxCommandEvent &event);
23 void ErasePoint(int id);
24 void OnErasePoint(wxCommandEvent& event);
25 void OnEraseLastPoint(wxCommandEvent &event);
26 void OnDeleteAllPoints(wxCommandEvent &event);
29 void SetPoint(std::vector<int> ppoint);
30 void SetColour(std::vector<double> colour);
31 void SetOpacity(double opacity);
32 void SetRadio(double radio);
33 void SetImage(vtkImageData *image);
34 void SetRenderer(vtkRenderer *renderer);
35 std::vector<int> GetLstPointsX();
36 std::vector<int> GetLstPointsY();
37 std::vector<int> GetLstPointsZ();
38 std::vector<std::string> GetLstLabels();
41 ShowNPoints *mbbShowNPoints;
42 vtkRenderer *renderer;
43 std::vector<int> lstPointsX;
44 std::vector<int> lstPointsY;
45 std::vector<int> lstPointsZ;
46 std::vector<std::string> lstLabels;
47 std::vector<vtkProp3D*> lstActorsSphere;
48 std::vector<vtkProp3D*> lstActorsText;
50 std::vector<int> mpoint;
52 std::vector<double> mcolour;
60 class /*BBTK_EXPORT*/ ShowNPoints
62 public bbtk::WxBlackBox
64 BBTK_BLACK_BOX_INTERFACE(ShowNPoints,bbtk::WxBlackBox);
65 BBTK_DECLARE_INPUT(In, std::vector<int> );
66 BBTK_DECLARE_INPUT(Renderer, vtkRenderer* );
67 BBTK_DECLARE_INPUT(Image, vtkImageData* );
68 BBTK_DECLARE_INPUT(Colour, std::vector<double> );
69 BBTK_DECLARE_INPUT(Opacity, double );
70 BBTK_DECLARE_INPUT(Radio, double );
71 BBTK_DECLARE_OUTPUT( lstPointsX, std::vector<int> );
72 BBTK_DECLARE_OUTPUT( lstPointsY, std::vector<int> );
73 BBTK_DECLARE_OUTPUT( lstPointsZ, std::vector<int> );
74 BBTK_DECLARE_OUTPUT( lstLabels, std::vector<std::string> );
75 BBTK_PROCESS(Process);
77 BBTK_CREATE_WIDGET(CreateWidget);
78 void CreateWidget(wxWindow*);
81 WidgetShowNPoints *mwxwidget;
85 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ShowNPoints,bbtk::WxBlackBox);
86 BBTK_NAME("ShowNPoints");
87 BBTK_AUTHOR("Eduardo DAVILA");
88 BBTK_DESCRIPTION("widget that shows N moints in 3D (vtkActors)");
89 BBTK_CATEGORY("widgetVtk");
90 BBTK_INPUT(ShowNPoints,In,"One Point",std::vector<int>,"");
91 BBTK_INPUT(ShowNPoints,Renderer,"Renderer",vtkRenderer*,"");
92 BBTK_INPUT(ShowNPoints,Image,"vktkImageData",vtkImageData*,"");
93 BBTK_INPUT(ShowNPoints,Colour,"Colour of the actor",std::vector<double>,"colour");
94 BBTK_INPUT(ShowNPoints,Opacity,"Opacity of the actor",double,"");
95 BBTK_INPUT(ShowNPoints,Radio,"Radio of the spheres",double,"");
96 BBTK_OUTPUT(ShowNPoints , lstPointsX , " list of points X ", std::vector<int> ,"");
97 BBTK_OUTPUT(ShowNPoints , lstPointsY , " list of points Y ", std::vector<int> ,"");
98 BBTK_OUTPUT(ShowNPoints , lstPointsZ , " list of points Z ", std::vector<int> ,"");
99 BBTK_OUTPUT(ShowNPoints , lstLabels , " list of labels ", std::vector<std::string> ,"");
100 BBTK_END_DESCRIBE_BLACK_BOX(ShowNPoints);
102 // EO namespace bbcreaMaracasVisu
104 #endif // __bbcreaMaracasVisuShowNPoints_h_INCLUDED__
105 #endif // _USE_WXWIDGETS_