]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuContourVOI.h
*** empty log message ***
[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 //==================================================================
69 /// User callback called in the box contructor
70 virtual void bbUserConstructor();
71 /// User callback called in the box copy constructor
72 virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
73 /// User callback called in the box destructor
74 virtual void bbUserDestructor();
75 //==================================================================
76   BBTK_DECLARE_INPUT(Title,std::string);
77     BBTK_DECLARE_INPUT(In, vtkImageData*);
78     BBTK_DECLARE_INPUT(wxVtkBaseView, wxVtkBaseView*);
79         BBTK_DECLARE_OUTPUT(Index,std::string);
80         BBTK_DECLARE_OUTPUT(Size,std::string);
81         BBTK_DECLARE_OUTPUT(VOI,vtkImageData*);
82   BBTK_PROCESS(Process);
83   void Process();
84   BBTK_CREATE_WIDGET(CreateWidget);
85   void CreateWidget(wxWindow*);
86
87 private:
88         vtkImageData* _img;
89         wxVtkBaseView* _base;
90         vtkExtractVOI*  _extract;
91
92 };
93
94 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ContourVOI,bbtk::WxBlackBox);
95 BBTK_NAME("ContourVOI");
96 BBTK_AUTHOR("Eduardo.Davila [at] creatis.insa-lyon.fr");
97 BBTK_DESCRIPTION("define VOI widget");
98 //BBTK_CATEGORY("__CategoryBlackBox__");
99     BBTK_INPUT(ContourVOI,Title,"Title prepended to the text",std::string,"");
100         BBTK_INPUT(ContourVOI,In,"Input Image", vtkImageData *,"" );
101         BBTK_INPUT(ContourVOI,wxVtkBaseView,"maracas visu wxVtkBaseView",wxVtkBaseView*,"");
102         BBTK_OUTPUT(ContourVOI,Index, "Index"   ,       std::string,"");
103         BBTK_OUTPUT(ContourVOI,Size, "Size"     ,       std::string,"");
104         BBTK_OUTPUT(ContourVOI,VOI,"Region of interest",vtkImageData*,"");
105 BBTK_END_DESCRIBE_BLACK_BOX(ContourVOI);
106 }
107 // EO namespace bbcreaMaracasVisu
108
109 #endif // __bbcreaMaracasVisuContourVOI_h_INCLUDED__
110 #endif // _USE_WXWIDGETS_
111