#ifdef _USE_WXWIDGETS_ #ifndef __bbmaracasvisuViewerMPR_h_INCLUDED__ #define __bbmaracasvisuViewerMPR_h_INCLUDED__ #include "bbtkWxBlackBox.h" #include "wxMaracasMPR.h" #include "vtkImageData.h" #include "vtkRenderer.h" namespace bbmaracasvisu { //-------------------------------------------------------------------------- class ViewerMPR; class wxWidgetMPR : public wxPanel { public: wxWidgetMPR(ViewerMPR* box,wxWindow* parent, marImageData *marimagedata); ~wxWidgetMPR(); //if the MPR had generated the refresh event void OnRefreshView(wxCommandEvent & event); void OnDClickLeft(wxCommandEvent & event); //Get the actual Point std::vector GetPoint(); //Get renderer vtkRenderer* GetRenderer(); //refreshView void Refresh(); private: ViewerMPR *mbbViewerMPR; wxMPRWidget2 *wxwidget; std::vector point; DECLARE_EVENT_TABLE( ); }; //------------------------------------------------------------------------ //------------------------------------------------------------------------ //------------------------------------------------------------------------ class /*BBTK_EXPORT*/ ViewerMPR : public bbtk::WxBlackBox { BBTK_BLACK_BOX_INTERFACE(ViewerMPR,bbtk::WxBlackBox); //================================================================== /// User callback called in the box contructor virtual void bbUserConstructor(); /// User callback called in the box copy constructor virtual void bbUserCopyConstructor(); /// User callback called in the box destructor virtual void bbUserDestructor(); //================================================================== BBTK_DECLARE_INPUT(Title,std::string); BBTK_DECLARE_INPUT(In, vtkImageData *); BBTK_DECLARE_OUTPUT(Renderer,vtkRenderer *); BBTK_DECLARE_OUTPUT(Point,std::vector); BBTK_PROCESS(Process); void Process(); BBTK_CREATE_WIDGET(CreateWidget); void CreateWidget(); private: wxWidgetMPR *mwxwidgetmpr; }; BBTK_BEGIN_DESCRIBE_BLACK_BOX(ViewerMPR,bbtk::WxBlackBox); BBTK_NAME("ViewerMPR"); BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr"); BBTK_DESCRIPTION("Maracas viewer MPR + 3D"); BBTK_CATEGORY("viewer"); BBTK_INPUT(ViewerMPR,Title,"Viewer MPR + 3D",std::string,""); BBTK_INPUT(ViewerMPR,In,"Input image",vtkImageData*,""); BBTK_OUTPUT(ViewerMPR,Renderer," This object accept actors of vtk type (ex. AddActor). ",vtkRenderer*,""); BBTK_OUTPUT(ViewerMPR,Point," This is the point choose by the user ",std::vector,""); BBTK_END_DESCRIBE_BLACK_BOX(ViewerMPR); } // EO namespace bbmaracasvisu #endif // __bbmaracasvisuViewerMPR_h_INCLUDED__ #endif // _USE_WXWIDGETS_