X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2FContour%2FAutoControlPoints.cxx;h=88a8a7a1fde85658b6692c414cf5e4f7b73ed8da;hb=f9901e756bb82bd333310b47607875331616bb29;hp=95e0f68985b045a44bbcf21e503108fe6f493974;hpb=307866a8f06b14018ea832926bdf3d887bfffea8;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx b/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx index 95e0f68..88a8a7a 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx @@ -268,17 +268,17 @@ void AutoControlPoints::CirclePoints(double cx, double cy, double r, double grad spc[2]=1; _pathsize = _mContourModel->GetPathSize( spc ); - //printf("\nPATH SIZE = %f",_pathsize); - - std::ofstream file1; - file1.open( "4_SplinePoints.txt" ); - - for(int i = 0; i < numspline; i++){ - file1<<"X= "<<_chargecontrolpointsX[i] << "\tY= "<<_chargecontrolpointsY[i] << "\tZ= "<<_chargecontrolpointsZ[i]<size(); int h=0; + if(inicontrolpoints<10) { int points = (int)((inipercentage*3*InX->size())/100); @@ -1592,9 +1590,10 @@ printf("\n"); _controlpointsY.push_back( (*InY)[i] ); _controlpointsZ.push_back( (*InZ)[i] ); h = 0; - } - } - } + } // if h + } // for i + } // if initontrolpoints + if(inicontrolpoints>=10) { int points = (int)((inipercentage*2*InX->size())/100); @@ -1606,9 +1605,9 @@ printf("\n"); _controlpointsY.push_back( (*InY)[i] ); _controlpointsZ.push_back( (*InZ)[i] ); h = 0; - } - } - } + } // if h + } // for int i + } // if inicontrolpoints } /* fixBetweenPoints(5.0); @@ -1715,7 +1714,6 @@ void AutoControlPoints::CalculeControlPoints(std::vector*InX, std::vecto //----------------------------------------------------------------------------------------------------------------------------------------- void AutoControlPoints::CalculeInitialControlPoints(std::vector*InX, std::vector*InY, std::vector*InZ) { - _controlpointsX.clear(); _controlpointsY.clear(); _controlpointsZ.clear();