51 unsigned int nbok = 0;
54 trace.
beginBlock (
"Test ContourHelper: getgetBarycenter and isCounterClockWise" );
55 std::vector<Z2i::Point> aContour;
62 std::vector<Z2i::Point> aContour2;
77 std::vector<Z2i::Point> aContour3;
87 std::vector<Z2i::Point> res, res2;
90 aContour3.end(), std::back_inserter(res));
91 trace.
info() <<
"Apply pixels2pixels8c (from std::vector contour)init size : " << res.size() <<
" (should be: " << aContour3.size() -2 <<
" ) "<< std::endl;
92 trace.
info() <<
"Third point : " << res[2] <<
" (should be: " <<
Z2i::Point(2,1) <<
" ) "<< std::endl;
94 nbok += res.
size() == aContour3.size() -2 ||
Z2i::Point(2,1)==res[2];
100 gc.getPointsRange().end(), std::back_inserter(res2));
101 trace.
info() <<
"Apply pixels2pixels8c (from GridCurve contour) init size : " << res2.size() <<
" (should be: " << aContour3.size() -2 <<
" ) "<< std::endl;
102 trace.
info() <<
"Third point : " << res2[2] <<
" (should be: " <<
Z2i::Point(2,1) <<
" ) "<< std::endl;
104 nbok += res2.size() == aContour3.size() -2 ||
Z2i::Point(2,1)==res2[2];
106 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "<< std::endl;