]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuViewerMPR.h
re indent
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuViewerMPR.h
1 #ifdef _USE_WXWIDGETS_
2 #ifndef __bbcreaMaracasVisuViewerMPR_h_INCLUDED__
3 #define __bbcreaMaracasVisuViewerMPR_h_INCLUDED__
4 #include "bbtkWxBlackBox.h"
5
6 #include "wxMaracasMPR.h"
7 #include "vtkImageData.h"
8 #include "vtkRenderer.h"
9 #include "wxMPRWidget2.h"
10
11 namespace bbcreaMaracasVisu
12 {
13
14
15
16   //--------------------------------------------------------------------------
17   class ViewerMPR;
18   class wxWidgetMPR : public wxPanel
19   {
20         public:
21                 wxWidgetMPR(ViewerMPR* box,wxWindow* parent, marImageData       *marimagedata=NULL);
22                 ~wxWidgetMPR();
23             
24                 //if the MPR had generated the refresh event
25                 void OnRefreshView(wxCommandEvent & event);
26                 void OnDClickLeft(wxCommandEvent & event); 
27
28                 //Get the actual Point
29                 std::vector <int> GetPoint();
30                 //Get renderer
31                 vtkRenderer* GetRenderer();
32
33                 //refreshView
34                 void Refresh();
35
36                 void setImageData(vtkImageData* img);
37                 void ConfigureVTK();
38                 
39         private:
40                 
41                 ViewerMPR                       *mbbViewerMPR;
42                 wxMPRWidget2            *wxwidget;
43                 std::vector<int>        point;
44                         
45         DECLARE_EVENT_TABLE( );
46             
47   };
48   
49   //------------------------------------------------------------------------
50   //------------------------------------------------------------------------
51   //------------------------------------------------------------------------
52
53
54
55 class /*BBTK_EXPORT*/ ViewerMPR
56  : 
57    public bbtk::WxBlackBox
58 {
59   BBTK_BLACK_BOX_INTERFACE(ViewerMPR,bbtk::WxBlackBox);
60   BBTK_DECLARE_INPUT(Title,std::string);
61     BBTK_DECLARE_INPUT(In, vtkImageData *);
62     BBTK_DECLARE_OUTPUT(Renderer,vtkRenderer *);
63         BBTK_DECLARE_OUTPUT(Point,std::vector<int>);
64   BBTK_PROCESS(Process);
65   void Process();
66   BBTK_CREATE_WIDGET(CreateWidget);
67   void CreateWidget(wxWindow* parent);
68
69 private:
70   wxWidgetMPR *wxwidget;
71   vtkImageData  *_img;
72 };
73
74 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ViewerMPR,bbtk::WxBlackBox);
75         BBTK_NAME("ViewerMPR");
76         BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
77         BBTK_DESCRIPTION("Maracas viewer MPR + 3D");
78     BBTK_CATEGORY("viewer");
79     BBTK_INPUT(ViewerMPR,Title,"Viewer MPR + 3D",std::string,"");
80         BBTK_INPUT(ViewerMPR,In,"Input image",vtkImageData*,"");
81         BBTK_OUTPUT(ViewerMPR,Renderer," This object accept actors of vtk type (ex. AddActor). ",vtkRenderer*,"");
82         BBTK_OUTPUT(ViewerMPR,Point," This is the point choose by the user ",std::vector<int>,"");
83
84 BBTK_END_DESCRIBE_BLACK_BOX(ViewerMPR);
85 }
86 // EO namespace bbcreaMaracasVisu
87
88 #endif // __bbcreaMaracasVisuViewerMPR_h_INCLUDED__
89 #endif // _USE_WXWIDGETS_
90