From 63e29db9f3acfd1893ee3314de1bafb6d3475beb Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Wed, 6 Oct 2010 07:19:40 +0000 Subject: [PATCH] *** empty log message *** --- bbtk/src/bbmaracasvisuViewerNV.cxx | 70 +++++++++++++++--------------- bbtk/src/bbmaracasvisuViewerNV.h | 16 +++---- 2 files changed, 43 insertions(+), 43 deletions(-) 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(); } - } + } } } diff --git a/bbtk/src/bbmaracasvisuViewerNV.h b/bbtk/src/bbmaracasvisuViewerNV.h index e654f01..5407a00 100644 --- a/bbtk/src/bbmaracasvisuViewerNV.h +++ b/bbtk/src/bbmaracasvisuViewerNV.h @@ -20,13 +20,13 @@ namespace bbcreaMaracasVisu public: bbwxMaracas_N_ViewersWidget(ViewerNV* box,wxWindow *parent, vtkImageData* imagedata=NULL, std::vector *nTypeView=NULL); ~bbwxMaracas_N_ViewersWidget(); - + //if the MPR had generated the refresh event void OnRefreshView(wxCommandEvent &event); void OnDClickLeft(wxCommandEvent &event); private: ViewerNV *mbbViewerNV; - DECLARE_EVENT_TABLE( ); + DECLARE_EVENT_TABLE( ); }; //------------------------------------------------------------------- @@ -34,7 +34,7 @@ namespace bbcreaMaracasVisu //------------------------------------------------------------------- class /*BBTK_EXPORT*/ ViewerNV - : + : public bbtk::WxBlackBox { BBTK_BLACK_BOX_INTERFACE(ViewerNV,bbtk::WxBlackBox); @@ -43,13 +43,13 @@ class /*BBTK_EXPORT*/ ViewerNV BBTK_DECLARE_INPUT(nTypeView, std::vector ); BBTK_DECLARE_INPUT(ColorFunction, vtkColorTransferFunction* ); BBTK_DECLARE_INPUT(WindowLevel, int ); - BBTK_DECLARE_INPUT(ColorLevel, int ); + BBTK_DECLARE_INPUT(ColorLevel, int ); BBTK_DECLARE_INPUT(Obs1, vtkInteractorObserver *); BBTK_DECLARE_INPUT(Obs2, vtkInteractorObserver *); BBTK_DECLARE_INPUT(Obs3, vtkInteractorObserver *); BBTK_DECLARE_INPUT(Obs4, vtkInteractorObserver *); BBTK_DECLARE_INPUT(Obs5, vtkInteractorObserver *); - + BBTK_DECLARE_OUTPUT(wxVtkBaseView1,wxVtkBaseView*); BBTK_DECLARE_OUTPUT(wxVtkBaseView2,wxVtkBaseView*); BBTK_DECLARE_OUTPUT(wxVtkBaseView3,wxVtkBaseView*); @@ -67,7 +67,7 @@ class /*BBTK_EXPORT*/ ViewerNV void CreateWidget(wxWindow* parent); std::vector point; -private: +private: bool firsttime; vtkImageData* currentimg; @@ -85,7 +85,7 @@ BBTK_DESCRIPTION("Viewer : N view configuration 2D and 3D"); BBTK_CATEGORY("viewer"); BBTK_INPUT(ViewerNV,Title,"Title prepended to the text",std::string,""); BBTK_INPUT(ViewerNV,In,"Input image",vtkImageData*,""); - BBTK_INPUT(ViewerNV,nTypeView,"vector of viewer types (default 5 0 1 3 ): -1=Z_2DwithOutAxis 0=Z_2D 1=X_2D 2=Y_2D 3=Plane 4=Sphere 5=3D 6=3Dplane 7=3D_empty",std::vector,""); + BBTK_INPUT(ViewerNV,nTypeView,"vector of viewer types (default 5 1 2 0): -1=Z_2DwithOutAxis 0=Z_2D 1=X_2D 2=Y_2D 3=Plane 4=Sphere 5=3D 6=3Dplane 7=3D_empty",std::vector,""); BBTK_INPUT(ViewerNV,ColorFunction,"Optional: set a different color for the viewers 2D",vtkColorTransferFunction*,""); BBTK_INPUT(ViewerNV,WindowLevel,"Optional: set a different Window level by using an other widget",int,""); BBTK_INPUT(ViewerNV,ColorLevel,"Optional: set a different Color level by using an other widget",int,""); @@ -94,7 +94,7 @@ BBTK_DESCRIPTION("Viewer : N view configuration 2D and 3D"); BBTK_INPUT(ViewerNV,Obs3,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,""); BBTK_INPUT(ViewerNV,Obs4,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,""); BBTK_INPUT(ViewerNV,Obs5,"Optional: set a different Color level by using an other widget",vtkInteractorObserver*,""); - + BBTK_OUTPUT(ViewerNV,wxVtkBaseView1,"wxVtkBaseView 1",wxVtkBaseView *,""); BBTK_OUTPUT(ViewerNV,wxVtkBaseView2,"wxVtkBaseView 2",wxVtkBaseView *,""); BBTK_OUTPUT(ViewerNV,wxVtkBaseView3,"wxVtkBaseView 3",wxVtkBaseView *,""); -- 2.47.1