]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuContourVOI.h
BUG void <method> .h
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuContourVOI.h
1
2
3 #ifdef _USE_WXWIDGETS_
4 #ifndef __bbcreaMaracasVisuContourVOI_h_INCLUDED__
5 #define __bbcreaMaracasVisuContourVOI_h_INCLUDED__
6 #include "bbtkWxBlackBox.h"
7
8
9 #include <vtkImageData.h>
10
11 #include "Contour/ContourVOIWidget.h"
12
13 namespace bbcreaMaracasVisu
14 {
15
16
17   //--------------------------------------------------------------------------
18   class ContourVOI;
19   class wxWidgetVOI : public wxPanel
20   {
21         public:
22                 wxWidgetVOI(wxWindow* parent, wxVtkBaseView *wxvtkbaseview=NULL, vtkImageData   *imagedata=NULL);
23                 ~wxWidgetVOI();
24             
25                 //if the MPR had generated the refresh event
26                 void OnRefreshView(wxCommandEvent & event);
27                 void OnDClickLeft(wxCommandEvent & event); 
28
29                 //refreshView
30                 void Refresh();
31
32                 ContourVOIWidget* GetContourVOIWidget();
33
34             void setImageData(vtkImageData * imagedata);
35                 void setBaseView(wxVtkBaseView * wxvtkbaseview);
36
37                 void initializeVOIWidget();
38
39         private:
40
41 //              ContourVOI                      *mbbViewerMPR;
42                 ContourVOIWidget        *mcontourvoiwidget;
43
44                 wxVtkBaseView * wxvtkbaseview;
45                 vtkImageData * imagedata;
46
47                 
48
49         DECLARE_EVENT_TABLE( );     
50   };
51   
52   //------------------------------------------------------------------------
53   //------------------------------------------------------------------------
54   //------------------------------------------------------------------------
55
56
57
58
59
60
61 class /*BBTK_EXPORT*/ ContourVOI
62  : 
63    public bbtk::WxBlackBox
64 {
65   BBTK_BLACK_BOX_INTERFACE(ContourVOI,bbtk::WxBlackBox);
66 //==================================================================
67 /// User callback called in the box contructor
68 virtual void bbUserConstructor();
69 /// User callback called in the box copy constructor
70 virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
71 /// User callback called in the box destructor
72 virtual void bbUserDestructor();
73 //==================================================================
74   BBTK_DECLARE_INPUT(Title,std::string);
75     BBTK_DECLARE_INPUT(In, vtkImageData*);
76     BBTK_DECLARE_INPUT(wxVtkBaseView, wxVtkBaseView*);
77         BBTK_DECLARE_OUTPUT(Index,std::string);
78         BBTK_DECLARE_OUTPUT(Size,std::string);
79   BBTK_PROCESS(Process);
80   void Process();
81   BBTK_CREATE_WIDGET(CreateWidget);
82   void CreateWidget(wxWindow*);
83
84 private:
85         vtkImageData* _img;
86         wxVtkBaseView* _base;
87
88 };
89
90 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ContourVOI,bbtk::WxBlackBox);
91 BBTK_NAME("ContourVOI");
92 BBTK_AUTHOR("Eduardo.Davila [at] creatis.insa-lyon.fr");
93 BBTK_DESCRIPTION("define VOI widget");
94 //BBTK_CATEGORY("__CategoryBlackBox__");
95     BBTK_INPUT(ContourVOI,Title,"Title prepended to the text",std::string,"");
96         BBTK_INPUT(ContourVOI,In,"Input Image", vtkImageData *,"" );
97         BBTK_INPUT(ContourVOI,wxVtkBaseView,"maracas visu wxVtkBaseView",wxVtkBaseView*,"");
98         BBTK_OUTPUT(ContourVOI,Index, "Index"   ,       std::string,"");
99         BBTK_OUTPUT(ContourVOI,Size, "Size"     ,       std::string,"");
100 BBTK_END_DESCRIBE_BLACK_BOX(ContourVOI);
101 }
102 // EO namespace bbcreaMaracasVisu
103
104 #endif // __bbcreaMaracasVisuContourVOI_h_INCLUDED__
105 #endif // _USE_WXWIDGETS_
106