Mercurial > hg > orthanc-stone
changeset 2216:d0d8090ea64f
fix estimation of geometry in RT-STRUCT
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 22 Apr 2025 16:49:12 +0200 |
parents | d888cc7d7820 |
children | ccafa8ffcc6a |
files | OrthancStone/Sources/Toolbox/DicomStructureSet.cpp |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancStone/Sources/Toolbox/DicomStructureSet.cpp Tue Apr 22 16:39:11 2025 +0200 +++ b/OrthancStone/Sources/Toolbox/DicomStructureSet.cpp Tue Apr 22 16:49:12 2025 +0200 @@ -302,8 +302,11 @@ bool found = false; for (size_t i = 1; i < points_.size(); i++) { - axisX = points_[1] - origin; - if (boost::numeric::ublas::norm_2(axisX) > 10.0 * std::numeric_limits<double>::epsilon()) + axisX = points_[i] - origin; + + bool isOpposite; // Ignored + if (boost::numeric::ublas::norm_2(axisX) > 10.0 * std::numeric_limits<double>::epsilon() && + !GeometryToolbox::IsParallelOrOpposite(axisX, estimatedNormal)) { found = true; break;