From d490ea499e08124762dbdd7b2c8c538beed790eb Mon Sep 17 00:00:00 2001 From: Kerautret Date: Sat, 7 May 2016 14:26:37 +0200 Subject: [PATCH 01/22] add dec link examples --- src/DGtal/dec/doc/packageDEC.dox | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/DGtal/dec/doc/packageDEC.dox b/src/DGtal/dec/doc/packageDEC.dox index 020977b17c..404e973398 100644 --- a/src/DGtal/dec/doc/packageDEC.dox +++ b/src/DGtal/dec/doc/packageDEC.dox @@ -47,6 +47,8 @@ namespace DGtal { Discrete exterior calculus (DEC) provides an easy and efficient way to describe linear operator over various structure. Basic operators, such as Hodge duality operator or exterior derivative, can be combined to create classical vector analysis operator such as gradient, curl and divergence. +@note To use this package, you have to build DGtal with the Eigen option (and with Cairo option to have the examples compiled). By using cmake you have to use these options: -DWITH_EIGEN=true -DWITH_CAIRO=true. + @b Modules - \ref moduleDECIntroduction - \ref moduleDECEmbedding @@ -70,4 +72,21 @@ Basic operators, such as Hodge duality operator or exterior derivative, can be c */ + + +/** + Example of solving Poisson equation using the DEC package. + @see \ref sectDECPoissonProblem + \image html alcapone_phi.png "Solution dual 0-form." + \example dec/exampleDECSurface.cpp +**/ + + +/** + Example of 2D wave propagation using the DEC package. + @see \ref moduleDECPropagation + \image html propagation_time_wave_ii.gif "You should obtain such wave propagation (by converting svg files)." + \example dec/examplePropagation.cpp +**/ + } From 4a50c9d8fdd04bd0e98f181b312cf2fa8e8d19a2 Mon Sep 17 00:00:00 2001 From: Kerautret Date: Sat, 7 May 2016 14:29:22 +0200 Subject: [PATCH 02/22] fix link doc-examples/exampleCatch.cpp --- src/DGtal/doc/moduleCatch.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DGtal/doc/moduleCatch.dox b/src/DGtal/doc/moduleCatch.dox index 7fc44bfe2b..491c4da2fc 100644 --- a/src/DGtal/doc/moduleCatch.dox +++ b/src/DGtal/doc/moduleCatch.dox @@ -125,7 +125,7 @@ DGtal/Catch examples @see \ref moduleCatch -\example doc-exmples/exampleCatch.cpp +\example doc-examples/exampleCatch.cpp */ } From 0aebee1ddbd9e05ca2265035751fa9575ec9a454 Mon Sep 17 00:00:00 2001 From: Kerautret Date: Sat, 7 May 2016 16:15:53 +0200 Subject: [PATCH 03/22] all dec examples --- src/DGtal/dec/doc/packageDEC.dox | 33 +++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src/DGtal/dec/doc/packageDEC.dox b/src/DGtal/dec/doc/packageDEC.dox index 404e973398..18f8897141 100644 --- a/src/DGtal/dec/doc/packageDEC.dox +++ b/src/DGtal/dec/doc/packageDEC.dox @@ -62,18 +62,45 @@ Basic operators, such as Hodge duality operator or exterior derivative, can be c @b Related @b documentation @b pages @b Related @b examples -- testDiscreteExteriorCalculus.cpp +- exampleDECSurface.cpp +- examplePropagation.cpp - exampleDiscreteExteriorCalculusUsage.cpp - exampleDiscreteExteriorCalculusSolve.cpp -- examplePropagation.cpp +- exampleDiscreteExteriorCalculusChladni.cpp +- testDiscreteExteriorCalculus.cpp - testLinearStructure.cpp - testEmbedding.cpp -- exampleDECSurface.cpp */ +/** + Example of Discrete Exterior Calculus with Chladni. + @see \ref sectDECHelmoltzProblem + \image html exampleDECChladni.png "Primal Helmoltz decomposition harmonic component." + \example dec/exampleDiscreteExteriorCalculusChladni.cpp +**/ + + +/** + Example of primal and dual Helmoltz decomposition in 2D and 3D using Discrete Exterior Calculus. + @see \ref sectDECHelmoltzProblem + \image html solve_2d_primal_decomposition_calculusSmall.png "Primal Helmoltz decomposition harmonic component." + \example dec/exampleDiscreteExteriorCalculusSolve.cpp +**/ + + + +/** + Example of vector field manipulation using Discrete Exterior Calculus. + @see \ref sectDECIntroduction + \image html usage_primal_one_form_sharp_flat.png "Flat sharped primal gradient vector field." + \example dec/exampleDiscreteExteriorCalculusUsage.cpp +**/ + + + /** Example of solving Poisson equation using the DEC package. @see \ref sectDECPoissonProblem From f6ac307d0780185472c13ed815d230ebf1ca3a0d Mon Sep 17 00:00:00 2001 From: Kerautret Date: Sat, 7 May 2016 16:54:54 +0200 Subject: [PATCH 04/22] add doc-examples kernel examples --- src/DGtal/kernel/doc/packageKernel.dox | 29 +++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/DGtal/kernel/doc/packageKernel.dox b/src/DGtal/kernel/doc/packageKernel.dox index a3647f3ab3..f826bf0544 100644 --- a/src/DGtal/kernel/doc/packageKernel.dox +++ b/src/DGtal/kernel/doc/packageKernel.dox @@ -66,10 +66,37 @@ tools. +@b Related @b examples +- kernelDomain.cpp +- range.cpp +- kernelDomain.cpp +- demo-kernel-1.cpp +*/ -*/ +/** + Example of DGtal kernel and export with Board2D. + \image html exampleDemoKernel-1.png "Display 2D points in its domain and export woth Board2D." + \example doc-examples/demo-kernel-1.cpp +**/ + + +/** + Example of DGtal kernel with Domain. + @see \ref sectSpace + \image html kernel-domain-it-arrow.png "Iteration over a domain with displacements depicted as arrows." + \example doc-examples/kernelDomain.cpp +**/ + + +/** + Example of range on Domain. + @see \ref sectSpace + \example doc-examples/range.cpp +**/ + + } From baf0adefd97096cdc97f832a142557e4e48b0c3c Mon Sep 17 00:00:00 2001 From: Kerautret Date: Sat, 7 May 2016 18:08:45 +0200 Subject: [PATCH 05/22] add listing example DCA --- src/DGtal/geometry/doc/packageGeometry.dox | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/DGtal/geometry/doc/packageGeometry.dox b/src/DGtal/geometry/doc/packageGeometry.dox index b9f8e2262f..a278eda0bb 100644 --- a/src/DGtal/geometry/doc/packageGeometry.dox +++ b/src/DGtal/geometry/doc/packageGeometry.dox @@ -88,7 +88,7 @@ of arbitrary dimension, by the means of separable and incremental distance trans @b Related @b documentation @b pages @b Related @b examples - +- exampleCurvature.cpp - voronoimap2D.cpp, distancetransform3D.cpp, distancetransform2D.cpp - viewer3D-7-planes.cpp , viewer3D-7bis-planes.cpp , viewer3D-7-stdplane.cpp , viewer3D-7bis-stdplane.cpp , greedy-plane-segmentation.cpp , greedy-plane-segmentation-ex2.cpp - exampleConvexHull2D.cpp, exampleAlphaShape.cpp @@ -96,3 +96,13 @@ of arbitrary dimension, by the means of separable and incremental distance trans */ } + + + + +/** + Example of curvature estimation based on Digital Circular Arc (DCA) estimator. + \image html exampleCurvature.png "Curvature estimated using DCA estimator on a flower shape." + \example geometry/curves/estimation/exampleCurvature.cpp +**/ + From a02228b61c4ffdefd25bdcb5d57c149126a699eb Mon Sep 17 00:00:00 2001 From: Kerautret Date: Sat, 7 May 2016 18:15:48 +0200 Subject: [PATCH 06/22] add link DSLSubsegment --- src/DGtal/geometry/doc/packageGeometry.dox | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/DGtal/geometry/doc/packageGeometry.dox b/src/DGtal/geometry/doc/packageGeometry.dox index a278eda0bb..f1a3857918 100644 --- a/src/DGtal/geometry/doc/packageGeometry.dox +++ b/src/DGtal/geometry/doc/packageGeometry.dox @@ -106,3 +106,9 @@ of arbitrary dimension, by the means of separable and incremental distance trans \example geometry/curves/estimation/exampleCurvature.cpp **/ + +/** + Example of DSLSubsegment. + \example geometry/curves/exampleDSLSubsegment.cpp +**/ + From 90fa9e8297d68c883b04abbb076550b6232fe0b2 Mon Sep 17 00:00:00 2001 From: Kerautret Date: Sat, 7 May 2016 22:23:29 +0200 Subject: [PATCH 07/22] [done] ref example geometry --- src/DGtal/geometry/doc/moduleVolumetric.dox | 12 ++++++------ src/DGtal/geometry/doc/packageGeometry.dox | 14 +++++++++++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/DGtal/geometry/doc/moduleVolumetric.dox b/src/DGtal/geometry/doc/moduleVolumetric.dox index 3c8b45a569..00bddc4c2d 100644 --- a/src/DGtal/geometry/doc/moduleVolumetric.dox +++ b/src/DGtal/geometry/doc/moduleVolumetric.dox @@ -298,17 +298,17 @@ ExactLpPowerSeparableMetric, see @ref moduleMetrics Example of a Voronoi map construction in dimension 2 for the Eucldiean metric. -@see \ref voronoiSect - -\example geometry/volumes/distance/voronoimap2D.cpp + @see \ref voronoiSect + \image html voronoimap-dt.png "Distance transformation for the l_2 metric." + \example geometry/volumes/distance/voronoimap2D.cpp */ /** Example of distance transformation in dimension 2. -@see \ref moduleVolumetric - -\example geometry/volumes/distance/distancetransform2D.cpp + @see \ref moduleVolumetric + \image html example-DT-L2.png "Distance transform with L2 norm." + \example geometry/volumes/distance/distancetransform2D.cpp */ /** diff --git a/src/DGtal/geometry/doc/packageGeometry.dox b/src/DGtal/geometry/doc/packageGeometry.dox index f1a3857918..0679fb6bef 100644 --- a/src/DGtal/geometry/doc/packageGeometry.dox +++ b/src/DGtal/geometry/doc/packageGeometry.dox @@ -97,7 +97,11 @@ of arbitrary dimension, by the means of separable and incremental distance trans } - +/** + Example of geometric predicates. + @see @ref moduleGeometricPredicates + \example geometry/tools/determinant/exampleInHalfPlane.cpp +**/ /** @@ -112,3 +116,11 @@ of arbitrary dimension, by the means of separable and incremental distance trans \example geometry/curves/exampleDSLSubsegment.cpp **/ + + +/** + Example of Preimage2D. + \image html preimageExample2.png "Example of preimage based arc recognition." + \example geometry/tools/examplePreimage.cpp +**/ + From 535507e3260c3a1258e0204149f85a6b32fbe14e Mon Sep 17 00:00:00 2001 From: Kerautret Date: Sat, 7 May 2016 23:45:00 +0200 Subject: [PATCH 08/22] [done] ref example images --- src/DGtal/images/doc/moduleBigImages.dox | 10 ++++++ .../doc/moduleGeometricalTransformation.dox | 21 ++++++++++++ src/DGtal/images/doc/moduleImages.dox | 33 +++++++++++++++++++ 3 files changed, 64 insertions(+) diff --git a/src/DGtal/images/doc/moduleBigImages.dox b/src/DGtal/images/doc/moduleBigImages.dox index 7a4e1d1f4d..c30a29a011 100644 --- a/src/DGtal/images/doc/moduleBigImages.dox +++ b/src/DGtal/images/doc/moduleBigImages.dox @@ -273,3 +273,13 @@ And finally, here is the modified original image after the two writings. */ } + + +/** +* Example of HDF5 ImageFactory. + @see @ref dgtalBigImagesAbstract + + \image html TiledImageFromImage-11-write.png "Example of writing in cache, see @ref dgtalBigImagesAbstract for more details. " +* \example images/exampleImageFactoryFromHDF5.cpp +**/ + diff --git a/src/DGtal/images/doc/moduleGeometricalTransformation.dox b/src/DGtal/images/doc/moduleGeometricalTransformation.dox index 3093691c08..865c630f39 100644 --- a/src/DGtal/images/doc/moduleGeometricalTransformation.dox +++ b/src/DGtal/images/doc/moduleGeometricalTransformation.dox @@ -149,3 +149,24 @@ and for backward as well: */ } + + + + +/** +* Example of 2D rigid transformation using forward and backward model. + @see @ref moduleGeometricTransform + \image html church_backward.jpg "Result for backward model" +* \example images/exampleRigidtransformation2d.cpp +**/ + + +/** +* Example of 3D rigid transformation using forward and backward model. + @see @ref moduleGeometricTransform + \image html cat10_backward.jpg "Result for backward model" +* \example images/exampleRigidtransformation3d.cpp +**/ + + + diff --git a/src/DGtal/images/doc/moduleImages.dox b/src/DGtal/images/doc/moduleImages.dox index 1c77a852b6..6ce9ca05a7 100644 --- a/src/DGtal/images/doc/moduleImages.dox +++ b/src/DGtal/images/doc/moduleImages.dox @@ -519,6 +519,39 @@ You will obtain such a result (with also the result on 3D images): */ } + +/** +* Example of ConstImageAdapter. + @see @ref constimage + \image html logImage.png " 16x16 image: (1,1) to (16,16) adapted from with a log scale functor." +* \example images/exampleConstImageAdapter.cpp +**/ + + +/** +* Example of ArrayImageAdapter with subdomain. + @see @ref arrayimageadat + \image html ArrayImageAdapter_subImage_modifByImage.png " (9) modifying the first bottom-left 8x8 image through the sub-domain view with an image iterator." + +* \example images/exampleArrayImageAdapter.cpp +**/ + + +/** +* Example of TiledImage. + @see @ref moduleImages +* \example images/exampleTiledImage.cpp +**/ + + +/** +* Example of image format transformation from raw to HDF5. + @see @ref dgtalBigImagesAbstract +* \example images/raw2HDF5.cpp +**/ + + + /** * Example of 2D slice images extraction from 3D images. From d53e15f2855f13f56b48a0ddbc018f11443dd0d7 Mon Sep 17 00:00:00 2001 From: Kerautret Date: Sun, 8 May 2016 14:53:05 +0200 Subject: [PATCH 09/22] [done] ref example io --- examples/io/viewDualSurface.cpp | 8 ++++---- src/DGtal/io/doc/moduleBoard2D.dox | 11 +++++++++-- src/DGtal/io/doc/moduleDisplay3D.dox | 13 +++++++++++++ src/DGtal/io/doc/moduleIO.dox | 16 ++++++++++++---- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/examples/io/viewDualSurface.cpp b/examples/io/viewDualSurface.cpp index 491f3f3f40..d1d90fa935 100644 --- a/examples/io/viewDualSurface.cpp +++ b/examples/io/viewDualSurface.cpp @@ -15,12 +15,12 @@ **/ /** - * @file digitalSetFromVol.cpp + * @file viewDualSurface.cpp * @ingroup Examples * * @date 2011/03/25 * - * An example file named digitalSetFromVol. + * An example file named viewDualSurface. * * This file is part of the DGtal library. */ @@ -393,7 +393,7 @@ int main( int argc, char** argv ) { typedef KSpace::CellSet CellSet; QApplication application(argc,argv); - //! [ExampleDisplay3DToOFF] + KSpace KS; Viewer3D viewer(KS); @@ -444,6 +444,6 @@ int main( int argc, char** argv ) } } viewer << Viewer3D<>::updateDisplay; - //! [ExampleDisplay3DToOFF] + return application.exec(); } diff --git a/src/DGtal/io/doc/moduleBoard2D.dox b/src/DGtal/io/doc/moduleBoard2D.dox index b3ec3397bf..f5fd792eb1 100644 --- a/src/DGtal/io/doc/moduleBoard2D.dox +++ b/src/DGtal/io/doc/moduleBoard2D.dox @@ -554,13 +554,20 @@ element ArithmeticDSS is redefined. */ /** -\example logoDGtal.cpp + \example io/boards/logoDGtal.cpp -Simple example to generate DGtal logo in DGtal. + Simple example to generate DGtal logo in DGtal. \image html logo_DGtal_small.png "visualization of resulting export." */ + +/** + * Example of bezier curve display in Board2D + * + @image html exampleBezierCurve.png "visualization of resulting export." + @example io/boards/exampleBezierCurve.cpp + **/ } diff --git a/src/DGtal/io/doc/moduleDisplay3D.dox b/src/DGtal/io/doc/moduleDisplay3D.dox index 38688e2d29..99141ba2dd 100644 --- a/src/DGtal/io/doc/moduleDisplay3D.dox +++ b/src/DGtal/io/doc/moduleDisplay3D.dox @@ -740,7 +740,20 @@ Khalimsky Signed Cell Visualization (with Board3DTo2D) * */ +/** + Example of Domain and Point display in Viewer3D. + @see @ref moduleDisplay3D + \image html demo-kernel-2.png " " +* \example io/viewers/demo-kernel-2.cpp +**/ + +/** + Example of viewing dual surfaces in Viewer3D. + \image html viewDualSurface.png " " +* \example io/viewDualSurface.cpp +**/ + } diff --git a/src/DGtal/io/doc/moduleIO.dox b/src/DGtal/io/doc/moduleIO.dox index 770ecf7677..c344c4b3fd 100644 --- a/src/DGtal/io/doc/moduleIO.dox +++ b/src/DGtal/io/doc/moduleIO.dox @@ -285,8 +285,8 @@ Afterwards the set is thresholded in ]0,255[: Then you will obtain the following visualisation: -\image html visuDigitalSet3D.png "3D digital with Viewer3D" -\image latex visuDigitalSet3D.png "3D digital with Viewer3D" width=5cm +\image html visuDigitalSet3D.png "3D digital set from volumetric file (.vol)" +\image latex visuDigitalSet3D.png "3D digital set from volumetric file (.vol)" width=5cm \subsection importPointList Import 3D point list from file @@ -404,11 +404,17 @@ instance generate some exports in pdf like this example: } /** - -* TODO \example io/digitalSetFromVol.cpp + Example of digital set extraction from volumetric file (.vol). + @see @ref moduleIO + \image html visuDigitalSet3D.png "3D digital set from volumetric file (.vol)" +* \example io/digitalSetFromVol.cpp **/ + /** + Example of point list import. + @see @ref moduleIO + \image html visuPointList.png "Visualisation of 3d imported point list " * \example io/digitalSetFromPointList.cpp **/ @@ -434,3 +440,5 @@ instance generate some exports in pdf like this example: * @example io/display3DToOFF.cpp */ + + From 6fe035213cbb61399cd6211531ed22079feafb19 Mon Sep 17 00:00:00 2001 From: Kerautret Date: Sun, 8 May 2016 18:57:46 +0200 Subject: [PATCH 10/22] [done] ref example math --- src/DGtal/math/doc/modulePolynomial.dox | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/DGtal/math/doc/modulePolynomial.dox b/src/DGtal/math/doc/modulePolynomial.dox index 4e3d1f087d..8cc0efe0e5 100644 --- a/src/DGtal/math/doc/modulePolynomial.dox +++ b/src/DGtal/math/doc/modulePolynomial.dox @@ -471,4 +471,21 @@ d/dX_1 dP/dX_1(X_0,X_1) = 2 \example math/polynomial2-derivative.cpp */ + +/** + Example of polynom read from user input. + +@see \ref modulePolynomial + +@verbatim +$ ./examples/math/polynomial-read +Type any multi-variate polynomial, then press return. +Examples: xyz^3-4yz, (x+y+z)*(x-y-z)^2. +(x-3)^2 + (y-2)^2 - 4 +Ok : ((9 + -4 X_1 + 1 X_1^2) + -6 X_0 + 1 X_0^2) +@endverbatim + +\example math/polynomial-read.cpp +*/ + } From c8d111dfba3ce19ab73937da1f8486e490ac8ef0 Mon Sep 17 00:00:00 2001 From: Kerautret Date: Sun, 8 May 2016 20:54:56 +0200 Subject: [PATCH 11/22] [done] ref example shapes --- src/DGtal/shapes/doc/moduleShape.dox | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/DGtal/shapes/doc/moduleShape.dox b/src/DGtal/shapes/doc/moduleShape.dox index 037516cb46..0d76fe4049 100644 --- a/src/DGtal/shapes/doc/moduleShape.dox +++ b/src/DGtal/shapes/doc/moduleShape.dox @@ -218,3 +218,12 @@ The following images show you binary operations apply on two Ball2D (results are } + + + +/** +Example of EuclideanShapesDecorator +@see @ref moduleShape +@image html example-EuclideanShapesDecorator.png "Result obtained from CSG operations with implicit balls. " +@example shapes/exampleEuclideanShapesDecorator.cpp +**/ \ No newline at end of file From 99f541ac6adaaec43d993209b055e7ea3450f57a Mon Sep 17 00:00:00 2001 From: Kerautret Date: Sun, 8 May 2016 23:22:48 +0200 Subject: [PATCH 12/22] [done] ref example topology --- .../topology/doc/moduleCubicalComplex.dox | 23 +++++++++++++++++++ .../doc/moduleDigitalSurfaceHelpers.dox | 13 +++++++++++ .../topology/doc/moduleDigitalSurfaces.dox | 14 +++++++++++ src/DGtal/topology/doc/packageTopology.dox | 13 +++++++++++ 4 files changed, 63 insertions(+) diff --git a/src/DGtal/topology/doc/moduleCubicalComplex.dox b/src/DGtal/topology/doc/moduleCubicalComplex.dox index 5381599c03..83e0cec705 100644 --- a/src/DGtal/topology/doc/moduleCubicalComplex.dox +++ b/src/DGtal/topology/doc/moduleCubicalComplex.dox @@ -346,3 +346,26 @@ $ */ } + + + +/** +Source of examples used to generate illustrations of Cubical Complex module documention. +@see @ref moduleCubicalComplex +@image html cubical-complex-illustrations-X.png "One of the generated illustration: displaying a 2D cubical complex on a Board." +@example topology/cubical-complex-illustrations.cpp + +*/ + + + +/** +Converting a digital set to cubical complex. +@see @ref moduleCubicalComplex +@image html cubicalComplexes.png "Resulting cubical complex obtained on a flower shape." +@example topology/digitalSetToCubicalComplexes2D.cpp + +*/ + + + diff --git a/src/DGtal/topology/doc/moduleDigitalSurfaceHelpers.dox b/src/DGtal/topology/doc/moduleDigitalSurfaceHelpers.dox index 2c95dc698d..ecf2122e45 100644 --- a/src/DGtal/topology/doc/moduleDigitalSurfaceHelpers.dox +++ b/src/DGtal/topology/doc/moduleDigitalSurfaceHelpers.dox @@ -407,4 +407,17 @@ If you succeed the exercise you will obtain the following pgm image: \example topology/ctopo-fillContours.cpp */ +/** +Extracting 3D surface slice with DigitalSurfaceTracker. +@see @ref dgtal_helpsurf_sec2 +@image html digitalSurfaceSlice.png "Extraction of 2 surface slice associated to one surfel." +@example topology/digitalSurfaceSlice.cpp + +*/ + + + + } + + diff --git a/src/DGtal/topology/doc/moduleDigitalSurfaces.dox b/src/DGtal/topology/doc/moduleDigitalSurfaces.dox index 68b21f2fdb..cf4d314c65 100644 --- a/src/DGtal/topology/doc/moduleDigitalSurfaces.dox +++ b/src/DGtal/topology/doc/moduleDigitalSurfaces.dox @@ -712,4 +712,18 @@ $ ctmviewer marching-cube.off */ +/** + Examples of breadth-first traversal on a digital surface +You can use these commands: +@verbatim +# Commands +$ ./examples/topology/volBreadthFirstTraversal ../examples/samples/lobster.vol 50 255 +$ ./examples/topology/volBreadthFirstTraversal ../examples/samples/cat10.vol 1 255 +@endverbatim + +to get these pictures: + @image html digital-surface-bfv-all.png "Examples of breadth-first traversal on a digital surface." + @example topology/volBreadthFirstTraversal.cpp +*/ + } diff --git a/src/DGtal/topology/doc/packageTopology.dox b/src/DGtal/topology/doc/packageTopology.dox index 81c48866fc..79d3b27156 100644 --- a/src/DGtal/topology/doc/packageTopology.dox +++ b/src/DGtal/topology/doc/packageTopology.dox @@ -85,3 +85,16 @@ boundary, union, etc). */ } + + + +/** +Creates precomputed tables for determining whether some point is simple within an 2D object. +@image html table4_8.png "Resulting table for 4-8 topology." +@example topology/generateSimplicityTables2D.cpp +*/ + +/** +Creates precomputed tables for determining whether some point is simple within an 3D object. +@example topology/generateSimplicityTables3D.cpp +*/ From bea2cbade2f1f9932a83c90c4868ece7bb74c809 Mon Sep 17 00:00:00 2001 From: Kerautret Date: Mon, 9 May 2016 01:22:09 +0200 Subject: [PATCH 13/22] [done] ref example tutorial-examples --- .../tutorial-examples/2DSliceImageFromVol.cpp | 87 +++++++++++++++++++ examples/tutorial-examples/CMakeLists.txt | 1 + examples/tutorial-examples/volDTGranulo.cpp | 6 +- src/DGtal/doc/tutorials/tutoAreaSurface.dox | 6 ++ src/DGtal/doc/tutorials/tutoFMMErosion.dox | 9 ++ .../doc/tutorials/tutoImageManipulations.dox | 9 ++ .../doc/tutorials/tutoPolyhedralisation.dox | 7 ++ .../doc/tutorials/tutoVolDTGranulometry.dox | 9 ++ 8 files changed, 129 insertions(+), 5 deletions(-) create mode 100644 examples/tutorial-examples/2DSliceImageFromVol.cpp diff --git a/examples/tutorial-examples/2DSliceImageFromVol.cpp b/examples/tutorial-examples/2DSliceImageFromVol.cpp new file mode 100644 index 0000000000..48d3ebfad3 --- /dev/null +++ b/examples/tutorial-examples/2DSliceImageFromVol.cpp @@ -0,0 +1,87 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file 2DSliceImageFromVol.cpp + * @ingroup tutorial-examples + * @author Bertrand Kerautret (\c bertrand.kerautret@loria.fr ) + * LORIA (CNRS, UMR 7503), University of Lorraine, France + * + * + * @date 2016/05/09 + * + * @brief Example associated to the tutorial 5 on Image adapter + * + * This file is part of the DGtal library. + */ + +#include +#include +#include "DGTal/io/readers/GenericReader.h" +#include "DGTal/io/writers/GenericWriter.h" + +#include +#include +#include + + +#include "DGtal/kernel/BasicPointFunctors.h" + +using namespace std; +using namespace DGtal; +using namespace Z2i; + + + +int main(int argc, char ** argv) +{ + + typedef ImageContainerBySTLVector Image2D; + typedef ImageContainerBySTLVector Image3D; + + if(argc < 3) + { + trace.error() << "You need to indicate the volumetric image name and slice number as parameters." << std::endl; + trace.error() << std::endl; + return 1; + } + std::string filename(argv[1]); + std::string outputFileName = "sliceImage.pgm"; + + unsigned int numSlice = atoi(argv[2]); + + trace.beginBlock("Loading file"); + Image3D image3d = GenericReader< Image3D >::import ( filename ); + + + functors::Identity id; + typedef ConstImageAdapter, + Image3D::Value, functors::Identity > SliceImageAdapter; + functors::Projector proj(2); + Z2i::Domain domain2D(proj(image3d.domain().lowerBound()), + proj(image3d.domain().upperBound())); + + DGtal::functors::Projector aSliceFunctor(numSlice); + aSliceFunctor.initAddOneDim(2); + SliceImageAdapter sliceImageZ(image3d, domain2D, aSliceFunctor, id); + + trace.endBlock(); + + trace.beginBlock("Exporting..."); + sliceImageZ >> outputFileName; + trace.endBlock(); + return 0; +} diff --git a/examples/tutorial-examples/CMakeLists.txt b/examples/tutorial-examples/CMakeLists.txt index 68b31ab9f7..dfb72eb768 100644 --- a/examples/tutorial-examples/CMakeLists.txt +++ b/examples/tutorial-examples/CMakeLists.txt @@ -6,6 +6,7 @@ SET(DGTAL_TUTO_EXAMPLES_SRC shapeGridCurveEstimator freemanChainFromImage FMMErosion + 2DSliceImageFromVol ) diff --git a/examples/tutorial-examples/volDTGranulo.cpp b/examples/tutorial-examples/volDTGranulo.cpp index 5eb546553f..34081e5cd4 100644 --- a/examples/tutorial-examples/volDTGranulo.cpp +++ b/examples/tutorial-examples/volDTGranulo.cpp @@ -180,10 +180,6 @@ int main(int argc, char ** argv) trace.info() << "Got "<::updateDisplay; trace.info() << "viewer3 launched..."< Date: Mon, 9 May 2016 01:26:25 +0200 Subject: [PATCH 14/22] correction of namespace in tuto 5 --- src/DGtal/doc/tutorials/tutoImageManipulations.dox | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/DGtal/doc/tutorials/tutoImageManipulations.dox b/src/DGtal/doc/tutorials/tutoImageManipulations.dox index 57d1f1dd01..79f433af42 100644 --- a/src/DGtal/doc/tutorials/tutoImageManipulations.dox +++ b/src/DGtal/doc/tutorials/tutoImageManipulations.dox @@ -140,12 +140,12 @@ To apply the extraction you can follow these steps: - type of the source Image (Image3D). - the domain type of the resulting image (Image2D::Domain). - the functor taking in input 2D data and return 3D - points (DGtal::Projector) to access to source image data. + points ( DGtal::functors::Projector) to access to source image data. - the type of value of the 3D image (Image3D::Value) - the functor type to be applied on the source image value during the reading process. -\code - typedef DGtal::ConstImageAdapter, - Image3D::Value, DGtal::DefaultFunctor > SliceImageAdapter; +\code + typedef ConstImageAdapter, + Image3D::Value, functors::Identity > SliceImageAdapter; \endcode @@ -167,7 +167,7 @@ should obtain the following image: @subsubsection subsubsectHintsImageExtractionIntroTutoImageManipulations Hints: - To construct the domain of the resulting image you can use a projector: \code - DGtal::Projector proj(2); + DGtal::functors::Projector proj(2); DGtal::Z2i::Domain domain2D(proj(image3d.domain().lowerBound()), proj(image3d.domain().upperBound())); \endcode From d11f4ba0182b4a7962b009c97179a98f99c5459d Mon Sep 17 00:00:00 2001 From: Kerautret Date: Mon, 9 May 2016 01:29:58 +0200 Subject: [PATCH 15/22] changelog --- ChangeLog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 38886aefc3..1585c7ac52 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -15,8 +15,8 @@ changes in new pull-requests. (David Coeurjolly, [#1133](https://github.com/DGtal-team/DGtal/pull/1133)) - Add cmake configuration file NeighborhoodTablesConfig to decompress and install look up tables. (Pablo Hernandez-Cerdan, [#1155](https://github.com/DGtal-team/DGtal/pull/1155)) - - + - Check and add all DGtal examples in the Examples listing section. + (Bertrand Kerautret, [#1161](https://github.com/DGtal-team/DGtal/pull/1133)))) - *Base Package* - Alias and ConstAlias now raise compilation error when using invalid From 27494f51f04cfdab85423d058dcb17feb429d41b Mon Sep 17 00:00:00 2001 From: Kerautret Date: Mon, 9 May 2016 09:46:37 +0200 Subject: [PATCH 16/22] typo include --- examples/tutorial-examples/2DSliceImageFromVol.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tutorial-examples/2DSliceImageFromVol.cpp b/examples/tutorial-examples/2DSliceImageFromVol.cpp index 48d3ebfad3..547ea8fe2e 100644 --- a/examples/tutorial-examples/2DSliceImageFromVol.cpp +++ b/examples/tutorial-examples/2DSliceImageFromVol.cpp @@ -30,8 +30,8 @@ #include #include -#include "DGTal/io/readers/GenericReader.h" -#include "DGTal/io/writers/GenericWriter.h" +#include "DGtal/io/readers/GenericReader.h" +#include "DGtal/io/writers/GenericWriter.h" #include #include From 406793129d4080129fbc25aaaf0f2f83d30bc73a Mon Sep 17 00:00:00 2001 From: Kerautret Date: Mon, 9 May 2016 14:42:04 +0200 Subject: [PATCH 17/22] list example of volMarchingCubes --- .../topology/doc/moduleDigitalSurfaces.dox | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/DGtal/topology/doc/moduleDigitalSurfaces.dox b/src/DGtal/topology/doc/moduleDigitalSurfaces.dox index cf4d314c65..48d575ad20 100644 --- a/src/DGtal/topology/doc/moduleDigitalSurfaces.dox +++ b/src/DGtal/topology/doc/moduleDigitalSurfaces.dox @@ -688,6 +688,24 @@ $ ./examples/topology/volToOff ../examples/samples/lobster.vol 50 255 0 \example topology/volToOFF.cpp */ +/** +Marching-cube like surface extracted using the combinatorial +manifold structure of digital surfaces. + +@see \ref dgtal_digsurf_sec4_3 + +@verbatim +# Commands +$ ./examples/topology/volMarchingCubes ../examples/samples/Al.100.vol 0 1 0 +@endverbatim + +@image html digital-surface-mc-Al100.png "Marching-cube surface of Al.100.vol file." + +\example topology/volMarchingCubes.cpp +*/ + + + /** Implicit polynomial surface defined on the command-line by the user (as "(x^2+y^2+2z^2-1)*(z^2x-0.1)"), then extracted using digital From 370cf09c21c122f6415d023d4325e70b3084e386 Mon Sep 17 00:00:00 2001 From: Kerautret Date: Tue, 10 May 2016 09:49:43 +0200 Subject: [PATCH 18/22] correct num PR --- ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index fcd37f8c9c..86477f6be3 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -18,7 +18,7 @@ decompress and install look up tables. (Pablo Hernandez-Cerdan, [#1155](https://github.com/DGtal-team/DGtal/pull/1155)) - Check and add all DGtal examples in the Examples listing section. - (Bertrand Kerautret, [#1161](https://github.com/DGtal-team/DGtal/pull/1133)))) + (Bertrand Kerautret, [#1166](https://github.com/DGtal-team/DGtal/pull/1166)))) - *Base Package* - Alias and ConstAlias now raise compilation error when using invalid From ba30bb1b1225b6a4c7e07094c34acbcbd6310e1f Mon Sep 17 00:00:00 2001 From: Kerautret Date: Mon, 23 May 2016 11:32:53 +0200 Subject: [PATCH 19/22] remove test ref link in doc DEC --- src/DGtal/dec/doc/packageDEC.dox | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/DGtal/dec/doc/packageDEC.dox b/src/DGtal/dec/doc/packageDEC.dox index 18f8897141..b8a43a30a6 100644 --- a/src/DGtal/dec/doc/packageDEC.dox +++ b/src/DGtal/dec/doc/packageDEC.dox @@ -67,9 +67,6 @@ Basic operators, such as Hodge duality operator or exterior derivative, can be c - exampleDiscreteExteriorCalculusUsage.cpp - exampleDiscreteExteriorCalculusSolve.cpp - exampleDiscreteExteriorCalculusChladni.cpp -- testDiscreteExteriorCalculus.cpp -- testLinearStructure.cpp -- testEmbedding.cpp */ From ebe0d7ca3ffedbf46de90e7ff3e61728bb0d7de8 Mon Sep 17 00:00:00 2001 From: Kerautret Date: Wed, 15 Jun 2016 10:36:29 +0200 Subject: [PATCH 20/22] changelog diff --- ChangeLog.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index f08f522d72..247d75f0a8 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -37,12 +37,9 @@ - Add cmake configuration file NeighborhoodTablesConfig to decompress and install look up tables. (Pablo Hernandez-Cerdan, [#1155](https://github.com/DGtal-team/DGtal/pull/1155)) -<<<<<<< HEAD -- Check and add all DGtal examples in the Examples listing section. - (Bertrand Kerautret, [#1166](https://github.com/DGtal-team/DGtal/pull/1166)))) -======= ->>>>>>> 85656d8f34b0cdf6afc8e76acebcc553dafce397 - + - Check and add all DGtal examples in the Examples listing section. + (Bertrand Kerautret,[#1166](https://github.com/DGtal-team/DGtal/pull/1166)))) + - *Base Package* - Alias and ConstAlias now raise compilation error when using invalid constructor, like from a rvalue reference. Adding ConstAlias in many classes From c673d7f8de34980752d31d6e4a3e2d2691bcc1e9 Mon Sep 17 00:00:00 2001 From: Kerautret Date: Wed, 15 Jun 2016 11:09:18 +0200 Subject: [PATCH 21/22] strange travis (reload pb branch)... --- ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 247d75f0a8..ac55377e66 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -39,7 +39,7 @@ [#1155](https://github.com/DGtal-team/DGtal/pull/1155)) - Check and add all DGtal examples in the Examples listing section. (Bertrand Kerautret,[#1166](https://github.com/DGtal-team/DGtal/pull/1166)))) - + - *Base Package* - Alias and ConstAlias now raise compilation error when using invalid constructor, like from a rvalue reference. Adding ConstAlias in many classes From 75d37dc466ee6fda051da342c6d2d9cc7eca6316 Mon Sep 17 00:00:00 2001 From: Kerautret Date: Wed, 15 Jun 2016 11:31:27 +0200 Subject: [PATCH 22/22] doc warning --- src/DGtal/images/doc/moduleBigImages.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DGtal/images/doc/moduleBigImages.dox b/src/DGtal/images/doc/moduleBigImages.dox index 3984f287db..ee01b8ddeb 100644 --- a/src/DGtal/images/doc/moduleBigImages.dox +++ b/src/DGtal/images/doc/moduleBigImages.dox @@ -279,7 +279,7 @@ And finally, here is the modified original image after the two writings. * Example of HDF5 ImageFactory. @see @ref dgtalBigImagesAbstract - \image html TiledImageFromImage-11-write.png "Example of writing in cache, see @ref dgtalBigImagesAbstract for more details. " + \image html TiledImageFromImage-11-write.png "Example of writing in cache. " * \example images/exampleImageFactoryFromHDF5.cpp **/