X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2FContour%2FPropagation.cxx;h=580863f9d39587b6deb7314fc62087962936f5da;hb=5380f9e66daf440f27f33bb060e5ae1a646612cd;hp=c6d2365481a9baa3806792f72baad6afc0ce0fb3;hpb=4443a8fe2b4992b6abee8531917fd0803018fc12;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/Contour/Propagation.cxx b/lib/maracasVisuLib/src/interface/wxWindows/Contour/Propagation.cxx index c6d2365..580863f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/Contour/Propagation.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/Contour/Propagation.cxx @@ -762,8 +762,8 @@ int PropContour::VectorDirection(std::vector*InX, std::vector*In { ax = (*InX)[i]-SumX; ay = (*InY)[i]-SumY; - bx = (*InX)[i+1]-SumX; - by = (*InY)[i+1]-SumY; + bx = (*InX)[(i+1)%size]-SumX; + by = (*InY)[(i+1)%size]-SumY; axb = (ax*by) - (bx*ay); if(axb > 0) { @@ -1096,7 +1096,7 @@ void PropContour::SetKeyContours(std::vector*InX, std::vector*In okFind=true; i=sizeKeyContour; } - if ( (_KeyContourZ[i-1] != _KeyContourZ[i]) ) + if ( (i