2 #ifndef __bbcreaMaracasVisuViewerMPR_h_INCLUDED__
3 #define __bbcreaMaracasVisuViewerMPR_h_INCLUDED__
4 #include "bbtkWxBlackBox.h"
6 #include "wxMaracasMPR.h"
7 #include "vtkImageData.h"
8 #include "vtkRenderer.h"
10 namespace bbcreaMaracasVisu
15 //--------------------------------------------------------------------------
17 class wxWidgetMPR : public wxPanel
20 wxWidgetMPR(ViewerMPR* box,wxWindow* parent, marImageData *marimagedata=NULL);
23 //if the MPR had generated the refresh event
24 void OnRefreshView(wxCommandEvent & event);
25 void OnDClickLeft(wxCommandEvent & event);
27 //Get the actual Point
28 std::vector <int> GetPoint();
30 vtkRenderer* GetRenderer();
35 void setMarImage(marImageData* marimagedata);
40 ViewerMPR *mbbViewerMPR;
41 wxMPRWidget2 *wxwidget;
42 std::vector<int> point;
44 DECLARE_EVENT_TABLE( );
48 //------------------------------------------------------------------------
49 //------------------------------------------------------------------------
50 //------------------------------------------------------------------------
54 class /*BBTK_EXPORT*/ ViewerMPR
56 public bbtk::WxBlackBox
58 BBTK_BLACK_BOX_INTERFACE(ViewerMPR,bbtk::WxBlackBox);
59 //==================================================================
60 /// User callback called in the box contructor
61 virtual void bbUserConstructor();
62 /// User callback called in the box copy constructor
63 virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
64 /// User callback called in the box destructor
65 virtual void bbUserDestructor();
66 //==================================================================
67 BBTK_DECLARE_INPUT(Title,std::string);
68 BBTK_DECLARE_INPUT(In, vtkImageData *);
69 BBTK_DECLARE_OUTPUT(Renderer,vtkRenderer *);
70 BBTK_DECLARE_OUTPUT(Point,std::vector<int>);
71 BBTK_PROCESS(Process);
73 BBTK_CREATE_WIDGET(CreateWidget);
74 void CreateWidget(wxWindow* parent);
77 wxWidgetMPR *wxwidget;
78 marImageData *marimagedata;
81 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ViewerMPR,bbtk::WxBlackBox);
82 BBTK_NAME("ViewerMPR");
83 BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
84 BBTK_DESCRIPTION("Maracas viewer MPR + 3D");
85 BBTK_CATEGORY("viewer");
86 BBTK_INPUT(ViewerMPR,Title,"Viewer MPR + 3D",std::string,"");
87 BBTK_INPUT(ViewerMPR,In,"Input image",vtkImageData*,"");
88 BBTK_OUTPUT(ViewerMPR,Renderer," This object accept actors of vtk type (ex. AddActor). ",vtkRenderer*,"");
89 BBTK_OUTPUT(ViewerMPR,Point," This is the point choose by the user ",std::vector<int>,"");
91 BBTK_END_DESCRIBE_BLACK_BOX(ViewerMPR);
93 // EO namespace bbcreaMaracasVisu
95 #endif // __bbcreaMaracasVisuViewerMPR_h_INCLUDED__
96 #endif // _USE_WXWIDGETS_