X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbmaracasvisuViewerNV.cxx;h=0dae95ab6fdbfce86b6db3606eddecc04da14065;hb=63e29db9f3acfd1893ee3314de1bafb6d3475beb;hp=e404aaf4a0d2eabf7b24a5d64f6807dc0dc6e0d9;hpb=c1ba8d7d28d12e1cec9ae2eba05a49575d13f29e;p=creaMaracasVisu.git diff --git a/bbtk/src/bbmaracasvisuViewerNV.cxx b/bbtk/src/bbmaracasvisuViewerNV.cxx index e404aaf..0dae95a 100644 --- a/bbtk/src/bbmaracasvisuViewerNV.cxx +++ b/bbtk/src/bbmaracasvisuViewerNV.cxx @@ -37,7 +37,7 @@ void bbwxMaracas_N_ViewersWidget::OnRefreshView(wxCommandEvent & event) mbbViewerNV->point.push_back( (int)GetY() ); mbbViewerNV->point.push_back( (int)GetZ() ); mbbViewerNV->bbSetOutputPoint( mbbViewerNV->point ); - mbbViewerNV->bbSignalOutputModification(std::string("Point")); + mbbViewerNV->bbSignalOutputModification(std::string("Point")); wxMaracas_N_ViewersWidget::OnRefreshView(event); } @@ -46,7 +46,7 @@ void bbwxMaracas_N_ViewersWidget::OnRefreshView(wxCommandEvent & event) void bbwxMaracas_N_ViewersWidget::OnDClickLeft(wxCommandEvent & event) { wxMaracas_N_ViewersWidget::OnDClickLeft(event); - mbbViewerNV->bbSignalOutputModification(std::string("Point")); + mbbViewerNV->bbSignalOutputModification(std::string("Point")); } //------------------------------------------------------------- @@ -59,8 +59,8 @@ BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ViewerNV) BBTK_BLACK_BOX_IMPLEMENTATION(ViewerNV,bbtk::WxBlackBox); //------------------------------------------------------------- void ViewerNV::Process() -{ - vtkImageData* img = bbGetInputIn(); +{ + vtkImageData* img = bbGetInputIn(); /* double spc[3]; img->GetSpacing(spc); @@ -78,9 +78,9 @@ void ViewerNV::Process() if(img != NULL && mwxwidget != NULL){ if(!compareVectors(type, currenttype)){ mwxwidget->SetType(&type); - mwxwidget->UpdateLayout(img); - }else if (img != currentimg){ - mwxwidget->SetImage(img); + mwxwidget->UpdateLayout(img); + }else if (img != currentimg){ + mwxwidget->SetImage(img); //mwxwidget->UpdateLayout(img); } @@ -100,7 +100,7 @@ void ViewerNV::Process() point.push_back((int)mwxwidget->GetZ()); bbSetOutputPoint(point); - // WxBlackBox::Process(); + // WxBlackBox::Process(); // mwxwidget->SetImage(img ); wxVtkBaseView *wvbv1 = mwxwidget->GetwxVtkBaseView(1); wxVtkBaseView *wvbv2 = mwxwidget->GetwxVtkBaseView(2); @@ -118,9 +118,9 @@ void ViewerNV::Process() if (wvbv3!=NULL) { bbSetOutputRenderer3( wvbv3->GetRenderer() ); } if (wvbv4!=NULL) { bbSetOutputRenderer4( wvbv4->GetRenderer() ); } - if (wvbv1!=NULL) - { - bbSetOutputInteractor1( wvbv1->GetWxVTKRenderWindowInteractor() ); + if (wvbv1!=NULL) + { + bbSetOutputInteractor1( wvbv1->GetWxVTKRenderWindowInteractor() ); updateObservers(); } @@ -152,11 +152,11 @@ void ViewerNV::CreateWidget(wxWindow* parent) { bbtkDebugMessageInc("Core",9,"ViewerNV::CreateWidget()"<bbSignalOutputModification(); //Process(); } @@ -176,9 +176,9 @@ void ViewerNV::bbUserSetDefaultValues() std::vector vecNTypeViwer; vecNTypeViwer.push_back(5); - vecNTypeViwer.push_back(0); vecNTypeViwer.push_back(1); - vecNTypeViwer.push_back(3); + vecNTypeViwer.push_back(2); + vecNTypeViwer.push_back(0); bbSetInputnTypeView(vecNTypeViwer); bbSetOutputwxVtkBaseView1( NULL ); @@ -194,20 +194,20 @@ void ViewerNV::bbUserSetDefaultValues() bbSetInputColorLevel(-1); } -//----------------------------------------------------------------- +//----------------------------------------------------------------- void ViewerNV::bbUserInitializeProcessing() { } - -//----------------------------------------------------------------- + +//----------------------------------------------------------------- void ViewerNV::bbUserFinalizeProcessing() { } - -//----------------------------------------------------------------- - - - + +//----------------------------------------------------------------- + + + bool ViewerNV::compareVectors(std::vector type,std::vector currenttype){ bool ret = true; @@ -229,30 +229,30 @@ void ViewerNV::updateObservers(){ interactor = bbGetOutputInteractor1(); if(interactor){ if (bbGetInputObs1()!=NULL){ - bbGetInputObs1()->SetInteractor(interactor); - bbGetInputObs1()->EnabledOn(); + bbGetInputObs1()->SetInteractor(interactor); + bbGetInputObs1()->EnabledOn(); } - if (bbGetInputObs2()!=NULL) + if (bbGetInputObs2()!=NULL) { bbGetInputObs2()->SetInteractor(interactor); - bbGetInputObs2()->EnabledOn(); + bbGetInputObs2()->EnabledOn(); } - if (bbGetInputObs3()!=NULL) + if (bbGetInputObs3()!=NULL) { bbGetInputObs3()->SetInteractor(interactor); - bbGetInputObs3()->EnabledOn(); + bbGetInputObs3()->EnabledOn(); } - if (bbGetInputObs4()!=NULL) + if (bbGetInputObs4()!=NULL) { bbGetInputObs4()->SetInteractor(interactor); - bbGetInputObs4()->EnabledOn(); + bbGetInputObs4()->EnabledOn(); } - if (bbGetInputObs5()!=NULL) + if (bbGetInputObs5()!=NULL) { bbGetInputObs5()->SetInteractor(interactor); - bbGetInputObs5()->EnabledOn(); + bbGetInputObs5()->EnabledOn(); } - } + } } }