+ wxFlexGridSizer *sizer=new wxFlexGridSizer(1);
+ sizer -> AddGrowableCol(0);
+ this -> SetSizer(sizer);
+ this -> SetAutoLayout(true);
+ this->wxvtkbaseview = NULL;
+ mcontourvoiwidget=NULL;
+
+
+ if(wxvtkbaseview!=NULL&&imagedata!=NULL){
+
+ setBaseView(wxvtkbaseview);
+ setImageData(imagedata);
+ initializeVOIWidget();
+
+ }
+
+
+ }
+ void wxWidgetVOI::initializeVOIWidget(){
+ wxSizer* sizer = this->GetSizer();
+
+
+ if(mcontourvoiwidget!=NULL){
+ sizer->Remove( mcontourvoiwidget );
+ mcontourvoiwidget->Destroy();
+ }
+
+ mcontourvoiwidget = new ContourVOIWidget( this, wxvtkbaseview, imagedata );