+ wxWidgetVOI* wxwidgetvoi = (wxWidgetVOI*)bbGetOutputWidget();
+
+ if(base !=NULL && img != NULL && _img != img){
+
+ _img = img;
+ _base = base;
+
+ wxwidgetvoi->setBaseView(base);
+ wxwidgetvoi->setImageData(img);
+ wxwidgetvoi->initializeVOIWidget();
+ }
+
+ if (wxwidgetvoi!=NULL && _img!=NULL && _base != NULL){
+ ContourVOIWidget* contourvoiwidget = wxwidgetvoi->GetContourVOIWidget();
+
+ int voi[6];
+ contourvoiwidget->GetVOI(voi);
+ char buffer[40];
+ sprintf(buffer,"%d %d %d ", voi[0], voi[2], voi[4] );
+ std::string Index(buffer);
+ sprintf(buffer,"%d %d %d ", voi[1]-voi[0]+1, voi[3]-voi[2]+1, voi[5]-voi[4]+1 );
+ std::string Size(buffer);
+
+ std::cout<<"ContourVOI index "<<Index<<" size "<<Size<<std::endl;
+
+ /*EED 20 Juin 2011
+ This go out of the box ... see ExtractVtkImageFilter ...
+
+ //JCP
+ if(_extract!=NULL){
+ _extract->Delete();
+ }
+ _extract = vtkExtractVOI::New();
+ _extract->RemoveAllInputs();
+ _extract->SetInput(img);
+ _extract->SetVOI(voi);
+ _extract->UpdateWholeExtent();
+ _extract->Update();
+ bbSetOutputVOI(_extract->GetOutput());
+ //JCP
+ */
+
+ bbSetOutputIndex( Index );
+ bbSetOutputSize( Size );
+ }
+}
+
+//------------------------------------------------------
+void ContourVOI::CreateWidget(wxWindow* parent)
+{
+ bbtkDebugMessageInc("Core",9,"ContourVOI::CreateWidget()"<<std::endl);
+ wxWidgetVOI *mwxwidget = new wxWidgetVOI( parent );