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