diff --git a/ChangeLog.md b/ChangeLog.md index 9d423b56bc..d777b3234e 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -3,9 +3,10 @@ ## New Features -- *Base* +- *General* - This Changelog has been ported to MarkDown (David Coeurjolly, [#846](https://github.com/DGtal-team/DGtal/pull/846)) + - The DGtal main website is now http://dgtal.org - *Geometry Package* - Add digital nD Voronoi Covariance Measure support, as well as @@ -100,7 +101,8 @@ - *Image Package* - Fixing template types in ImageAdapter (David Coeurjolly, [#835](https://github.com/DGtal-team/DGtal/pull/835)) - - Fixing image thresholders which require CConstImage instead of + - Fixing image thresholders (SimpleThresholdForegroundPredicate and + IntervalForegroundPredicate) which require CConstImage instead of CImage (David Coeurjolly, [#843](https://github.com/DGtal-team/DGtal/pull/843)) diff --git a/examples/geometry/surfaces/dvcm-3d.cpp b/examples/geometry/surfaces/dvcm-3d.cpp index d247decb38..affd730289 100644 --- a/examples/geometry/surfaces/dvcm-3d.cpp +++ b/examples/geometry/surfaces/dvcm-3d.cpp @@ -38,7 +38,7 @@ #include "DGtal/topology/DigitalSurface.h" #include "DGtal/topology/ImplicitDigitalSurface.h" #include "DGtal/images/ImageSelector.h" -#include "DGtal/images/imagesSetsUtils/IntervalForegroundPredicate.h" +#include "DGtal/images/IntervalForegroundPredicate.h" #include "DGtal/geometry/volumes/distance/ExactPredicateLpSeparableMetric.h" #include "DGtal/geometry/surfaces/estimation/VoronoiCovarianceMeasureOnDigitalSurface.h" #include "DGtal/io/colormaps/GradientColorMap.h" diff --git a/examples/geometry/surfaces/exampleEstimatorFromSurfelFunctors.cpp b/examples/geometry/surfaces/exampleEstimatorFromSurfelFunctors.cpp index 16275c2cfd..ad45e5f2a3 100644 --- a/examples/geometry/surfaces/exampleEstimatorFromSurfelFunctors.cpp +++ b/examples/geometry/surfaces/exampleEstimatorFromSurfelFunctors.cpp @@ -33,7 +33,7 @@ #include "DGtal/io/readers/VolReader.h" #include "DGtal/images/ImageSelector.h" #include "DGtal/images/imagesSetsUtils/SetFromImage.h" -#include "DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h" +#include "DGtal/images/SimpleThresholdForegroundPredicate.h" #include "DGtal/topology/SurfelAdjacency.h" #include "DGtal/topology/helpers/Surfaces.h" #include "DGtal/topology/LightImplicitDigitalSurface.h" diff --git a/examples/geometry/surfaces/exampleIntegralInvariantCurvature3D.cpp b/examples/geometry/surfaces/exampleIntegralInvariantCurvature3D.cpp index b2c043ee21..27b567b3ea 100644 --- a/examples/geometry/surfaces/exampleIntegralInvariantCurvature3D.cpp +++ b/examples/geometry/surfaces/exampleIntegralInvariantCurvature3D.cpp @@ -36,7 +36,7 @@ #include "DGtal/io/readers/VolReader.h" #include "DGtal/images/ImageSelector.h" #include "DGtal/images/imagesSetsUtils/SetFromImage.h" -#include "DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h" +#include "DGtal/images/SimpleThresholdForegroundPredicate.h" #include "DGtal/topology/helpers/Surfaces.h" #include "DGtal/topology/LightImplicitDigitalSurface.h" #include "DGtal/images/ImageHelper.h" diff --git a/examples/geometry/volumes/distance/distancetransform2D.cpp b/examples/geometry/volumes/distance/distancetransform2D.cpp index eed9705e6b..b450f7faab 100644 --- a/examples/geometry/volumes/distance/distancetransform2D.cpp +++ b/examples/geometry/volumes/distance/distancetransform2D.cpp @@ -40,7 +40,7 @@ #include "DGtal/io/colormaps/HueShadeColorMap.h" #include "DGtal/io/boards/Board2D.h" #include "DGtal/images/ImageSelector.h" -#include "DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h" +#include "DGtal/images/SimpleThresholdForegroundPredicate.h" #include "DGtal/geometry/volumes/distance/DistanceTransformation.h" /////////////////////////////////////////////////////////////////////////////// diff --git a/examples/geometry/volumes/distance/distancetransform3D.cpp b/examples/geometry/volumes/distance/distancetransform3D.cpp index 54f2a3c4b5..3bf6acf361 100644 --- a/examples/geometry/volumes/distance/distancetransform3D.cpp +++ b/examples/geometry/volumes/distance/distancetransform3D.cpp @@ -46,7 +46,7 @@ #include "DGtal/images/ImageSelector.h" #include "DGtal/geometry/volumes/distance/DistanceTransformation.h" -#include "DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h" +#include "DGtal/images/SimpleThresholdForegroundPredicate.h" #include "DGtal/helpers/StdDefs.h" #include "ConfigExamples.h" diff --git a/examples/geometry/volumes/distance/voronoimap2D.cpp b/examples/geometry/volumes/distance/voronoimap2D.cpp index 5bb99ffbf4..8bef500656 100644 --- a/examples/geometry/volumes/distance/voronoimap2D.cpp +++ b/examples/geometry/volumes/distance/voronoimap2D.cpp @@ -34,7 +34,7 @@ //! [Voro2D-header] #include "DGtal/kernel/BasicPointPredicates.h" -#include "DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h" +#include "DGtal/images/SimpleThresholdForegroundPredicate.h" #include "DGtal/geometry/volumes/distance/ExactPredicateLpSeparableMetric.h" #include "DGtal/geometry/volumes/distance/VoronoiMap.h" #include "DGtal/geometry/volumes/distance/DistanceTransformation.h" diff --git a/examples/tutorial-examples/imageSetDT.cpp b/examples/tutorial-examples/imageSetDT.cpp index 1fd8e4bad1..bf48b47a35 100644 --- a/examples/tutorial-examples/imageSetDT.cpp +++ b/examples/tutorial-examples/imageSetDT.cpp @@ -44,7 +44,7 @@ #include "DGtal/images/ImageContainerBySTLVector.h" #include "DGtal/images/ImageHelper.h" #include "DGtal/geometry/volumes/distance/DistanceTransformation.h" -#include "DGtal/images/imagesSetsUtils/IntervalForegroundPredicate.h" +#include "DGtal/images/IntervalForegroundPredicate.h" #include "DGtal/io/boards/Board2D.h" #include "DGtal/io/readers/PGMReader.h" diff --git a/examples/tutorial-examples/polyhedralizer.cpp b/examples/tutorial-examples/polyhedralizer.cpp index 19ca7bef1d..de60a72df2 100644 --- a/examples/tutorial-examples/polyhedralizer.cpp +++ b/examples/tutorial-examples/polyhedralizer.cpp @@ -44,7 +44,7 @@ #include "DGtal/io/readers/VolReader.h" #include "DGtal/images/ImageSelector.h" #include "DGtal/images/ImageContainerBySTLVector.h" -#include "DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h" +#include "DGtal/images/SimpleThresholdForegroundPredicate.h" //! [polyhedralizer-includes-readvol] #include "DGtal/io/Display3D.h" diff --git a/examples/tutorial-examples/volDTGranulo.cpp b/examples/tutorial-examples/volDTGranulo.cpp index 46b7ddb9df..2e334ff01a 100644 --- a/examples/tutorial-examples/volDTGranulo.cpp +++ b/examples/tutorial-examples/volDTGranulo.cpp @@ -42,7 +42,7 @@ #include "DGtal/io/readers/VolReader.h" #include "DGtal/io/writers/VolWriter.h" -#include "DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h" +#include "DGtal/images/SimpleThresholdForegroundPredicate.h" #include "DGtal/geometry/volumes/distance/DistanceTransformation.h" #include "DGtal/shapes/implicit/ImplicitBall.h" #include "DGtal/base/BasicFunctors.h" diff --git a/src/DGtal/images/imagesSetsUtils/IntervalForegroundPredicate.h b/src/DGtal/images/IntervalForegroundPredicate.h similarity index 97% rename from src/DGtal/images/imagesSetsUtils/IntervalForegroundPredicate.h rename to src/DGtal/images/IntervalForegroundPredicate.h index 47545b840c..939f44304d 100644 --- a/src/DGtal/images/imagesSetsUtils/IntervalForegroundPredicate.h +++ b/src/DGtal/images/IntervalForegroundPredicate.h @@ -42,7 +42,7 @@ // Inclusions #include #include "DGtal/base/Common.h" -#include "DGtal/images/CImage.h" +#include "DGtal/images/CConstImage.h" #include "DGtal/base/ConstAlias.h" ////////////////////////////////////////////////////////////////////////////// @@ -63,7 +63,7 @@ namespace DGtal class IntervalForegroundPredicate { public: - BOOST_CONCEPT_ASSERT(( CImage )); + BOOST_CONCEPT_ASSERT(( CConstImage )); typedef typename Image::Value Value; typedef typename Image::Point Point; diff --git a/src/DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h b/src/DGtal/images/SimpleThresholdForegroundPredicate.h similarity index 91% rename from src/DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h rename to src/DGtal/images/SimpleThresholdForegroundPredicate.h index 70fd5ea042..9888df5a15 100644 --- a/src/DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h +++ b/src/DGtal/images/SimpleThresholdForegroundPredicate.h @@ -42,7 +42,7 @@ // Inclusions #include #include "DGtal/base/Common.h" -#include "DGtal/images/CImage.h" +#include "DGtal/images/CConstImage.h" #include "DGtal/base/ConstAlias.h" ////////////////////////////////////////////////////////////////////////////// @@ -58,13 +58,13 @@ namespace DGtal * * This class is a model of CPointPredicate. * - * @tparam Image an model of CImageContainer concept. + * @tparam Image an model of CConstImage concept. */ template class SimpleThresholdForegroundPredicate { public: - BOOST_CONCEPT_ASSERT(( CImage )); + BOOST_CONCEPT_ASSERT(( CConstImage )); typedef typename Image::Value Value; typedef typename Image::Point Point; @@ -95,14 +95,6 @@ namespace DGtal return ( (*myImage)(*it) > myVal); } - /** - * @return True if the point belongs to the value interval. - */ - bool operator()(const typename Image::Range::Iterator &it) const - { - return ( (*it) > myVal); - } - /** * @return True if the point belongs to the value interval. */ diff --git a/src/DGtal/images/imagesSetsUtils/SetFromImage.h b/src/DGtal/images/imagesSetsUtils/SetFromImage.h index e7cc53c721..c0d966777f 100644 --- a/src/DGtal/images/imagesSetsUtils/SetFromImage.h +++ b/src/DGtal/images/imagesSetsUtils/SetFromImage.h @@ -44,7 +44,7 @@ #include "DGtal/base/Common.h" #include "DGtal/images/CImage.h" #include "DGtal/kernel/sets/CDigitalSet.h" -#include "DGtal/images/imagesSetsUtils/IntervalForegroundPredicate.h" +#include "DGtal/images/IntervalForegroundPredicate.h" ////////////////////////////////////////////////////////////////////////////// namespace DGtal diff --git a/tests/geometry/volumes/distance/testDistanceTransformation.cpp b/tests/geometry/volumes/distance/testDistanceTransformation.cpp index 186711fc26..313472eea1 100644 --- a/tests/geometry/volumes/distance/testDistanceTransformation.cpp +++ b/tests/geometry/volumes/distance/testDistanceTransformation.cpp @@ -45,7 +45,7 @@ #include "DGtal/helpers/StdDefs.h" #include "DGtal/shapes/ShapeFactory.h" #include "DGtal/io/boards/Board2D.h" -#include "DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h" +#include "DGtal/images/SimpleThresholdForegroundPredicate.h" /////////////////////////////////////////////////////////////////////////////// using namespace std; diff --git a/tests/geometry/volumes/distance/testDistanceTransformationND.cpp b/tests/geometry/volumes/distance/testDistanceTransformationND.cpp index c52af9e104..53c601f528 100644 --- a/tests/geometry/volumes/distance/testDistanceTransformationND.cpp +++ b/tests/geometry/volumes/distance/testDistanceTransformationND.cpp @@ -39,7 +39,7 @@ #include "DGtal/io/colormaps/HueShadeColorMap.h" #include "DGtal/io/colormaps/GrayscaleColorMap.h" #include "DGtal/io/boards/Board2D.h" -#include "DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h" +#include "DGtal/images/SimpleThresholdForegroundPredicate.h" /////////////////////////////////////////////////////////////////////////////// using namespace std; diff --git a/tests/geometry/volumes/distance/testFMM.cpp b/tests/geometry/volumes/distance/testFMM.cpp index 7b1cdb8732..6c55f7f07a 100644 --- a/tests/geometry/volumes/distance/testFMM.cpp +++ b/tests/geometry/volumes/distance/testFMM.cpp @@ -39,7 +39,7 @@ #include "DGtal/kernel/domains/DomainPredicate.h" #include "DGtal/kernel/sets/DigitalSetFromMap.h" #include "DGtal/images/ImageContainerBySTLMap.h" -#include "DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h" +#include "DGtal/images/SimpleThresholdForegroundPredicate.h" //DT #include "DGtal/images/ImageSelector.h" diff --git a/tests/geometry/volumes/distance/testReverseDT.cpp b/tests/geometry/volumes/distance/testReverseDT.cpp index 1bf99c975d..10693619e1 100644 --- a/tests/geometry/volumes/distance/testReverseDT.cpp +++ b/tests/geometry/volumes/distance/testReverseDT.cpp @@ -38,7 +38,7 @@ #include "DGtal/io/colormaps/HueShadeColorMap.h" #include "DGtal/kernel/sets/DigitalSetBySTLSet.h" #include "DGtal/io/boards/Board2D.h" -#include "DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h" +#include "DGtal/images/SimpleThresholdForegroundPredicate.h" /////////////////////////////////////////////////////////////////////////////// using namespace std;