X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=bbtk%2Fsrc%2FbbmaracasvisuViewerMPR.cxx;h=05191c7e91d9c389f4460cfb4deabc95b40b23a0;hb=5322e2d2422822246721a58a158e878f2516c742;hp=246ae620dc8ccfba782b19c47bdaf44aac9aa238;hpb=bd3d13602a749b74d531c24bdc36a9cc1e47d189;p=creaMaracasVisu.git diff --git a/bbtk/src/bbmaracasvisuViewerMPR.cxx b/bbtk/src/bbmaracasvisuViewerMPR.cxx index 246ae62..05191c7 100644 --- a/bbtk/src/bbmaracasvisuViewerMPR.cxx +++ b/bbtk/src/bbmaracasvisuViewerMPR.cxx @@ -40,10 +40,8 @@ END_EVENT_TABLE( ); panel -> Layout(); } - void wxWidgetMPR::setMarImage(marImageData* marimagedata){ - wxwidget->setMarImage(marimagedata, 1); - - + void wxWidgetMPR::setImageData(vtkImageData* img){ + wxwidget->setImageData(img, 1); } void wxWidgetMPR::ConfigureVTK(){ wxwidget->ConfigureVTK(); @@ -88,9 +86,10 @@ END_EVENT_TABLE( ); //--------------- void wxWidgetMPR::OnRefreshView(wxCommandEvent &event) { - + printf("EED wxWidgetMPR::OnRefreshView 01\n"); if((wxwidget!=NULL) && (mbbViewerMPR!=NULL)) { + printf("EED wxWidgetMPR::OnRefreshView 02\n"); point.clear(); point.push_back((int)wxwidget->GetVtkMPRBaseData()->GetX()); point.push_back((int)wxwidget->GetVtkMPRBaseData()->GetY()); @@ -122,19 +121,21 @@ BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ViewerMPR) BBTK_BLACK_BOX_IMPLEMENTATION(ViewerMPR,bbtk::WxBlackBox); void ViewerMPR::Process() { -printf("EED ViewerMPR::Process 01\n"); if (wxwidget!=NULL){ wxBusyCursor wait; - if(marimagedata==NULL){ - wxwidget->setMarImage(new marImageData(bbGetInputIn() )); + vtkImageData* img = bbGetInputIn(); + if(img!=NULL && img != _img){ + _img = img; + wxwidget->setImageData(_img); wxwidget->ConfigureVTK(); +// wxwidget->wxPanel::Refresh(); + wxwidget->Refresh(); +// wxwidget->Show(); + + } -printf("EED ViewerMPR::Process 02\n"); - wxwidget->wxPanel::Refresh(); - wxwidget->Show(); -// wxwidget->Refresh(); - } + bbSetOutputPoint( wxwidget->GetPoint() ); bbSetOutputRenderer( wxwidget->GetRenderer() ); } // wxwidget @@ -142,7 +143,6 @@ printf("EED ViewerMPR::Process 02\n"); void ViewerMPR::CreateWidget(wxWindow* parent) { -printf("EED ViewerMPR::CreateWidget \n"); bbtkDebugMessageInc("Core",9,"ViewerMPR::CreateWidget() " <