From: Eduardo DAVILA Date: Wed, 5 May 2021 18:24:07 +0000 (+0200) Subject: Bug with complex contours X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=7b60c794de0aa621141edfc9169ed7a507339883;p=creaMaracasVisu.git Bug with complex contours --- 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)