Mercurial > hg > orthanc-stone
changeset 1839:d7ac540e0149
merge
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 17 Jun 2021 17:00:36 +0200 |
parents | 80e029f8ec91 (diff) f6eaf617d8e8 (current diff) |
children | c01ed7a7c11f |
files | |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancStone/Sources/Toolbox/DicomStructureSet.cpp Thu Jun 17 15:59:26 2021 +0200 +++ b/OrthancStone/Sources/Toolbox/DicomStructureSet.cpp Thu Jun 17 17:00:36 2021 +0200 @@ -342,8 +342,8 @@ // if prev* and cur* are on opposite sides of y, this means that the // segment intersects the plane. - if ((prevY < y && curY > y) || - (prevY > y && curY < y)) + if ((prevY <= y && curY >= y) || + (prevY >= y && curY <= y)) { double p = (curX * prevY - curY * prevX + y * (prevX - curX)) / (prevY - curY); xmin = std::min(xmin, p); @@ -413,8 +413,8 @@ double curX, curY; geometry_.ProjectPoint2(curX, curY, points_[i]); - if ((prevX < x && curX > x) || - (prevX > x && curX < x)) + if ((prevX <= x && curX >= x) || + (prevX >= x && curX <= x)) { double p = (curX * prevY - curY * prevX + x * (curY - prevY)) / (curX - prevX); ymin = std::min(ymin, p);