Mercurial > hg > orthanc
comparison Core/Images/ImageProcessing.cpp @ 3365:9345710bbf12
check limits in fillpolygon
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 13 May 2019 14:50:24 +0200 |
parents | a15a4b9d8c00 |
children | e0841192d7d0 |
comparison
equal
deleted
inserted
replaced
3364:ea299aca479b | 3365:9345710bbf12 |
---|---|
1431 std::vector<double> cpx; | 1431 std::vector<double> cpx; |
1432 std::vector<double> cpy; | 1432 std::vector<double> cpy; |
1433 size_t cpSize = points.size(); | 1433 size_t cpSize = points.size(); |
1434 for (size_t i = 0; i < points.size(); i++) | 1434 for (size_t i = 0; i < points.size(); i++) |
1435 { | 1435 { |
1436 if (points[i].GetX() < 0 || points[i].GetX() >= imageWidth | |
1437 || points[i].GetY() < 0 || points[i].GetY() >= imageHeight) | |
1438 { | |
1439 throw Orthanc::OrthancException(ErrorCode_ParameterOutOfRange); | |
1440 } | |
1436 cpx.push_back((double)points[i].GetX()); | 1441 cpx.push_back((double)points[i].GetX()); |
1437 cpy.push_back((double)points[i].GetY()); | 1442 cpy.push_back((double)points[i].GetY()); |
1438 } | 1443 } |
1439 | 1444 |
1440 std::vector<int32_t> nodeX; | 1445 std::vector<int32_t> nodeX; |