From 7b60c794de0aa621141edfc9169ed7a507339883 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Wed, 5 May 2021 20:24:07 +0200 Subject: [PATCH] Bug with complex contours --- .../wxWindows/Contour/AutoControlPoints.cxx | 3 +-- .../widgets/manualContour/manualBaseModel.cpp | 2 +- .../manualContour/manualContourModel.cpp | 7 +++--- .../manualContour/manualViewBaseContour.cpp | 22 +++++++++++-------- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx b/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx index 88a8a7a..fc3b1ab 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx @@ -226,7 +226,7 @@ void AutoControlPoints::CirclePoints(double cx, double cy, double r, double grad } //------------------------------------------------------------------------------------------------------------------------------------------ void AutoControlPoints::ChargeSpline( ) - { + { int size = _controlpointsX.size(); if(size != 0) { @@ -239,7 +239,6 @@ void AutoControlPoints::CirclePoints(double cx, double cy, double r, double grad { _mContourModel->SetCloseContour(true); } - _mContourModel->DeleteAllPoints(); _mContourModel->SetNumberOfPointsSpline(_numspline); for(int i=0; iSetDefaultContinuity( 0 ); //JSTG 25-02-08 ------------------------------------------------------------------------------------------------- // this parameter is reset in the VIRTUAL manualContourBaseControler::Configure - _sizePointsContour = 100; //JSTG 25-02-08 The change in the inisialization of these variable is critical. + _sizePointsContour = 500; //JSTG 25-02-08 The change in the inisialization of these variable is critical. _delta_JSTG = 0.0; //--------------------------------------------------------------------------------------------------------------- //CMRU 17-08-09 ------------------------------------------------------------------------------------------------- @@ -58,9 +58,10 @@ manualContourModel::manualContourModel() manualContourModel::~manualContourModel() { int i,size=_lstPoints.size(); - for (i=0;iRemoveAllPoints(); _cntSplineY->RemoveAllPoints(); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp index 6e334f4..89d6ed1 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp @@ -44,7 +44,7 @@ manualViewBaseContour::manualViewBaseContour() _contourVtkActor = NULL; _bboxMapper = NULL; _range = 1; - _sizePointsContour = 100; + _sizePointsContour = 500; _spc[0] = 1; _spc[1] = 1; _spc[2] = 1; @@ -649,10 +649,11 @@ double* manualViewBaseContour::GetVectorPointsXManualContour(){ double pp[3]; int i,size = _sizePointsContour; double *vx = (double*)malloc(sizeof(double)*size); - for (i=0;iGetPoint(i,pp); vx[i]=pp[0]; - } + } // for i return vx; } // ---------------------------------------------------------------------------- @@ -661,10 +662,11 @@ double* manualViewBaseContour::GetVectorPointsYManualContour() double pp[3]; int i,size = _sizePointsContour; double *vy = (double*)malloc(sizeof(double)*size); - for (i=0;iGetPoint(i,pp); vy[i]=pp[1]; - } + } // for i return vy; } // ---------------------------------------------------------------------------- @@ -673,10 +675,11 @@ double* manualViewBaseContour::GetVectorPointsZManualContour() double pp[3]; int i,size = _sizePointsContour; double *vz = (double*)malloc(sizeof(double)*size); - for (i=0;iGetPoint(i,pp); vz[i]=pp[2]; - } + } // for i return vz; } // ---------------------------------------------------------------------------- @@ -687,10 +690,11 @@ void manualViewBaseContour::Refresh() // virtual RefreshContour(); } int i,size=_lstViewPoints.size(); - for (i=0;iUpdateColorActor(); - } + } // for i UpdateColorActor(); if (_show_text==true) -- 2.47.1