From c5292ad61b7bbc7de3dbf5491655f2cab5e3388c Mon Sep 17 00:00:00 2001 From: David Coeurjolly Date: Fri, 21 Nov 2014 16:21:17 +0100 Subject: [PATCH 1/2] Fixing DSSLength estimator on open curves --- src/DGtal/base/IteratorFunctions.ih | 1 - src/DGtal/geometry/curves/estimation/DSSLengthEstimator.ih | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DGtal/base/IteratorFunctions.ih b/src/DGtal/base/IteratorFunctions.ih index f85cad9574..957b6e34cb 100644 --- a/src/DGtal/base/IteratorFunctions.ih +++ b/src/DGtal/base/IteratorFunctions.ih @@ -53,7 +53,6 @@ bool DGtal::isNotEmpty( const IC& itb, const IC& ite ) template< typename IC > bool DGtal::detail::isNotEmpty( const IC& itb, const IC& ite, IteratorType ) { - trace.info() << "IteratorType = " << std::endl; return (itb != ite); } diff --git a/src/DGtal/geometry/curves/estimation/DSSLengthEstimator.ih b/src/DGtal/geometry/curves/estimation/DSSLengthEstimator.ih index 6d663ad23a..265efb73d1 100644 --- a/src/DGtal/geometry/curves/estimation/DSSLengthEstimator.ih +++ b/src/DGtal/geometry/curves/estimation/DSSLengthEstimator.ih @@ -105,7 +105,8 @@ inline typename DGtal::DSSLengthEstimator::Point DGtal::DSSLengthEstimator::lastPoint(const ConstIterator& ite, IteratorType) { - return *--ite; + ConstIterator itcopy = ite; + return *--itcopy; } template From ceaf69c7706550a3fd1ce7c13c1959cb7d39b820 Mon Sep 17 00:00:00 2001 From: David Coeurjolly Date: Fri, 21 Nov 2014 16:47:52 +0100 Subject: [PATCH 2/2] Changelog updated --- ChangeLog.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 6a32029d11..0d1e32e1cd 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -32,7 +32,9 @@ - Iterator category fix for boost > 1.57 (David Coeurjolly, [#938](https://github.com/DGtal-team/DGtal/pull/938)) - +- *Geometry* + - Fixing DSS based length estimator on open curves. (David + Coeurjolly, [#941](https://github.com/DGtal-team/DGtal/pull/941)) # DGtal 0.8