Mercurial > hg > orthanc
comparison Core/Images/ImageProcessing.cpp @ 3431:e0841192d7d0
improved FillPolygon
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 17 Jun 2019 23:36:37 +0200 |
parents | 9345710bbf12 |
children | d8f7c3970e25 |
comparison
equal
deleted
inserted
replaced
3430:4c45e018bd3d | 3431:e0841192d7d0 |
---|---|
1440 } | 1440 } |
1441 cpx.push_back((double)points[i].GetX()); | 1441 cpx.push_back((double)points[i].GetX()); |
1442 cpy.push_back((double)points[i].GetY()); | 1442 cpy.push_back((double)points[i].GetY()); |
1443 } | 1443 } |
1444 | 1444 |
1445 // Draw the lines segments | |
1446 for (size_t i = 0; i < (points.size() -1); i++) | |
1447 { | |
1448 ImageProcessing::DrawLineSegment(image, points[i].GetX(), points[i].GetY(), points[i+1].GetX(), points[i+1].GetY(), value_); | |
1449 } | |
1450 ImageProcessing::DrawLineSegment(image, points[points.size() -1].GetX(), points[points.size() -1].GetY(), points[0].GetX(), points[0].GetY(), value_); | |
1451 | |
1445 std::vector<int32_t> nodeX; | 1452 std::vector<int32_t> nodeX; |
1446 nodeX.resize(cpSize); | 1453 nodeX.resize(cpSize); |
1447 int nodes, pixelX, pixelY, i, j, swap ; | 1454 int nodes, pixelX, pixelY, i, j, swap ; |
1448 | 1455 |
1449 // Loop through the rows of the image. | 1456 // Loop through the rows of the image. |