From 435f37c9b3931b435b7980c82356c31b56129b71 Mon Sep 17 00:00:00 2001 From: deseilligny Date: Fri, 26 Jul 2024 12:55:49 +0200 Subject: [PATCH] Bug compile "cMultiScaledInterpolator" --- MMVII/src/CodedTarget/cCheckBoardTargetExtract.cpp | 11 +++++++---- MMVII/src/UtiMaths/Interpolators.cpp | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/MMVII/src/CodedTarget/cCheckBoardTargetExtract.cpp b/MMVII/src/CodedTarget/cCheckBoardTargetExtract.cpp index e2c67480ad..b81dbb37f2 100755 --- a/MMVII/src/CodedTarget/cCheckBoardTargetExtract.cpp +++ b/MMVII/src/CodedTarget/cCheckBoardTargetExtract.cpp @@ -258,22 +258,25 @@ void cCdRadiom::ComputePtsOfEllipse(std::vector & aRes) const void cCdRadiom::ComputePtsOfEllipse(std::vector & aRes,tREAL8 aLength) const { aRes.clear(); + // [1] Compute the affinity that goes from unity circle to ellipse + // ---- x,y -> mC + x V0 + y V1 ------ cPt2dr aV0 = FromPolar(aLength,mTetas[0]); cPt2dr aV1 = FromPolar(aLength,mTetas[1]); - // ---- x,y -> mC + x V0 + y V1 ------ cAff2D_r aMapEll2Ori(mC,aV0,aV1); cAff2D_r aMapOri2Ell = aMapEll2Ori.MapInverse(); + // [2] Compute the bounding box containing the ellipse cTplBoxOfPts aBox; int aNbTeta = 100; - for (int aKTeta=0 ; aKTeta & aVFront,cDataIm2D & aVFront.clear(); std::vector aVPtsEll; - ComputePtsOfEllipse(aVPtsEll,5.0); + ComputePtsOfEllipse(aVPtsEll,std::min(mLength,5.0)); tREAL8 aThrs = Threshold(); for (const auto & aPix : aVPtsEll) diff --git a/MMVII/src/UtiMaths/Interpolators.cpp b/MMVII/src/UtiMaths/Interpolators.cpp index 7a8780bd29..f4c8c32e32 100755 --- a/MMVII/src/UtiMaths/Interpolators.cpp +++ b/MMVII/src/UtiMaths/Interpolators.cpp @@ -709,7 +709,7 @@ class cMultiScaledInterpolator : public cDiffInterpolator1D private : tREAL8 mSzKInit; - tREAL8 mCurScale; + // tREAL8 mCurScale; tREAL8 mScale0; tREAL8 mScale1; tREAL8 mRatio; @@ -732,7 +732,7 @@ cMultiScaledInterpolator::cMultiScaledInterpolator ) : cDiffInterpolator1D (1.0,{}), mSzKInit (anI.SzKernel()), - mCurScale (-1), + // mCurScale (-1), mScale0 (aScale0), mScale1 (aScale1), mRatio (mScale1/mScale0),