]> Creatis software - creaMaracasVisu.git/commitdiff
Bug with complex contours
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 5 May 2021 18:24:07 +0000 (20:24 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 5 May 2021 18:24:07 +0000 (20:24 +0200)
lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp

index 88a8a7a1fde85658b6692c414cf5e4f7b73ed8da..fc3b1ab42e45e98efa23b304a8bdd5cfde8df625 100644 (file)
@@ -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; i<size; i++)
index 7a640dd33c468da91398b299af363e6904ba9731..b43941d7cb79d89b474543ae890f5209e06dd312 100644 (file)
@@ -29,7 +29,7 @@
 manualBaseModel::manualBaseModel()
 {
 //EED2017
-       _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.
        _label                          = "";
        _label2                         = "--";
 }
index 9744ed09929f34e83c7f4db8c4ad789d1f6a6822..d5100a044ba3b880aa5d436f334bb74b12b982aa 100644 (file)
@@ -46,7 +46,7 @@ manualContourModel::manualContourModel()
        _cntSplineZ->SetDefaultContinuity( 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;i<size; i++){
+       for (i=0;i<size; i++)
+       {
                delete _lstPoints[i];
-       }
+       } // for i
        _lstPoints.clear();
        _cntSplineX->RemoveAllPoints();
        _cntSplineY->RemoveAllPoints();
index 6e334f40cd0200ea1d6cf37b7f4fb9d58738306e..89d6ed18e7b68e447e1f41f28a9471364ddea780 100644 (file)
@@ -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;i<size;i++){
+       for (i=0;i<size;i++)
+       {
                _pts->GetPoint(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;i<size;i++){
+       for (i=0;i<size;i++)
+       {
                _pts->GetPoint(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;i<size;i++){
+       for (i=0;i<size;i++)
+       {
                _pts->GetPoint(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;i<size;i++){
+       for (i=0;i<size;i++)
+       {
                UpdateViewPoint(i);
                _lstViewPoints[i]->UpdateColorActor();
-       }
+       } // for i
        UpdateColorActor();
 
        if (_show_text==true)