# HG changeset patch # User Sebastien Jodogne # Date 1745778474 -7200 # Node ID 14303bf258b0bf6f772fe1bbee1584dd2c3f96fe # Parent 0fb1c1e6373f1482d668ae61cdfe5afa70842138 relax IsNear() for arm64, ppc64el, riscv64 and s390x, cf. Debian #1104044 diff -r 0fb1c1e6373f -r 14303bf258b0 Framework/ImageToolbox.cpp --- a/Framework/ImageToolbox.cpp Tue Apr 08 16:57:06 2025 +0200 +++ b/Framework/ImageToolbox.cpp Sun Apr 27 20:27:54 2025 +0200 @@ -48,7 +48,7 @@ bool IsNear(double a, double b) { - return std::abs(a - b) < 10.0 * std::numeric_limits::epsilon(); + return std::abs(a - b) < 100.0 * std::numeric_limits::epsilon(); } diff -r 0fb1c1e6373f -r 14303bf258b0 ViewerPlugin/Plugin.cpp --- a/ViewerPlugin/Plugin.cpp Tue Apr 08 16:57:06 2025 +0200 +++ b/ViewerPlugin/Plugin.cpp Sun Apr 27 20:27:54 2025 +0200 @@ -472,17 +472,17 @@ OrthancWSI::LABColor lab; if (!OrthancWSI::LABColor::DecodeDicomRecommendedAbsentPixelCIELab(lab, "65535\\0\\0") || - !OrthancWSI::ImageToolbox::IsNear(lab.GetL(), 100.0f) || - !OrthancWSI::ImageToolbox::IsNear(lab.GetA(), -128.0f) || - !OrthancWSI::ImageToolbox::IsNear(lab.GetB(), -128.0f)) + !OrthancWSI::ImageToolbox::IsNear(lab.GetL(), 100.0) || + !OrthancWSI::ImageToolbox::IsNear(lab.GetA(), -128.0) || + !OrthancWSI::ImageToolbox::IsNear(lab.GetB(), -128.0)) { throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); } if (!OrthancWSI::LABColor::DecodeDicomRecommendedAbsentPixelCIELab(lab, "0\\32896\\65535") || - !OrthancWSI::ImageToolbox::IsNear(lab.GetL(), 0.0f) || - !OrthancWSI::ImageToolbox::IsNear(lab.GetA(), 0.0f) || - !OrthancWSI::ImageToolbox::IsNear(lab.GetB(), 127.0f)) + !OrthancWSI::ImageToolbox::IsNear(lab.GetL(), 0.0) || + !OrthancWSI::ImageToolbox::IsNear(lab.GetA(), 0.0) || + !OrthancWSI::ImageToolbox::IsNear(lab.GetB(), 127.0)) { throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); }