]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbmaracasvisuContourVOI.h
remove home-made 'uint', 'uchar', 'ushort', etc replace by uint32_t, uint8_t, uint16_t
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuContourVOI.h
index 7c5ad734e2216641a478c842edf7926a554d1cf3..5395fbe354e3c8372e6319a4be4ae9d503bd1083 100644 (file)
@@ -7,6 +7,7 @@
 
 
 #include <vtkImageData.h>
+#include <vtkExtractVOI.h>
 
 #include "Contour/ContourVOIWidget.h"
 
@@ -19,7 +20,7 @@ namespace bbcreaMaracasVisu
   class wxWidgetVOI : public wxPanel
   {
        public:
-               wxWidgetVOI(wxWindow* parent, wxVtkBaseView *wxvtkbaseview, vtkImageData        *imagedata);
+               wxWidgetVOI(wxWindow* parent, wxVtkBaseView *wxvtkbaseview=NULL, vtkImageData   *imagedata=NULL);
                ~wxWidgetVOI();
            
                //if the MPR had generated the refresh event
@@ -31,11 +32,22 @@ namespace bbcreaMaracasVisu
 
                ContourVOIWidget* GetContourVOIWidget();
 
+           void setImageData(vtkImageData * imagedata);
+               void setBaseView(wxVtkBaseView * wxvtkbaseview);
+
+               void initializeVOIWidget();
+
        private:
 
 //             ContourVOI                      *mbbViewerMPR;
                ContourVOIWidget        *mcontourvoiwidget;
 
+               wxVtkBaseView * wxvtkbaseview;
+               vtkImageData * imagedata;
+               
+
+               
+
        DECLARE_EVENT_TABLE( );     
   };
   
@@ -53,23 +65,21 @@ class /*BBTK_EXPORT*/ ContourVOI
    public bbtk::WxBlackBox
 {
   BBTK_BLACK_BOX_INTERFACE(ContourVOI,bbtk::WxBlackBox);
-//==================================================================
-/// User callback called in the box contructor
-virtual void bbUserConstructor();
-/// User callback called in the box copy constructor
-virtual void bbUserCopyConstructor();
-/// User callback called in the box destructor
-virtual void bbUserDestructor();
-//==================================================================
   BBTK_DECLARE_INPUT(Title,std::string);
     BBTK_DECLARE_INPUT(In, vtkImageData*);
     BBTK_DECLARE_INPUT(wxVtkBaseView, wxVtkBaseView*);
        BBTK_DECLARE_OUTPUT(Index,std::string);
        BBTK_DECLARE_OUTPUT(Size,std::string);
+       BBTK_DECLARE_OUTPUT(VOI,vtkImageData*);
   BBTK_PROCESS(Process);
   void Process();
   BBTK_CREATE_WIDGET(CreateWidget);
-  void CreateWidget();
+  void CreateWidget(wxWindow*);
+
+private:
+       vtkImageData* _img;
+       wxVtkBaseView* _base;
+       vtkExtractVOI*  _extract;
 
 };
 
@@ -83,6 +93,7 @@ BBTK_DESCRIPTION("define VOI widget");
        BBTK_INPUT(ContourVOI,wxVtkBaseView,"maracas visu wxVtkBaseView",wxVtkBaseView*,"");
        BBTK_OUTPUT(ContourVOI,Index, "Index"   ,       std::string,"");
        BBTK_OUTPUT(ContourVOI,Size, "Size"     ,       std::string,"");
+       BBTK_OUTPUT(ContourVOI,VOI,"Region of interest",vtkImageData*,"");
 BBTK_END_DESCRIBE_BLACK_BOX(ContourVOI);
 }
 // EO namespace bbcreaMaracasVisu