From a9d9fb67805b906ffb5912f56eae5578a7c432ca Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Wed, 1 Apr 2009 08:41:30 +0000 Subject: [PATCH] BUG Axis viewer --- bbtk/src/bbmaracasvisuContourVOI.cxx | 5 +---- .../src/interface/wxWindows/manualContour.cpp | 3 --- .../wxWindows/widgets/pPlotter/mBarRange.cxx | 1 - .../wxWindows/widgets/wxMPRWidget.cxx | 12 +++++------ .../widgets/wxMaracas_ViewerWidget.cxx | 10 ++++----- .../wxWindows/widgets/wxSTLWidget_03.cxx | 21 ------------------- .../wxWindows/widgets/wxVtkBaseView.cxx | 4 ++-- 7 files changed, 14 insertions(+), 42 deletions(-) diff --git a/bbtk/src/bbmaracasvisuContourVOI.cxx b/bbtk/src/bbmaracasvisuContourVOI.cxx index cf35763..c37ceb8 100644 --- a/bbtk/src/bbmaracasvisuContourVOI.cxx +++ b/bbtk/src/bbmaracasvisuContourVOI.cxx @@ -20,7 +20,7 @@ END_EVENT_TABLE( ); wxWidgetVOI::wxWidgetVOI(wxWindow* parent, wxVtkBaseView *wxvtkbaseview, vtkImageData *imagedata) : wxPanel( parent, -1 ) { - wxPanel *panel = this; +// wxPanel *panel = this; if(wxvtkbaseview!=NULL&&imagedata!=NULL){ @@ -62,7 +62,6 @@ END_EVENT_TABLE( ); //-------------------------------------------------------------------------- void wxWidgetVOI::Refresh() { - printf("EED wxWidgetVOI::Refresh \n"); // wxwidget->RefreshView(); } @@ -72,7 +71,6 @@ END_EVENT_TABLE( ); //--------------- void wxWidgetVOI::OnRefreshView(wxCommandEvent &event) { - printf("EED wxWidgetVOI::OnRefreshView \n"); /* if((wxwidget!=NULL) && (mbbViewerMPR!=NULL)) { @@ -90,7 +88,6 @@ END_EVENT_TABLE( ); //-------------------------------------------------------------------------- void wxWidgetVOI::OnDClickLeft(wxCommandEvent & event) { - printf("EED wxWidgetVOI::OnDClickLeft \n"); // wxwidget->RefreshView(); } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp index de7d18f..eb97590 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp @@ -2163,7 +2163,6 @@ 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) @@ -2180,7 +2179,6 @@ 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 @@ -2881,7 +2879,6 @@ 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(); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx index 39a8307..0613e16 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx @@ -945,7 +945,6 @@ void mBarRange::OnMouseMove(wxMouseEvent& event ) //------------------------------------------- createAndSendEvent( wxEVT_TSBAR_ACTUAL ); // createAndSendEvent( 98765 ); -printf("EED creaMaracasVisu mBarRange::OnMouseMove XXXXXXX \n"); } else if( validPos_ActualTri && _in_rangeProperty ) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx index 13a9348..1a8e933 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/30 15:31:15 $ - Version: $Revision: 1.6 $ + Date: $Date: 2009/04/01 08:41:35 $ + Version: $Revision: 1.7 $ Copyright: (c) 2002, 2003 License: @@ -1973,7 +1973,6 @@ vtkMPRBaseData *wxVtkMPR2DView::GetVtkmprbasedata() void wxVtkMPR2DView::Configure(){ wxVtk2DBaseView::Configure(); - _interactorstylemprview = new vtkInteractorStyleMPRView(); GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _interactorstylemprview ); @@ -2013,7 +2012,7 @@ void wxVtkMPR2DView::Configure(){ _lineAMapper->SetInput(_pdA); _lineAMapper->ImmediateModeRenderingOn(); _lineAActor->SetMapper(_lineAMapper); - _lineAActor->GetProperty()->BackfaceCullingOn(); +// _lineAActor->GetProperty()->BackfaceCullingOn(); _lineAActor->GetProperty()->SetDiffuseColor(1,0,0); _lineAActor->GetProperty()->SetLineWidth(2); _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor ); @@ -2037,11 +2036,12 @@ void wxVtkMPR2DView::Configure(){ _lineBMapper->SetInput(_pdB); _lineBMapper->ImmediateModeRenderingOn(); _lineBActor->SetMapper(_lineBMapper); - _lineBActor->GetProperty()->BackfaceCullingOn(); +// _lineBActor->GetProperty()->BackfaceCullingOn(); _lineBActor->GetProperty()->SetDiffuseColor(1,0,0); _lineBActor->GetProperty()->SetLineWidth(2); _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor ); + vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera(); if (_direction==0) { camera->SetViewUp ( 0 , -1 , 0 ); @@ -2063,9 +2063,9 @@ void wxVtkMPR2DView::Configure(){ camera->SetFocalPoint ((x1+x2)/2 , (y1+y2)/2 , 0 ); camera->SetParallelScale( (x2-x1)/3.0 ); } + } - // _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow (160); // _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel (800); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx index 63ebc50..d86fec0 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/30 15:31:15 $ - Version: $Revision: 1.5 $ + Date: $Date: 2009/04/01 08:41:35 $ + Version: $Revision: 1.6 $ Copyright: (c) 2002, 2003 License: @@ -66,20 +66,20 @@ if (type==0) { - mvtkmpr2Dview_Z = new wxVtkMPR2DView(panel,0); + mvtkmpr2Dview_Z = new wxVtkMPR2DView(panel,2); mvtkmpr2Dview_Z->SetVtkBaseData(mvtkmprbasedata); wxwindow = mvtkmpr2Dview_Z->GetWxVTKRenderWindowInteractor(); } if (type==1) { - mvtkmpr2Dview_X = new wxVtkMPR2DView(panel,1); + mvtkmpr2Dview_X = new wxVtkMPR2DView(panel,0); mvtkmpr2Dview_X->SetVtkBaseData(mvtkmprbasedata); wxwindow = mvtkmpr2Dview_X->GetWxVTKRenderWindowInteractor(); } if (type==2) { - mvtkmpr2Dview_Y = new wxVtkMPR2DView(panel,2); + mvtkmpr2Dview_Y = new wxVtkMPR2DView(panel,1); mvtkmpr2Dview_Y->SetVtkBaseData(mvtkmprbasedata); wxwindow = mvtkmpr2Dview_Y->GetWxVTKRenderWindowInteractor(); } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx index cbecc1a..7af1e68 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx @@ -89,9 +89,7 @@ wxSTLWidget_03::wxSTLWidget_03(wxWindow *parent)//, marInterface* mar) wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL ); wxSplitterWindow *pnlSplitter = new wxSplitterWindow( this , -1); wxPanel *viewPanel = CreateViewPanel(pnlSplitter); -printf("EED wxSTLWidget_03::wxSTLWidget_03 01\n"); wxPanel *controlPanel = CreateControlPanel(pnlSplitter); -printf("EED wxSTLWidget_03::wxSTLWidget_03 02\n"); sizer -> Add( pnlSplitter ,1,wxGROW ,0); pnlSplitter -> SetMinimumPaneSize( 150 ); @@ -123,7 +121,6 @@ printf("EED wxSTLWidget_03::wxSTLWidget_03 02\n"); joinMarchingCubes = NULL; joinMapper = NULL; joinActor = NULL; -printf("EED wxSTLWidget_03::wxSTLWidget_03 03\n"); } @@ -143,18 +140,14 @@ wxPanel* wxSTLWidget_03::CreateViewPanel(wxWindow *parent) //vtkImageData *imagedata; //imagedata = _mar->_experiment->getDynData( )->getVolume( )->castVtk(); //imagedata->Update(); -printf("EED wxSTLWidget_03::CreateViewPanel 01 \n"); _wxMaracasMPR = new wxMaracasMPR( panel);//JCP 10-03-2009, new marImageData(imagedata), 1 ); -printf("EED wxSTLWidget_03::CreateViewPanel 02 \n"); _wxMaracasMPR->ConfigureVTK(); -printf("EED wxSTLWidget_03::CreateViewPanel 03 \n"); sizer->Add( _wxMaracasMPR , 1, wxEXPAND, 0); panel->SetSizer(sizer); panel->SetAutoLayout(true); panel->SetSize(400,400); panel->Layout(); -printf("EED wxSTLWidget_03::CreateViewPanel 04 \n"); return panel; } @@ -167,31 +160,24 @@ void wxSTLWidget_03::setImage(vtkImageData* img){ //------------------------------------------------------------------- wxWindow* wxSTLWidget_03::CreateSelectAPointPanel(wxWindow *parent) { -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 01\n"); wxPanel *panel = new wxPanel(parent,-1); -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 02\n"); wxFlexGridSizer *sizer = new wxFlexGridSizer(2); -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 03\n"); sizer->Add(new wxStaticText(panel,-1,_T(" "))); sizer->Add(new wxStaticText(panel,-1,_T(" "))); -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 04\n"); sizer->Add(new wxStaticText(panel,-1,_T(" "))); sizer->Add(new wxStaticText(panel,-1,_T(" "))); -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 05\n"); sizer->Add(new wxStaticText(panel,-1,_T(" Select a 3D Point..."))); sizer->Add(new wxStaticText(panel,-1,_T(" "))); -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 06\n"); panel->SetSizer(sizer); panel->SetAutoLayout(true); panel->SetSize(400,600); panel->Layout(); -printf("EED wxSTLWidget_03::CreateSelectAPointPanel 07\n"); return panel; @@ -395,19 +381,13 @@ wxWindow* wxSTLWidget_03::CreateReadSTLFilePanel(wxWindow *parent) //------------------------------------------------------------------- wxPanel* wxSTLWidget_03::CreateControlPanel(wxWindow *parent) { -printf("EED wxSTLWidget_03::CreateControlPanel 01\n"); wxPanel *panel = new wxPanel(parent,-1); wxNotebook *noteBook = new wxNotebook(panel, -1); -printf("EED wxSTLWidget_03::CreateControlPanel 02\n"); noteBook->AddPage(CreateSelectAPointPanel(noteBook),_T("0 ->") ); -printf("EED wxSTLWidget_03::CreateControlPanel 03\n"); noteBook->AddPage(CreateSegmentationPanel(noteBook),_T("1 ->") ); -printf("EED wxSTLWidget_03::CreateControlPanel 04\n"); noteBook->AddPage(CreateSmoothingPanel(noteBook) ,_T("2 ->") ); -printf("EED wxSTLWidget_03::CreateControlPanel 05\n"); noteBook->AddPage(CreateReadSTLFilePanel(noteBook) ,_T("3 " ) ); -printf("EED wxSTLWidget_03::CreateControlPanel 06\n"); noteBook->SetSelection(0); noteBook->SetSize(350,250); wxFlexGridSizer *sizer = new wxFlexGridSizer(2); @@ -417,7 +397,6 @@ printf("EED wxSTLWidget_03::CreateControlPanel 06\n"); panel->SetSize(400,600); panel->Layout(); -printf("EED wxSTLWidget_03::CreateControlPanel 07\n"); return panel; } //------------------------------------------------------------------------ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx index 0521f88..17c3616 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx @@ -1347,7 +1347,7 @@ void vtkInfoTextImage::PutPixelIntensity(int xx, int yy, int zz) char zTzxt[20]; char resultText[50]; - strcpy(resultText,"NG: "); + strcpy(resultText,"GL: "); if (ok==true) { unsigned short *pOrg=(unsigned short*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz); // itoa (*pOrg,zTzxt,10); @@ -1555,7 +1555,7 @@ void wxVtk2DBaseView::Configure(bool okimage) camera->SetClippingRange( 0.01 , 1000000 ); camera->ComputeViewPlaneNormal(); camera->SetParallelScale( spx*(x2-x1)/3.0 ); - + // text information over the graphic window _vtkIinfoTextImage = new vtkInfoTextImage(); _vtkIinfoTextImageInteractor = new vtkInfoTextImageInteractor(); -- 2.47.1