]> Creatis software - creaMaracasVisu.git/commitdiff
#3463 box ManualContourModel optimisation of SIN() distribution by contour
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Thu, 20 May 2021 06:19:06 +0000 (08:19 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Thu, 20 May 2021 06:19:06 +0000 (08:19 +0200)
bbtk/src/bbcreaMaracasVisuManualContourModel_Box.cxx

index d887bdf0292b13feba493c4c02c2827d5c11ceac..a46ca99422f14de46bafdf12137b80c4f4c27996 100644 (file)
@@ -550,7 +550,7 @@ void ManualContourModel_Box::RedistributionPointsAllContours_SIN(   std::vector<do
                } else {
                        sizeContour3=-1;
                }
-               if ( (sizeContour1>sizeContour2) && (sizeContour2>sizeContour3) )
+               if ( (sizeContour1>=sizeContour2) && (sizeContour2>sizeContour3) )
                {
                        findAlphaBetaSinDistribution( &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2,  &lstTmp1X,&lstTmp1Y,&lstTmp1Z,  &alpha,&beta);
                        Redistribution_SIN( alpha,beta, &lstTmp2X,&lstTmp2Y,&lstTmp2Z ,sizeContour2, &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ );
@@ -559,11 +559,7 @@ void ManualContourModel_Box::RedistributionPointsAllContours_SIN(  std::vector<do
                        PutPointsInContour(&lstTmp2aX,&lstTmp2aY,&lstTmp2aZ, iContour+1 ,lstOutX,lstOutY,lstOutZ,lstIndexsOut);                         
                        CopyContour2InContour1( &lstTmp2aX,&lstTmp2aY,&lstTmp2aZ , &lstTmp1X,&lstTmp1Y,&lstTmp1Z );
                } else {
-                       if ( (sizeContour1>sizeContour2) && (sizeContour2<sizeContour3) )  // Warning for a minimum local
-                       {
-                               lstContourExeption.push_back( iContour-1 );
-                       } // if minimum local
-                       if ( (sizeContour1<sizeContour2) && (sizeContour2>sizeContour3) )  // Warning for a maximum local
+                       if ( (sizeContour3!=-1) && (sizeContour1<sizeContour2) && (sizeContour2>sizeContour3) )  // Warning for a maximum local
                        {
                                lstInconsistentContourY.push_back( lstTmp2Y[0] );
                                lstInconsistentContourID.push_back( iContour+1 );
@@ -606,7 +602,7 @@ void ManualContourModel_Box::RedistributionPointsAllContours_SIN(   std::vector<do
                        {
                                lstContourExeption.push_back( iContour-1 );
                        } // if minimum local
-                       if ( (sizeContour1<sizeContour2) && (sizeContour2>sizeContour3) )  // Warning for a maximum local
+                       if ( (sizeContour3!=-1) && (sizeContour1<sizeContour2) && (sizeContour2>sizeContour3) )  // Warning for a maximum local
                        {
                                lstInconsistentContourY.push_back( lstTmp2Y[0] );
                                lstInconsistentContourID.push_back( iContour-1 );