]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuContourVOI.h
re indent
[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
50         DECLARE_EVENT_TABLE( );     
51   };
52   
53   //------------------------------------------------------------------------
54   //------------------------------------------------------------------------
55   //------------------------------------------------------------------------
56
57
58
59
60
61
62 class /*BBTK_EXPORT*/ ContourVOI
63  : 
64    public bbtk::WxBlackBox
65 {
66   BBTK_BLACK_BOX_INTERFACE(ContourVOI,bbtk::WxBlackBox);
67   BBTK_DECLARE_INPUT(Title,std::string);
68     BBTK_DECLARE_INPUT(In, vtkImageData*);
69     BBTK_DECLARE_INPUT(wxVtkBaseView, wxVtkBaseView*);
70         BBTK_DECLARE_OUTPUT(Index,std::string);
71         BBTK_DECLARE_OUTPUT(Size,std::string);
72         BBTK_DECLARE_OUTPUT(VOI,vtkImageData*);
73   BBTK_PROCESS(Process);
74   void Process();
75   BBTK_CREATE_WIDGET(CreateWidget);
76   void CreateWidget(wxWindow*);
77
78 private:
79         vtkImageData* _img;
80         wxVtkBaseView* _base;
81 //EED 20Juin2011        vtkExtractVOI*  _extract;
82
83 };
84
85 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ContourVOI,bbtk::WxBlackBox);
86 BBTK_NAME("ContourVOI");
87 BBTK_AUTHOR("Eduardo.Davila [at] creatis.insa-lyon.fr");
88 BBTK_DESCRIPTION("define VOI widget");
89 //BBTK_CATEGORY("__CategoryBlackBox__");
90     BBTK_INPUT(ContourVOI,Title,"Title prepended to the text",std::string,"");
91         BBTK_INPUT(ContourVOI,In,"Input Image", vtkImageData *,"" );
92         BBTK_INPUT(ContourVOI,wxVtkBaseView,"maracas visu wxVtkBaseView",wxVtkBaseView*,"");
93         BBTK_OUTPUT(ContourVOI,Index, "Index"   ,       std::string,"");
94         BBTK_OUTPUT(ContourVOI,Size, "Size"     ,       std::string,"");
95         BBTK_OUTPUT(ContourVOI,VOI,"Region of interest",vtkImageData*,"");
96 BBTK_END_DESCRIBE_BLACK_BOX(ContourVOI);
97 }
98 // EO namespace bbcreaMaracasVisu
99
100 #endif // __bbcreaMaracasVisuContourVOI_h_INCLUDED__
101 #endif // _USE_WXWIDGETS_
102