From: Maria Zuluaga Date: Fri, 6 Feb 2009 17:00:36 +0000 (+0000) Subject: Error correction X-Git-Tag: EED.02Oct2009~126 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=57eb2bb8542bcd8c2cc3e5d03621df2b7298af79;p=creaMaracasVisu.git Error correction --- diff --git a/bbtk/src/bbmaracasvisuViewerNV.cxx b/bbtk/src/bbmaracasvisuViewerNV.cxx index e1c6bb5..8c034d8 100644 --- a/bbtk/src/bbmaracasvisuViewerNV.cxx +++ b/bbtk/src/bbmaracasvisuViewerNV.cxx @@ -55,29 +55,32 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ViewerNV,bbtk::WxBlackBox); //------------------------------------------------------------- void ViewerNV::Process() { - point.clear(); - point.push_back((int)mwxwidget->GetX()); - point.push_back((int)mwxwidget->GetY()); - point.push_back((int)mwxwidget->GetZ()); - bbSetOutputPoint(point); - -// WxBlackBox::Process(); - mwxwidget->SetImage( bbGetInputIn() ); - wxVtkBaseView *wvbv1 = mwxwidget->GetwxVtkBaseView(1); - wxVtkBaseView *wvbv2 = mwxwidget->GetwxVtkBaseView(2); - wxVtkBaseView *wvbv3 = mwxwidget->GetwxVtkBaseView(3); - wxVtkBaseView *wvbv4 = mwxwidget->GetwxVtkBaseView(4); - - //wxwidget->RefreshView(); - - bbSetOutputwxVtkBaseView1( wvbv1 ); - bbSetOutputwxVtkBaseView2( wvbv2 ); - bbSetOutputwxVtkBaseView3( wvbv3 ); - bbSetOutputwxVtkBaseView4( wvbv4 ); - if (wvbv1!=NULL) { bbSetOutputRenderer1( wvbv1->GetRenderer() ); } - if (wvbv2!=NULL) { bbSetOutputRenderer2( wvbv2->GetRenderer() ); } - if (wvbv3!=NULL) { bbSetOutputRenderer3( wvbv3->GetRenderer() ); } - if (wvbv4!=NULL) { bbSetOutputRenderer4( wvbv4->GetRenderer() ); } + if (mwxwidget != NULL) + { + point.clear(); + point.push_back((int)mwxwidget->GetX()); + point.push_back((int)mwxwidget->GetY()); + point.push_back((int)mwxwidget->GetZ()); + bbSetOutputPoint(point); + + // WxBlackBox::Process(); + mwxwidget->SetImage( bbGetInputIn() ); + wxVtkBaseView *wvbv1 = mwxwidget->GetwxVtkBaseView(1); + wxVtkBaseView *wvbv2 = mwxwidget->GetwxVtkBaseView(2); + wxVtkBaseView *wvbv3 = mwxwidget->GetwxVtkBaseView(3); + wxVtkBaseView *wvbv4 = mwxwidget->GetwxVtkBaseView(4); + + //wxwidget->RefreshView(); + + bbSetOutputwxVtkBaseView1( wvbv1 ); + bbSetOutputwxVtkBaseView2( wvbv2 ); + bbSetOutputwxVtkBaseView3( wvbv3 ); + bbSetOutputwxVtkBaseView4( wvbv4 ); + if (wvbv1!=NULL) { bbSetOutputRenderer1( wvbv1->GetRenderer() ); } + if (wvbv2!=NULL) { bbSetOutputRenderer2( wvbv2->GetRenderer() ); } + if (wvbv3!=NULL) { bbSetOutputRenderer3( wvbv3->GetRenderer() ); } + if (wvbv4!=NULL) { bbSetOutputRenderer4( wvbv4->GetRenderer() ); } + } } //------------------------------------------------------------- @@ -92,6 +95,7 @@ void ViewerNV::CreateWidget(wxWindow* parent) //------------------------------------------------------------- void ViewerNV::bbUserConstructor() { + mwxwidget = NULL; bbSetInputIn(NULL); std::vector vecNTypeViwer;