]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbmaracasvisuContourVOI.cxx
BUG interaction ROI-creation line, rectangle, circle,
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuContourVOI.cxx
index cf35763703d5f6485645762b29fd8ce0447db133..55d64736a473973fe99aab4d9c2a1ff683025635 100644 (file)
@@ -20,7 +20,7 @@ END_EVENT_TABLE( );
   wxWidgetVOI::wxWidgetVOI(wxWindow* parent,  wxVtkBaseView *wxvtkbaseview, vtkImageData *imagedata)
          : wxPanel( parent, -1 )
   {
-               wxPanel *panel  = this;
+//             wxPanel *panel  = this;
 
                if(wxvtkbaseview!=NULL&&imagedata!=NULL){
 
@@ -62,7 +62,6 @@ END_EVENT_TABLE( );
 //--------------------------------------------------------------------------
   void wxWidgetVOI::Refresh()
   { 
-         printf("EED wxWidgetVOI::Refresh \n");
 //       wxwidget->RefreshView();
   }
 
@@ -72,7 +71,6 @@ END_EVENT_TABLE( );
   //---------------
   void wxWidgetVOI::OnRefreshView(wxCommandEvent &event)
   {
-         printf("EED wxWidgetVOI::OnRefreshView \n");
 /*
          if((wxwidget!=NULL) && (mbbViewerMPR!=NULL))
          {
@@ -90,7 +88,6 @@ END_EVENT_TABLE( );
 //--------------------------------------------------------------------------
   void wxWidgetVOI::OnDClickLeft(wxCommandEvent & event) 
   {
-         printf("EED wxWidgetVOI::OnDClickLeft \n");
 //     wxwidget->RefreshView();
   }
 
@@ -129,7 +126,7 @@ void ContourVOI::Process()
 
        wxWidgetVOI* wxwidgetvoi = (wxWidgetVOI*)bbGetOutputWidget();
 
-       if(base !=NULL && img != NULL && _img != img && _base != base){
+       if(base !=NULL && img != NULL && _img != img){
 
                _img = img;
                _base = base;
@@ -140,7 +137,7 @@ void ContourVOI::Process()
        }
 
        
-       if (wxwidgetvoi!=NULL){
+       if (wxwidgetvoi!=NULL && _img!=NULL && _base != NULL){
                ContourVOIWidget* contourvoiwidget = wxwidgetvoi->GetContourVOIWidget();
                
                int voi[6];
@@ -181,6 +178,9 @@ void ContourVOI::bbUserConstructor()
        bbSetInputIn(NULL);
        bbSetOutputWidget(NULL);
 
+       bbSetInputIn(NULL);
+       bbSetInputwxVtkBaseView(NULL);
+
 }
 
 //------------------------------------------------------