From bd3d13602a749b74d531c24bdc36a9cc1e47d189 Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Mon, 30 Mar 2009 15:31:08 +0000 Subject: [PATCH] BUG MACOS --- bbtk/src/bbmaracasvisuViewerMPR.cxx | 10 +++++- bbtk/src/bbmaracasvisuViewerNV.cxx | 2 +- bbtk/src/bbmaracasvisuViewerNV.h | 2 +- .../wxWindows/Contour/ContourVOIWidget.cxx | 2 +- .../src/interface/wxWindows/manualContour.cpp | 11 +++++-- .../wxWindows/widgets/wxMPRWidget.cxx | 33 ++++++++++++++----- .../widgets/wxMaracas_N_ViewersWidget.cxx | 5 ++- .../widgets/wxMaracas_ViewerWidget.cxx | 9 ++--- 8 files changed, 52 insertions(+), 22 deletions(-) diff --git a/bbtk/src/bbmaracasvisuViewerMPR.cxx b/bbtk/src/bbmaracasvisuViewerMPR.cxx index b260443..246ae62 100644 --- a/bbtk/src/bbmaracasvisuViewerMPR.cxx +++ b/bbtk/src/bbmaracasvisuViewerMPR.cxx @@ -122,12 +122,19 @@ 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() )); wxwidget->ConfigureVTK(); + + +printf("EED ViewerMPR::Process 02\n"); + wxwidget->wxPanel::Refresh(); + wxwidget->Show(); +// wxwidget->Refresh(); } - wxBusyCursor wait; bbSetOutputPoint( wxwidget->GetPoint() ); bbSetOutputRenderer( wxwidget->GetRenderer() ); } // wxwidget @@ -135,6 +142,7 @@ void ViewerMPR::Process() void ViewerMPR::CreateWidget(wxWindow* parent) { +printf("EED ViewerMPR::CreateWidget \n"); bbtkDebugMessageInc("Core",9,"ViewerMPR::CreateWidget() " <bbSignalOutputModification(); + //this->bbSignalOutputModification(); //Process(); } diff --git a/bbtk/src/bbmaracasvisuViewerNV.h b/bbtk/src/bbmaracasvisuViewerNV.h index 69ab166..f2ae6d5 100644 --- a/bbtk/src/bbmaracasvisuViewerNV.h +++ b/bbtk/src/bbmaracasvisuViewerNV.h @@ -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 ",std::vector,""); + 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",std::vector,""); BBTK_OUTPUT(ViewerNV,wxVtkBaseView1,"wxVtkBaseView 1",wxVtkBaseView *,""); BBTK_OUTPUT(ViewerNV,wxVtkBaseView2,"wxVtkBaseView 2",wxVtkBaseView *,""); BBTK_OUTPUT(ViewerNV,wxVtkBaseView3,"wxVtkBaseView 3",wxVtkBaseView *,""); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourVOIWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourVOIWidget.cxx index 854ab1d..efe28c3 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourVOIWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourVOIWidget.cxx @@ -133,7 +133,7 @@ std::cout << "wxWidgetSliderMinMaxVOI ::onEndChange_Bar" << std::endl; // Rectangulo _manRoiControl = new manualRoiControler(); - _mContourModel = new manualContourModel(); + _mContourModel = new manualContourModelRoi(); _mViewRoi = new manualViewRoi(); _mViewRoi->SetModel( _mContourModel ); _mViewRoi->SetWxVtkBaseView( this->wxvtkbaseview ); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp index 5ebf7d8..de7d18f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp @@ -2162,6 +2162,8 @@ void manualViewRoi::RefreshContour() // virtual { unsigned int i,ii, np; np = GetNumberOfPoints( ); +//EED01 + printf("EED manualViewRoi::RefreshContour np %d \n", np); if ( np > 0) { if (np>=2) @@ -2178,6 +2180,7 @@ void manualViewRoi::RefreshContour() // virtual //EED 27 sep 2007 // _pts->SetPoint(i, XX,YY,ZZ ); +printf("EED manualViewRoi::RefreshContour ZZ %f _spc%f \n", ZZ, _spc[2] ); _pts->SetPoint(i, XX*_spc[0] , YY*_spc[1] , ZZ*_spc[2] ); } // rof @@ -2878,6 +2881,7 @@ void manualViewBaseContour::ConstructVTKObjects() //int i , nps = _sizePointsContour; int i; int nps = _manContModel->GetNumberOfPointsSpline(); +printf("EED01 manualViewBaseContour::ConstructVTKObjects nps %d\n ",nps); //------------------------------------------------------------- DeleteVtkObjects(); _pts = vtkPoints::New(); @@ -2887,8 +2891,11 @@ void manualViewBaseContour::ConstructVTKObjects() _pts->SetPoint(i, 0 , 0 , 0 ); } // This is for the boundaring inicialisation - _pts->SetPoint(0, -1000 , -1000 , -1000 ); - _pts->SetPoint(1, 1000 , 1000 , 1000 ); +//EED 29Mars2009 + _pts->SetPoint(0, 0 , 0 , -1000 ); + _pts->SetPoint(1, 0 , 0 , 1000 ); +// _pts->SetPoint(0, -1000 , -1000 , -1000 ); +// _pts->SetPoint(1, 1000 , 1000 , 1000 ); vtkCellArray *lines = vtkCellArray::New(); lines->InsertNextCell( nps /* +1 */ ); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx index 38720c0..13a9348 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: wxMPRWidget.cxx,v $ Language: C++ - Date: $Date: 2009/03/24 10:49:21 $ - Version: $Revision: 1.5 $ + Date: $Date: 2009/03/30 15:31:15 $ + Version: $Revision: 1.6 $ Copyright: (c) 2002, 2003 License: @@ -2474,7 +2474,7 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV ckBoxX->SetValue(false); ckBoxY->SetValue(false); ckBoxZ->SetValue(false); - _ckBoxXYZ->SetValue(true); + _ckBoxXYZ->SetValue(false); _ckBoxPlane->SetValue(false); _positionX->SetSize(400,20); @@ -3574,7 +3574,6 @@ void wxVtkMPR3DView::Configure(){ _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange(); - // vtkPointWidget _myCallback = vtkmyPWCallback_3DPointWidget::New(); _myCallback->SetWxVtkMPR3DView(this); @@ -3583,10 +3582,16 @@ void wxVtkMPR3DView::Configure(){ _myCallback->SetVtkPointWidget(_pointWidget); _pointWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() ); _pointWidget->SetInput( GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData() ); + _pointWidget->AllOff(); + _pointWidget->PlaceWidget(); // _pointWidget->SetPosition( x,y,z ); - _pointWidget->On(); + +//EED01 29Mars2009 +// MACOS probleme vtk-window out of wx-window +// _pointWidget->On(); + _pointWidget->AddObserver(vtkCommand::InteractionEvent,_myCallback); @@ -3619,10 +3624,12 @@ void wxVtkMPR3DView::Configure(){ contourMapper->SetScalarRange( imageData->GetScalarRange() ); _contourPlaneActor = vtkActor::New(); _contourPlaneActor->SetMapper(contourMapper); + _contourPlaneActor->VisibilityOff(); _planeWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() ); _planeWidget->AddObserver(vtkCommand::InteractionEvent,_myCallback); + _planeWidget->Off(); _wxvtk3Dbaseview->GetRenderer()->AddActor( _contourPlaneActor ); } @@ -4017,7 +4024,10 @@ void wxVtkClipping3DView::Configure(){ VisibleActor(3, false ); _boxWidgetS1->HandlesOn (); - _boxWidgetS1->On(); + +//EED 29Mars2009 +// _boxWidgetS1->On(); + _boxWidgetS1->Off(); _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(0) ); @@ -4037,7 +4047,10 @@ void wxVtkClipping3DView::Configure(){ _boxWidgetVolume->AddObserver( vtkCommand::InteractionEvent , _vtkclipping3Ddataviewer->GetObserverV() ); _boxWidgetVolume->HandlesOn (); - _boxWidgetVolume->On(); + +//EED 29Mars2009 +// _boxWidgetVolume->On(); + _boxWidgetVolume->Off(); @@ -5936,8 +5949,10 @@ void wxMPRWidget::ConfigureVTK(){ { _wxvtk3Dbaseview_Clipping3D_BB->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( vtkinteractorstyle3Dview ); } - - RefreshView(true); + +//EED 29Mars2009 +// RefreshView(true); + } //---------------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx index e93c05d..cf83734 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: wxMaracas_N_ViewersWidget.cxx,v $ Language: C++ - Date: $Date: 2009/03/24 10:49:21 $ - Version: $Revision: 1.3 $ + Date: $Date: 2009/03/30 15:31:15 $ + Version: $Revision: 1.4 $ Copyright: (c) 2002, 2003 License: @@ -215,7 +215,6 @@ this->Layout(); this->Refresh(); - } void wxMaracas_N_ViewersWidget::SetType(std::vector* type){ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx index dd6b80c..63ebc50 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: wxMaracas_ViewerWidget.cxx,v $ Language: C++ - Date: $Date: 2009/03/24 10:49:21 $ - Version: $Revision: 1.4 $ + Date: $Date: 2009/03/30 15:31:15 $ + Version: $Revision: 1.5 $ Copyright: (c) 2002, 2003 License: @@ -239,7 +239,7 @@ mvtkmprbasedata->SetY( y ); mvtkmprbasedata->SetZ( z ); } - RefreshView(); +// RefreshView(); } //------------------------------------------------------------------------- @@ -252,6 +252,7 @@ //------------------------------------------------------------------------- void wxMaracas_ViewerWidget::RefreshView() { + if (mvtk2Dbaseview !=NULL ){ mvtk2Dbaseview -> Refresh(); } if (mvtkmpr2Dview_X !=NULL ){ mvtkmpr2Dview_X -> Refresh(); } if (mvtkmpr2Dview_Y !=NULL ){ mvtkmpr2Dview_Y -> Refresh(); } @@ -262,6 +263,7 @@ if (mwxvtkmpr3Dview !=NULL ){ mwxvtkmpr3Dview -> RefreshView(); } if (mwxvtkclipping3Dview !=NULL ){ mwxvtkclipping3Dview -> Refresh(); } if (mwxvtk3Dbaseview_Clipping3D !=NULL ){ mwxvtk3Dbaseview_Clipping3D -> Refresh(); } + } //------------------------------------------------------------------------- @@ -281,7 +283,6 @@ void wxMaracas_ViewerWidget::SetImage( vtkImageData *image ) { - //printf("EED wxMaracas_ViewerWidget::SetImage IMPORTANT this methode is missing \n"); marImageData* mar = mvtkmprbasedata->GetMarImageData(); mar->removeImageData(0); mar->AddImageData(image); -- 2.47.1