From b9d28439e36c44e32828ad7dae645f238dab1006 Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Mon, 20 Apr 2009 09:03:26 +0000 Subject: [PATCH] BUG Axis -900 -> 900 --- .../src/interface/wxWindows/manualContour.cpp | 21 +++++-------------- .../wxWindows/widgets/wxMPRWidget.cxx | 18 ++++++++++------ 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp index 39fb250..8f314e4 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp @@ -144,9 +144,8 @@ void manualContourModelCircle::UpdateSpline() // virtal manualContourModelLine::manualContourModelLine() : manualContourModel() { -printf("EED manualContourModelLine::manualContourModelLine \n"); - // SetNumberOfPointsSpline(2); - SetNumberOfPointsSpline(100); + SetNumberOfPointsSpline(20); + this->SetCloseContour(false); } manualContourModelLine::~manualContourModelLine() @@ -871,7 +870,8 @@ void manualContourModel::UpdateSpline() // virtual { _delta_JSTG = (double) (np) / double (_sizePointsContour - 1); //Without the -1 the curve is not close } else { - _delta_JSTG = (double) (np-1) / double (_sizePointsContour ); //Without the -1 the curve is not close +// _delta_JSTG = (double) (np-1) / double (_sizePointsContour ); //Without the -1 the curve is not close + _delta_JSTG = (double) (np) / double (_sizePointsContour-1 ); //Without the -1 the curve is not close } //----------------------------------------------------------------------------------------------------------- } @@ -1611,10 +1611,6 @@ bool manualViewContour::ifTouchContour(int x,int y,int z){ nps_t = nps-1; } - //ED - //printf("\n Number of points %d ",nps_t); - - printf("EED %p manualViewContour::ifTouchContour >>>> nps_t=%d nps=%d x=%f y=%f z=%f \n", this , nps_t, nps, xx, yy, zz ); for( i = 0; i < nps_t; i++ ) { @@ -1624,8 +1620,6 @@ bool manualViewContour::ifTouchContour(int x,int y,int z){ d2= sqrt( (ppB[0]-xx)*(ppB[0]-xx) + (ppB[1]-yy)*(ppB[1]-yy) + (ppB[2]-zz)*(ppB[2]-zz)); d3= sqrt( (ppB[0]-ppA[0])*(ppB[0]-ppA[0]) + (ppB[1]-ppA[1])*(ppB[1]-ppA[1]) + (ppB[2]-ppA[2])*(ppB[2]-ppA[2])); - //EED -printf("%f %f %f - ", ppB[0], ppB[1], ppB[2] ); if ( ((d1+d2)>=d3) && ((d1+d2)<=d3*1.3) ) { @@ -1634,12 +1628,6 @@ printf("%f %f %f - ", ppB[0], ppB[1], ppB[2] ); } } -if (result==true) -{ - printf("EED %p manualViewContour::ifTouchContour true \n", this ); -} else { - printf("EED %p manualViewContour::ifTouchContour false \n", this ); -} return result; } @@ -2556,6 +2544,7 @@ void manualViewCircle::MoveContour(int x, int y, int z) // virtual manualViewLine::manualViewLine() { + _sizePointsContour=20; } // ---------------------------------------------------------------------------- manualViewLine::~manualViewLine() diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx index f25e1f9..b118cc3 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/04/20 07:39:30 $ - Version: $Revision: 1.8 $ + Date: $Date: 2009/04/20 09:03:30 $ + Version: $Revision: 1.9 $ Copyright: (c) 2002, 2003 License: @@ -2173,10 +2173,16 @@ void wxVtkMPR2DView::Refresh() } if (_direction==2) { _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) ); - _ptsA->SetPoint(0, x1 , y , -z2 ); - _ptsA->SetPoint(1, x2 , y , -z2 ); - _ptsB->SetPoint(0, x , y1, -z2 ); - _ptsB->SetPoint(1, x , y2, -z2 ); + _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) ); + // _ptsA->SetPoint(0, x1 , y , -z2 ); + // _ptsA->SetPoint(1, x2 , y , -z2 ); + // _ptsB->SetPoint(0, x , y1, -z2 ); + // _ptsB->SetPoint(1, x , y2, -z2 ); + + _ptsA->SetPoint(0, x1 , y , z2 ); + _ptsA->SetPoint(1, x2 , y , z2 ); + _ptsB->SetPoint(0, x , y1, z2 ); + _ptsB->SetPoint(1, x , y2, z2 ); } _backX=x; _backY=y; -- 2.47.1