# HG changeset patch # User Sebastien Jodogne # Date 1745333352 -7200 # Node ID d0d8090ea64f3a002453b52dd11d517aff329c2e # Parent d888cc7d78208d9e8d1c13c4a861f29fd11d7c0c fix estimation of geometry in RT-STRUCT diff -r d888cc7d7820 -r d0d8090ea64f OrthancStone/Sources/Toolbox/DicomStructureSet.cpp --- 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::epsilon()) + axisX = points_[i] - origin; + + bool isOpposite; // Ignored + if (boost::numeric::ublas::norm_2(axisX) > 10.0 * std::numeric_limits::epsilon() && + !GeometryToolbox::IsParallelOrOpposite(axisX, estimatedNormal)) { found = true; break;