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, vtkRenderer *renderer, ShowNPoints *box);
22 void OnAddPoint(wxCommandEvent &event);
23 void OnErasePoint(wxCommandEvent &event);
24 void OnDeleteAllPoints(wxCommandEvent &event);
25 void SetPoint(std::vector<int> ppoint);
26 void SetColour(std::vector<double> colour);
27 void SetOpacity(double opacity);
28 void SetRadio(double radio);
29 void SetImage(vtkImageData *image);
30 std::vector<int> GetLstPointsX();
31 std::vector<int> GetLstPointsY();
32 std::vector<int> GetLstPointsZ();
35 ShowNPoints *mbbShowNPoints;
36 vtkRenderer *renderer;
37 std::vector<int> lstPointsX;
38 std::vector<int> lstPointsY;
39 std::vector<int> lstPointsZ;
40 std::vector<vtkActor*> lstActors;
42 std::vector<int> mpoint;
44 std::vector<double> mcolour;
51 class /*BBTK_EXPORT*/ ShowNPoints
53 public bbtk::WxBlackBox
55 BBTK_BLACK_BOX_INTERFACE(ShowNPoints,bbtk::WxBlackBox);
56 //==================================================================
57 /// User callback called in the box contructor
58 virtual void bbUserConstructor();
59 /// User callback called in the box copy constructor
60 virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
61 /// User callback called in the box destructor
62 virtual void bbUserDestructor();
63 //==================================================================
64 BBTK_DECLARE_INPUT(In, std::vector<int> );
65 BBTK_DECLARE_INPUT(Renderer, vtkRenderer* );
66 BBTK_DECLARE_INPUT(Image, vtkImageData* );
67 BBTK_DECLARE_INPUT(Colour, std::vector<double> );
68 BBTK_DECLARE_INPUT(Opacity, double );
69 BBTK_DECLARE_INPUT(Radio, double );
70 BBTK_DECLARE_OUTPUT( lstPointsX, std::vector<int> );
71 BBTK_DECLARE_OUTPUT( lstPointsY, std::vector<int> );
72 BBTK_DECLARE_OUTPUT( lstPointsZ, std::vector<int> );
73 BBTK_PROCESS(Process);
75 BBTK_CREATE_WIDGET(CreateWidget);
76 void CreateWidget(wxWindow*);
79 WidgetShowNPoints *mwxwidget;
83 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ShowNPoints,bbtk::WxBlackBox);
84 BBTK_NAME("ShowNPoints");
85 BBTK_AUTHOR("Eduardo DAVILA");
86 BBTK_DESCRIPTION("widget that shows N moints in 3D (vtkActors)");
87 BBTK_CATEGORY("widgetVtk");
88 BBTK_INPUT(ShowNPoints,In,"One Point",std::vector<int>,"");
89 BBTK_INPUT(ShowNPoints,Renderer,"Renderer",vtkRenderer*,"");
90 BBTK_INPUT(ShowNPoints,Image,"vktkImageData",vtkImageData*,"");
91 BBTK_INPUT(ShowNPoints,Colour,"Colour of the actor",std::vector<double>,"colour");
92 BBTK_INPUT(ShowNPoints,Opacity,"Opacity of the actor",double,"");
93 BBTK_INPUT(ShowNPoints,Radio,"Radio of the spheres",double,"");
94 BBTK_OUTPUT(ShowNPoints , lstPointsX , " list of points X ", std::vector<int> ,"");
95 BBTK_OUTPUT(ShowNPoints , lstPointsY , " list of points Y ", std::vector<int> ,"");
96 BBTK_OUTPUT(ShowNPoints , lstPointsZ , " list of points Z ", std::vector<int> ,"");
97 BBTK_END_DESCRIBE_BLACK_BOX(ShowNPoints);
99 // EO namespace bbcreaMaracasVisu
101 #endif // __bbcreaMaracasVisuShowNPoints_h_INCLUDED__
102 #endif // _USE_WXWIDGETS_