* doc/Doxyfile.in: Add new example/include paths.
* doc/tutorial/Makefile.am,
* doc/Makefile.am: Add a new target for the tutorial.
Rename target "internal" to "complete.
* doc/tutorial/todoxygen.sh: script to convert .tex files to .html
files. It uses Hevea.
* doc/tutorial/samples/borderthickness.cc,
* doc/tutorial/samples/extension-ignore2.cc,
* doc/tutorial/samples/ima-size.cc,
* doc/tutorial/samples/ima2d-1.cc,
* doc/tutorial/samples/ima2d-decl-2-blobs-full.cc,
* doc/tutorial/samples/ima2d-rot.cc,
* doc/tutorial/samples/labeling-compute-full.cc,
* doc/tutorial/samples/logical-not.cc,
* doc/tutorial/samples/paste-call-1.cc,
* doc/tutorial/samples/plop.ppm,
* doc/tutorial/samples/win-create-3.cc: Fix sample code.
* doc/tutorial/samples/Makefile.am: add new target for sample
programs.
* doc/tutorial/tutorial.tex: Include images.
* mln/core/internal/complex_window_p_base.hh,
* mln/core/routine/extend.hh,
* mln/core/site_set/p_complex.hh,
* mln/debug/graph.hh,
* mln/debug/println_with_border.hh,
* mln/fun/x2v/bilinear.hh,
* mln/fun/x2v/linear.hh,
* mln/fun/x2v/nneighbor.hh,
* mln/geom/nsites.hh,
* mln/topo/n_face.hh,
* mln/util/internal/graph_nbh_iter.hh,
* tests/core/site_set/p_complex.cc,
* tests/morpho/complex_image_wst.cc: Fix doxygen warnings.
* doc/doc.mk: Add shared variables for doc generation.
* doc/tutorial/samples/borderthickness-output.tex,
* doc/tutorial/samples/dpoint-1-output.tex,
* doc/tutorial/samples/graph-output-1.tex,
* doc/tutorial/samples/ima-size-output.tex,
* doc/tutorial/samples/ima2d-1-output.tex,
* doc/tutorial/samples/ima2d-3-output.tex,
* doc/tutorial/samples/ima2d-decl-2-blobs-output.tex,
* doc/tutorial/samples/ima2d-display-output-1.tex,
* doc/tutorial/samples/ima2d-display-output-2.tex,
* doc/tutorial/samples/labeling-compute-result-output.tex,
* doc/tutorial/samples/logical-not-output.tex,
* doc/tutorial/samples/paste-call-1-output.tex,
* doc/tutorial/samples/point-1-output.tex: removed since they will be
generated.
* doc/tutorial/samples/accu-right-instanciation.tex,
* doc/tutorial/samples/accu-right-instanciation.cc,
* doc/tutorial/samples/accu-wrong-instanciation.tex,
* doc/tutorial/samples/accu-wrong-instanciation.cc,
* doc/tutorial/samples/borderthickness.tex,
* doc/tutorial/samples/borderthickness.cc,
* doc/tutorial/samples/box2d-1.tex,
* doc/tutorial/samples/box2d-1.cc,
* doc/tutorial/samples/box2d-2.tex,
* doc/tutorial/samples/box2d-2.cc,
* doc/tutorial/samples/domain-display-1.tex,
* doc/tutorial/samples/domain-display-1.cc,
* doc/tutorial/samples/domain-display-out-1.tex,
* doc/tutorial/samples/domain-display-out-1.cc,
* doc/tutorial/samples/dpoint-1.tex,
* doc/tutorial/samples/dpoint-1.cc,
* doc/tutorial/samples/estim-sites.tex,
* doc/tutorial/samples/estim-sites.cc,
* doc/tutorial/samples/extension-ignore.tex,
* doc/tutorial/samples/extension-ignore.cc,
* doc/tutorial/samples/extension-ignore2.tex,
* doc/tutorial/samples/extension-ignore2.cc,
* doc/tutorial/samples/fill-call-1.tex,
* doc/tutorial/samples/fill-call-1.cc,
* doc/tutorial/samples/fill-part-1.tex,
* doc/tutorial/samples/fill-part-1.cc,
* doc/tutorial/samples/fill-part-2.tex,
* doc/tutorial/samples/fill-part-2.cc,
* doc/tutorial/samples/fill-part-3.tex,
* doc/tutorial/samples/fill-part-3.cc,
* doc/tutorial/samples/fill.tex,
* doc/tutorial/samples/fill.cc,
* doc/tutorial/samples/forall-piter-1.tex,
* doc/tutorial/samples/forall-piter-1.cc,
* doc/tutorial/samples/fun-p2b-1.tex,
* doc/tutorial/samples/fun-p2b-1.cc,
* doc/tutorial/samples/fun-p2v-1.tex,
* doc/tutorial/samples/fun-p2v-1.cc,
* doc/tutorial/samples/graph-add-edges.tex,
* doc/tutorial/samples/graph-add-edges.cc,
* doc/tutorial/samples/graph-add-vertex.tex,
* doc/tutorial/samples/graph-add-vertex.cc,
* doc/tutorial/samples/graph-data.tex,
* doc/tutorial/samples/graph-data.cc,
* doc/tutorial/samples/graph-i2v-vertex.tex,
* doc/tutorial/samples/graph-i2v-vertex.cc,
* doc/tutorial/samples/graph-iter-edge-nbh-edge.tex,
* doc/tutorial/samples/graph-iter-edge-nbh-edge.cc,
* doc/tutorial/samples/graph-iter-vertex-nbh-vertex.tex,
* doc/tutorial/samples/graph-iter-vertex-nbh-vertex.cc,
* doc/tutorial/samples/graph-iter-vertex.tex,
* doc/tutorial/samples/graph-iter-vertex.cc,
* doc/tutorial/samples/graph-iter.tex,
* doc/tutorial/samples/graph-iter.cc,
* doc/tutorial/samples/graph-p-vertices.tex,
* doc/tutorial/samples/graph-p-vertices.cc,
* doc/tutorial/samples/ima-has.cc,
* doc/tutorial/samples/ima-load.tex,
* doc/tutorial/samples/ima-load.cc,
* doc/tutorial/samples/ima-save.tex,
* doc/tutorial/samples/ima-save.cc,
* doc/tutorial/samples/ima-size.tex,
* doc/tutorial/samples/ima-size.cc,
* doc/tutorial/samples/ima2d-1.tex,
* doc/tutorial/samples/ima2d-2.tex,
* doc/tutorial/samples/ima2d-3.tex,
* doc/tutorial/samples/ima2d-4.tex,
* doc/tutorial/samples/ima2d-5.tex,
* doc/tutorial/samples/ima2d-1.cc,
* doc/tutorial/samples/ima2d-2.cc,
* doc/tutorial/samples/ima2d-3.cc,
* doc/tutorial/samples/ima2d-4.cc,
* doc/tutorial/samples/ima2d-5.cc,
* doc/tutorial/samples/ima2d-6-clone.tex,
* doc/tutorial/samples/ima2d-6-clone.cc,
* doc/tutorial/samples/ima2d-7.tex,
* doc/tutorial/samples/ima2d-7.cc,
* doc/tutorial/samples/ima2d-decl-1.tex,
* doc/tutorial/samples/ima2d-decl-1.cc,
* doc/tutorial/samples/ima2d-decl-2-blobs.tex,
* doc/tutorial/samples/ima2d-decl-2-blobs.cc,
* doc/tutorial/samples/ima2d-decl-2.tex,
* doc/tutorial/samples/ima2d-decl-2.cc,
* doc/tutorial/samples/ima2d-display-1.tex,
* doc/tutorial/samples/ima2d-display-1.cc,
* doc/tutorial/samples/ima2d-display-2.tex,
* doc/tutorial/samples/ima2d-display-2.cc,
* doc/tutorial/samples/ima2d-restricted-1.tex,
* doc/tutorial/samples/ima2d-restricted-2.tex,
* doc/tutorial/samples/ima2d-restricted-3.tex,
* doc/tutorial/samples/ima2d-restricted-1.cc,
* doc/tutorial/samples/ima2d-restricted-2.cc,
* doc/tutorial/samples/ima2d-restricted-3.cc,
* doc/tutorial/samples/ima2d-restricted-display-1.tex,
* doc/tutorial/samples/ima2d-restricted-display-1.cc,
* doc/tutorial/samples/ima2d-rot.cc,
* doc/tutorial/samples/labeling-compute-call.tex,
* doc/tutorial/samples/labeling-compute-call.cc,
* doc/tutorial/samples/labeling-compute-result.tex,
* doc/tutorial/samples/labeling-compute-result.cc,
* doc/tutorial/samples/logical-not.tex,
* doc/tutorial/samples/logical-not.cc,
* doc/tutorial/samples/mln_var-1.tex,
* doc/tutorial/samples/mln_var-1.cc,
* doc/tutorial/samples/mln_var-2.tex,
* doc/tutorial/samples/mln_var-2.cc,
* doc/tutorial/samples/mln_var-3.tex,
* doc/tutorial/samples/mln_var-3.cc,
* doc/tutorial/samples/parray-append.tex,
* doc/tutorial/samples/parray-append.cc,
* doc/tutorial/samples/parray-display-1.tex,
* doc/tutorial/samples/parray-display-1.cc,
* doc/tutorial/samples/paste-call-1.tex,
* doc/tutorial/samples/paste-call-1.cc,
* doc/tutorial/samples/paste.tex,
* doc/tutorial/samples/paste.cc,
* doc/tutorial/samples/point-1.tex,
* doc/tutorial/samples/point-1.cc,
* doc/tutorial/samples/predicate-1.tex,
* doc/tutorial/samples/predicate-1.cc,
* doc/tutorial/samples/win-create-1-display.tex,
* doc/tutorial/samples/win-create-1-display.cc,
* doc/tutorial/samples/win-create-1.tex,
* doc/tutorial/samples/win-create-1.cc,
* doc/tutorial/samples/win-create-2.tex,
* doc/tutorial/samples/win-create-2.cc: rename *.tex to *.cc.
* doc/tutorial/tutorial.tex: update.
plop
---
milena/ChangeLog | 190 +++++++++++++++++++
milena/doc/Doxyfile.in | 22 ++-
milena/doc/Makefile.am | 59 ++++---
milena/doc/doc.mk | 7 +
milena/doc/tutorial/Makefile.am | 18 ++
.../graph-output-1.txt} | 0
.../ima2d-3-output.txt} | 0
.../ima2d-display-output-1.txt} | 0
.../ima2d-display-output-2.txt} | 0
milena/doc/tutorial/samples/Makefile.am | 41 ++++
...stanciation.tex => accu-right-instanciation.cc} | 0
...stanciation.tex => accu-wrong-instanciation.cc} | 0
.../tutorial/samples/borderthickness-output.tex | 13 --
milena/doc/tutorial/samples/borderthickness.cc | 18 ++
milena/doc/tutorial/samples/borderthickness.tex | 17 --
.../tutorial/samples/{box2d-1.tex => box2d-1.cc} | 0
.../tutorial/samples/{box2d-2.tex => box2d-2.cc} | 0
.../{domain-display-1.tex => domain-display-1.cc} | 0
...n-display-out-1.tex => domain-display-out-1.cc} | 0
milena/doc/tutorial/samples/dpoint-1-output.tex | 1 -
.../tutorial/samples/{dpoint-1.tex => dpoint-1.cc} | 0
.../samples/{estim-sites.tex => estim-sites.cc} | 0
.../{extension-ignore.tex => extension-ignore.cc} | 0
milena/doc/tutorial/samples/extension-ignore2.tex | 1 -
.../samples/{fill-call-1.tex => fill-call-1.cc} | 0
.../samples/{fill-part-1.tex => fill-part-1.cc} | 0
.../samples/{fill-part-2.tex => fill-part-2.cc} | 0
.../samples/{fill-part-3.tex => fill-part-3.cc} | 0
milena/doc/tutorial/samples/{fill.tex => fill.cc} | 0
.../{forall-piter-1.tex => forall-piter-1.cc} | 0
.../samples/{fun-p2b-1.tex => fun-p2b-1.cc} | 0
.../samples/{fun-p2v-1.tex => fun-p2v-1.cc} | 0
.../{graph-add-edges.tex => graph-add-edges.cc} | 0
.../{graph-add-vertex.tex => graph-add-vertex.cc} | 0
.../samples/{graph-data.tex => graph-data.cc} | 0
.../{graph-i2v-vertex.tex => graph-i2v-vertex.cc} | 0
...ge-nbh-edge.tex => graph-iter-edge-nbh-edge.cc} | 0
...-vertex.tex => graph-iter-vertex-nbh-vertex.cc} | 0
...{graph-iter-vertex.tex => graph-iter-vertex.cc} | 0
.../samples/{graph-iter.tex => graph-iter.cc} | 0
.../{graph-p-vertices.tex => graph-p-vertices.cc} | 0
milena/doc/tutorial/samples/ima-has.cc | 38 ++++
.../tutorial/samples/{ima-load.tex => ima-load.cc} | 0
.../tutorial/samples/{ima-save.tex => ima-save.cc} | 0
milena/doc/tutorial/samples/ima-size-output.tex | 1 -
.../tutorial/samples/{ima-size.tex => ima-size.cc} | 7 +-
milena/doc/tutorial/samples/ima2d-1-output.tex | 2 -
milena/doc/tutorial/samples/ima2d-1.cc | 13 ++
milena/doc/tutorial/samples/ima2d-1.tex | 12 --
.../tutorial/samples/{ima2d-2.tex => ima2d-2.cc} | 0
.../tutorial/samples/{ima2d-3.tex => ima2d-3.cc} | 0
.../tutorial/samples/{ima2d-4.tex => ima2d-4.cc} | 0
.../tutorial/samples/{ima2d-5.tex => ima2d-5.cc} | 0
.../{ima2d-6-clone.tex => ima2d-6-clone.cc} | 0
.../tutorial/samples/{ima2d-7.tex => ima2d-7.cc} | 0
.../samples/{ima2d-decl-1.tex => ima2d-decl-1.cc} | 0
.../tutorial/samples/ima2d-decl-2-blobs-full.cc | 21 ++
.../tutorial/samples/ima2d-decl-2-blobs-output.tex | 7 -
...ma2d-decl-2-blobs.tex => ima2d-decl-2-blobs.cc} | 0
.../samples/{ima2d-decl-2.tex => ima2d-decl-2.cc} | 0
.../{ima2d-display-1.tex => ima2d-display-1.cc} | 0
.../{ima2d-display-2.tex => ima2d-display-2.cc} | 0
...ma2d-restricted-1.tex => ima2d-restricted-1.cc} | 0
...ma2d-restricted-2.tex => ima2d-restricted-2.cc} | 0
...ma2d-restricted-3.tex => ima2d-restricted-3.cc} | 0
...display-1.tex => ima2d-restricted-display-1.cc} | 0
milena/doc/tutorial/samples/ima2d-rot.cc | 42 +++++
...g-compute-call.tex => labeling-compute-call.cc} | 0
.../doc/tutorial/samples/labeling-compute-full.cc | 27 +++
.../samples/labeling-compute-result-output.tex | 3 -
...mpute-result.tex => labeling-compute-result.cc} | 0
milena/doc/tutorial/samples/logical-not-output.tex | 17 --
.../samples/{logical-not.tex => logical-not.cc} | 6 +-
.../samples/{mln_var-1.tex => mln_var-1.cc} | 0
.../samples/{mln_var-2.tex => mln_var-2.cc} | 0
.../samples/{mln_var-3.tex => mln_var-3.cc} | 0
milena/doc/tutorial/samples/out.ppm | Bin 0 -> 145320 bytes
.../{parray-append.tex => parray-append.cc} | 0
.../{parray-display-1.tex => parray-display-1.cc} | 0
.../doc/tutorial/samples/paste-call-1-output.tex | 3 -
.../samples/{paste-call-1.tex => paste-call-1.cc} | 6 +-
.../doc/tutorial/samples/{paste.tex => paste.cc} | 0
milena/doc/tutorial/samples/point-1-output.tex | 2 -
.../tutorial/samples/{point-1.tex => point-1.cc} | 0
.../samples/{predicate-1.tex => predicate-1.cc} | 0
...reate-1-display.tex => win-create-1-display.cc} | 0
.../samples/{win-create-1.tex => win-create-1.cc} | 0
.../samples/{win-create-2.tex => win-create-2.cc} | 0
milena/doc/tutorial/samples/win-create-3.cc | 7 +
milena/doc/tutorial/todoxygen.sh | 35 ++++
milena/doc/tutorial/tutorial.tex | 192 ++++++++++++++++----
milena/mln/core/internal/complex_window_p_base.hh | 2 +-
milena/mln/core/routine/extend.hh | 2 +-
milena/mln/core/site_set/p_complex.hh | 2 +-
milena/mln/debug/graph.hh | 2 +-
milena/mln/debug/println_with_border.hh | 2 +-
milena/mln/fun/x2v/bilinear.hh | 2 +-
milena/mln/fun/x2v/linear.hh | 2 +-
milena/mln/fun/x2v/nneighbor.hh | 2 +-
milena/mln/geom/nsites.hh | 19 +-
milena/mln/topo/n_face.hh | 2 +-
milena/mln/util/internal/graph_nbh_iter.hh | 2 +-
milena/tests/core/site_set/p_complex.cc | 2 +-
milena/tests/morpho/complex_image_wst.cc | 2 +-
104 files changed, 686 insertions(+), 185 deletions(-)
create mode 100644 milena/doc/doc.mk
create mode 100644 milena/doc/tutorial/Makefile.am
rename milena/doc/tutorial/{samples/graph-output-1.tex => outputs/graph-output-1.txt}
(100%)
rename milena/doc/tutorial/{samples/ima2d-3-output.tex => outputs/ima2d-3-output.txt}
(100%)
rename milena/doc/tutorial/{samples/ima2d-display-output-1.tex =>
outputs/ima2d-display-output-1.txt} (100%)
rename milena/doc/tutorial/{samples/ima2d-display-output-2.tex =>
outputs/ima2d-display-output-2.txt} (100%)
create mode 100644 milena/doc/tutorial/samples/Makefile.am
rename milena/doc/tutorial/samples/{accu-right-instanciation.tex =>
accu-right-instanciation.cc} (100%)
rename milena/doc/tutorial/samples/{accu-wrong-instanciation.tex =>
accu-wrong-instanciation.cc} (100%)
delete mode 100644 milena/doc/tutorial/samples/borderthickness-output.tex
create mode 100644 milena/doc/tutorial/samples/borderthickness.cc
delete mode 100644 milena/doc/tutorial/samples/borderthickness.tex
rename milena/doc/tutorial/samples/{box2d-1.tex => box2d-1.cc} (100%)
rename milena/doc/tutorial/samples/{box2d-2.tex => box2d-2.cc} (100%)
rename milena/doc/tutorial/samples/{domain-display-1.tex => domain-display-1.cc}
(100%)
rename milena/doc/tutorial/samples/{domain-display-out-1.tex =>
domain-display-out-1.cc} (100%)
delete mode 100644 milena/doc/tutorial/samples/dpoint-1-output.tex
rename milena/doc/tutorial/samples/{dpoint-1.tex => dpoint-1.cc} (100%)
rename milena/doc/tutorial/samples/{estim-sites.tex => estim-sites.cc} (100%)
rename milena/doc/tutorial/samples/{extension-ignore.tex => extension-ignore.cc}
(100%)
delete mode 100644 milena/doc/tutorial/samples/extension-ignore2.tex
rename milena/doc/tutorial/samples/{fill-call-1.tex => fill-call-1.cc} (100%)
rename milena/doc/tutorial/samples/{fill-part-1.tex => fill-part-1.cc} (100%)
rename milena/doc/tutorial/samples/{fill-part-2.tex => fill-part-2.cc} (100%)
rename milena/doc/tutorial/samples/{fill-part-3.tex => fill-part-3.cc} (100%)
rename milena/doc/tutorial/samples/{fill.tex => fill.cc} (100%)
rename milena/doc/tutorial/samples/{forall-piter-1.tex => forall-piter-1.cc} (100%)
rename milena/doc/tutorial/samples/{fun-p2b-1.tex => fun-p2b-1.cc} (100%)
rename milena/doc/tutorial/samples/{fun-p2v-1.tex => fun-p2v-1.cc} (100%)
rename milena/doc/tutorial/samples/{graph-add-edges.tex => graph-add-edges.cc} (100%)
rename milena/doc/tutorial/samples/{graph-add-vertex.tex => graph-add-vertex.cc}
(100%)
rename milena/doc/tutorial/samples/{graph-data.tex => graph-data.cc} (100%)
rename milena/doc/tutorial/samples/{graph-i2v-vertex.tex => graph-i2v-vertex.cc}
(100%)
rename milena/doc/tutorial/samples/{graph-iter-edge-nbh-edge.tex =>
graph-iter-edge-nbh-edge.cc} (100%)
rename milena/doc/tutorial/samples/{graph-iter-vertex-nbh-vertex.tex =>
graph-iter-vertex-nbh-vertex.cc} (100%)
rename milena/doc/tutorial/samples/{graph-iter-vertex.tex => graph-iter-vertex.cc}
(100%)
rename milena/doc/tutorial/samples/{graph-iter.tex => graph-iter.cc} (100%)
rename milena/doc/tutorial/samples/{graph-p-vertices.tex => graph-p-vertices.cc}
(100%)
create mode 100644 milena/doc/tutorial/samples/ima-has.cc
rename milena/doc/tutorial/samples/{ima-load.tex => ima-load.cc} (100%)
rename milena/doc/tutorial/samples/{ima-save.tex => ima-save.cc} (100%)
delete mode 100644 milena/doc/tutorial/samples/ima-size-output.tex
rename milena/doc/tutorial/samples/{ima-size.tex => ima-size.cc} (52%)
delete mode 100644 milena/doc/tutorial/samples/ima2d-1-output.tex
create mode 100644 milena/doc/tutorial/samples/ima2d-1.cc
delete mode 100644 milena/doc/tutorial/samples/ima2d-1.tex
rename milena/doc/tutorial/samples/{ima2d-2.tex => ima2d-2.cc} (100%)
rename milena/doc/tutorial/samples/{ima2d-3.tex => ima2d-3.cc} (100%)
rename milena/doc/tutorial/samples/{ima2d-4.tex => ima2d-4.cc} (100%)
rename milena/doc/tutorial/samples/{ima2d-5.tex => ima2d-5.cc} (100%)
rename milena/doc/tutorial/samples/{ima2d-6-clone.tex => ima2d-6-clone.cc} (100%)
rename milena/doc/tutorial/samples/{ima2d-7.tex => ima2d-7.cc} (100%)
rename milena/doc/tutorial/samples/{ima2d-decl-1.tex => ima2d-decl-1.cc} (100%)
create mode 100644 milena/doc/tutorial/samples/ima2d-decl-2-blobs-full.cc
delete mode 100644 milena/doc/tutorial/samples/ima2d-decl-2-blobs-output.tex
rename milena/doc/tutorial/samples/{ima2d-decl-2-blobs.tex => ima2d-decl-2-blobs.cc}
(100%)
rename milena/doc/tutorial/samples/{ima2d-decl-2.tex => ima2d-decl-2.cc} (100%)
rename milena/doc/tutorial/samples/{ima2d-display-1.tex => ima2d-display-1.cc} (100%)
rename milena/doc/tutorial/samples/{ima2d-display-2.tex => ima2d-display-2.cc} (100%)
rename milena/doc/tutorial/samples/{ima2d-restricted-1.tex => ima2d-restricted-1.cc}
(100%)
rename milena/doc/tutorial/samples/{ima2d-restricted-2.tex => ima2d-restricted-2.cc}
(100%)
rename milena/doc/tutorial/samples/{ima2d-restricted-3.tex => ima2d-restricted-3.cc}
(100%)
rename milena/doc/tutorial/samples/{ima2d-restricted-display-1.tex =>
ima2d-restricted-display-1.cc} (100%)
create mode 100644 milena/doc/tutorial/samples/ima2d-rot.cc
rename milena/doc/tutorial/samples/{labeling-compute-call.tex =>
labeling-compute-call.cc} (100%)
create mode 100644 milena/doc/tutorial/samples/labeling-compute-full.cc
delete mode 100644 milena/doc/tutorial/samples/labeling-compute-result-output.tex
rename milena/doc/tutorial/samples/{labeling-compute-result.tex =>
labeling-compute-result.cc} (100%)
delete mode 100644 milena/doc/tutorial/samples/logical-not-output.tex
rename milena/doc/tutorial/samples/{logical-not.tex => logical-not.cc} (77%)
rename milena/doc/tutorial/samples/{mln_var-1.tex => mln_var-1.cc} (100%)
rename milena/doc/tutorial/samples/{mln_var-2.tex => mln_var-2.cc} (100%)
rename milena/doc/tutorial/samples/{mln_var-3.tex => mln_var-3.cc} (100%)
create mode 100644 milena/doc/tutorial/samples/out.ppm
rename milena/doc/tutorial/samples/{parray-append.tex => parray-append.cc} (100%)
rename milena/doc/tutorial/samples/{parray-display-1.tex => parray-display-1.cc}
(100%)
delete mode 100644 milena/doc/tutorial/samples/paste-call-1-output.tex
rename milena/doc/tutorial/samples/{paste-call-1.tex => paste-call-1.cc} (67%)
rename milena/doc/tutorial/samples/{paste.tex => paste.cc} (100%)
delete mode 100644 milena/doc/tutorial/samples/point-1-output.tex
rename milena/doc/tutorial/samples/{point-1.tex => point-1.cc} (100%)
rename milena/doc/tutorial/samples/{predicate-1.tex => predicate-1.cc} (100%)
rename milena/doc/tutorial/samples/{win-create-1-display.tex =>
win-create-1-display.cc} (100%)
rename milena/doc/tutorial/samples/{win-create-1.tex => win-create-1.cc} (100%)
rename milena/doc/tutorial/samples/{win-create-2.tex => win-create-2.cc} (100%)
create mode 100644 milena/doc/tutorial/samples/win-create-3.cc
create mode 100755 milena/doc/tutorial/todoxygen.sh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index f58f2a6..7b16037 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,193 @@
+2008-11-12 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Update tutorial.
+
+ * doc/Doxyfile.in: Add new example/include paths.
+
+ * doc/tutorial/Makefile.am,
+ * doc/Makefile.am: Add a new target for the tutorial.
+ Rename target "internal" to "complete.
+
+ * doc/tutorial/todoxygen.sh: script to convert .tex files to .html
+ files. It uses Hevea.
+
+ * doc/tutorial/samples/borderthickness.cc,
+ * doc/tutorial/samples/extension-ignore2.cc,
+ * doc/tutorial/samples/ima-size.cc,
+ * doc/tutorial/samples/ima2d-1.cc,
+ * doc/tutorial/samples/ima2d-decl-2-blobs-full.cc,
+ * doc/tutorial/samples/ima2d-rot.cc,
+ * doc/tutorial/samples/labeling-compute-full.cc,
+ * doc/tutorial/samples/logical-not.cc,
+ * doc/tutorial/samples/paste-call-1.cc,
+ * doc/tutorial/samples/plop.ppm,
+ * doc/tutorial/samples/win-create-3.cc: Fix sample code.
+
+ * doc/tutorial/samples/Makefile.am: add new target for sample
+ programs.
+
+ * doc/tutorial/tutorial.tex: Include images.
+
+ * mln/core/internal/complex_window_p_base.hh,
+ * mln/core/routine/extend.hh,
+ * mln/core/site_set/p_complex.hh,
+ * mln/debug/graph.hh,
+ * mln/debug/println_with_border.hh,
+ * mln/fun/x2v/bilinear.hh,
+ * mln/fun/x2v/linear.hh,
+ * mln/fun/x2v/nneighbor.hh,
+ * mln/geom/nsites.hh,
+ * mln/topo/n_face.hh,
+ * mln/util/internal/graph_nbh_iter.hh,
+ * tests/core/site_set/p_complex.cc,
+ * tests/morpho/complex_image_wst.cc: Fix doxygen warnings.
+
+ * doc/doc.mk: Add shared variables for doc generation.
+
+ * doc/tutorial/samples/borderthickness-output.tex,
+ * doc/tutorial/samples/dpoint-1-output.tex,
+ * doc/tutorial/samples/graph-output-1.tex,
+ * doc/tutorial/samples/ima-size-output.tex,
+ * doc/tutorial/samples/ima2d-1-output.tex,
+ * doc/tutorial/samples/ima2d-3-output.tex,
+ * doc/tutorial/samples/ima2d-decl-2-blobs-output.tex,
+ * doc/tutorial/samples/ima2d-display-output-1.tex,
+ * doc/tutorial/samples/ima2d-display-output-2.tex,
+ * doc/tutorial/samples/labeling-compute-result-output.tex,
+ * doc/tutorial/samples/logical-not-output.tex,
+ * doc/tutorial/samples/paste-call-1-output.tex,
+ * doc/tutorial/samples/point-1-output.tex: removed since they will be
+ generated.
+
+ * doc/tutorial/samples/accu-right-instanciation.tex,
+ * doc/tutorial/samples/accu-right-instanciation.cc,
+ * doc/tutorial/samples/accu-wrong-instanciation.tex,
+ * doc/tutorial/samples/accu-wrong-instanciation.cc,
+ * doc/tutorial/samples/borderthickness.tex,
+ * doc/tutorial/samples/borderthickness.cc,
+ * doc/tutorial/samples/box2d-1.tex,
+ * doc/tutorial/samples/box2d-1.cc,
+ * doc/tutorial/samples/box2d-2.tex,
+ * doc/tutorial/samples/box2d-2.cc,
+ * doc/tutorial/samples/domain-display-1.tex,
+ * doc/tutorial/samples/domain-display-1.cc,
+ * doc/tutorial/samples/domain-display-out-1.tex,
+ * doc/tutorial/samples/domain-display-out-1.cc,
+ * doc/tutorial/samples/dpoint-1.tex,
+ * doc/tutorial/samples/dpoint-1.cc,
+ * doc/tutorial/samples/estim-sites.tex,
+ * doc/tutorial/samples/estim-sites.cc,
+ * doc/tutorial/samples/extension-ignore.tex,
+ * doc/tutorial/samples/extension-ignore.cc,
+ * doc/tutorial/samples/extension-ignore2.tex,
+ * doc/tutorial/samples/extension-ignore2.cc,
+ * doc/tutorial/samples/fill-call-1.tex,
+ * doc/tutorial/samples/fill-call-1.cc,
+ * doc/tutorial/samples/fill-part-1.tex,
+ * doc/tutorial/samples/fill-part-1.cc,
+ * doc/tutorial/samples/fill-part-2.tex,
+ * doc/tutorial/samples/fill-part-2.cc,
+ * doc/tutorial/samples/fill-part-3.tex,
+ * doc/tutorial/samples/fill-part-3.cc,
+ * doc/tutorial/samples/fill.tex,
+ * doc/tutorial/samples/fill.cc,
+ * doc/tutorial/samples/forall-piter-1.tex,
+ * doc/tutorial/samples/forall-piter-1.cc,
+ * doc/tutorial/samples/fun-p2b-1.tex,
+ * doc/tutorial/samples/fun-p2b-1.cc,
+ * doc/tutorial/samples/fun-p2v-1.tex,
+ * doc/tutorial/samples/fun-p2v-1.cc,
+ * doc/tutorial/samples/graph-add-edges.tex,
+ * doc/tutorial/samples/graph-add-edges.cc,
+ * doc/tutorial/samples/graph-add-vertex.tex,
+ * doc/tutorial/samples/graph-add-vertex.cc,
+ * doc/tutorial/samples/graph-data.tex,
+ * doc/tutorial/samples/graph-data.cc,
+ * doc/tutorial/samples/graph-i2v-vertex.tex,
+ * doc/tutorial/samples/graph-i2v-vertex.cc,
+ * doc/tutorial/samples/graph-iter-edge-nbh-edge.tex,
+ * doc/tutorial/samples/graph-iter-edge-nbh-edge.cc,
+ * doc/tutorial/samples/graph-iter-vertex-nbh-vertex.tex,
+ * doc/tutorial/samples/graph-iter-vertex-nbh-vertex.cc,
+ * doc/tutorial/samples/graph-iter-vertex.tex,
+ * doc/tutorial/samples/graph-iter-vertex.cc,
+ * doc/tutorial/samples/graph-iter.tex,
+ * doc/tutorial/samples/graph-iter.cc,
+ * doc/tutorial/samples/graph-p-vertices.tex,
+ * doc/tutorial/samples/graph-p-vertices.cc,
+ * doc/tutorial/samples/ima-has.cc,
+ * doc/tutorial/samples/ima-load.tex,
+ * doc/tutorial/samples/ima-load.cc,
+ * doc/tutorial/samples/ima-save.tex,
+ * doc/tutorial/samples/ima-save.cc,
+ * doc/tutorial/samples/ima-size.tex,
+ * doc/tutorial/samples/ima-size.cc,
+ * doc/tutorial/samples/ima2d-1.tex,
+ * doc/tutorial/samples/ima2d-2.tex,
+ * doc/tutorial/samples/ima2d-3.tex,
+ * doc/tutorial/samples/ima2d-4.tex,
+ * doc/tutorial/samples/ima2d-5.tex,
+ * doc/tutorial/samples/ima2d-1.cc,
+ * doc/tutorial/samples/ima2d-2.cc,
+ * doc/tutorial/samples/ima2d-3.cc,
+ * doc/tutorial/samples/ima2d-4.cc,
+ * doc/tutorial/samples/ima2d-5.cc,
+ * doc/tutorial/samples/ima2d-6-clone.tex,
+ * doc/tutorial/samples/ima2d-6-clone.cc,
+ * doc/tutorial/samples/ima2d-7.tex,
+ * doc/tutorial/samples/ima2d-7.cc,
+ * doc/tutorial/samples/ima2d-decl-1.tex,
+ * doc/tutorial/samples/ima2d-decl-1.cc,
+ * doc/tutorial/samples/ima2d-decl-2-blobs.tex,
+ * doc/tutorial/samples/ima2d-decl-2-blobs.cc,
+ * doc/tutorial/samples/ima2d-decl-2.tex,
+ * doc/tutorial/samples/ima2d-decl-2.cc,
+ * doc/tutorial/samples/ima2d-display-1.tex,
+ * doc/tutorial/samples/ima2d-display-1.cc,
+ * doc/tutorial/samples/ima2d-display-2.tex,
+ * doc/tutorial/samples/ima2d-display-2.cc,
+ * doc/tutorial/samples/ima2d-restricted-1.tex,
+ * doc/tutorial/samples/ima2d-restricted-2.tex,
+ * doc/tutorial/samples/ima2d-restricted-3.tex,
+ * doc/tutorial/samples/ima2d-restricted-1.cc,
+ * doc/tutorial/samples/ima2d-restricted-2.cc,
+ * doc/tutorial/samples/ima2d-restricted-3.cc,
+ * doc/tutorial/samples/ima2d-restricted-display-1.tex,
+ * doc/tutorial/samples/ima2d-restricted-display-1.cc,
+ * doc/tutorial/samples/ima2d-rot.cc,
+ * doc/tutorial/samples/labeling-compute-call.tex,
+ * doc/tutorial/samples/labeling-compute-call.cc,
+ * doc/tutorial/samples/labeling-compute-result.tex,
+ * doc/tutorial/samples/labeling-compute-result.cc,
+ * doc/tutorial/samples/logical-not.tex,
+ * doc/tutorial/samples/logical-not.cc,
+ * doc/tutorial/samples/mln_var-1.tex,
+ * doc/tutorial/samples/mln_var-1.cc,
+ * doc/tutorial/samples/mln_var-2.tex,
+ * doc/tutorial/samples/mln_var-2.cc,
+ * doc/tutorial/samples/mln_var-3.tex,
+ * doc/tutorial/samples/mln_var-3.cc,
+ * doc/tutorial/samples/parray-append.tex,
+ * doc/tutorial/samples/parray-append.cc,
+ * doc/tutorial/samples/parray-display-1.tex,
+ * doc/tutorial/samples/parray-display-1.cc,
+ * doc/tutorial/samples/paste-call-1.tex,
+ * doc/tutorial/samples/paste-call-1.cc,
+ * doc/tutorial/samples/paste.tex,
+ * doc/tutorial/samples/paste.cc,
+ * doc/tutorial/samples/point-1.tex,
+ * doc/tutorial/samples/point-1.cc,
+ * doc/tutorial/samples/predicate-1.tex,
+ * doc/tutorial/samples/predicate-1.cc,
+ * doc/tutorial/samples/win-create-1-display.tex,
+ * doc/tutorial/samples/win-create-1-display.cc,
+ * doc/tutorial/samples/win-create-1.tex,
+ * doc/tutorial/samples/win-create-1.cc,
+ * doc/tutorial/samples/win-create-2.tex,
+ * doc/tutorial/samples/win-create-2.cc: rename *.tex to *.cc.
+
+ * doc/tutorial/tutorial.tex: update.
+
2008-11-06 Guillaume Lazzara <z(a)lrde.epita.fr>
Fix wrong includes and missing namespaces.
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index b583d66..144d23a 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
PROJECT_NAME = "Milena (@PACKAGE_NAME@)"
PROJECT_NUMBER = "@PACKAGE_VERSION@ @ID@"
-OUTPUT_DIRECTORY = ./internal/
+OUTPUT_DIRECTORY = ./complete/
CREATE_SUBDIRS = YES
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
@@ -72,22 +72,26 @@ WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
-INPUT = @top_srcdir@/milena \
+INPUT = @top_srcdir@/milena \
@top_builddir@/milena
-FILE_PATTERNS = *.cc \
- *.hh \
- *.hxx \
+FILE_PATTERNS = *.cc \
+ *.hh \
+ *.hxx \
*.hcc
RECURSIVE = YES
-EXCLUDE = @top_srcdir@/milena/sandbox \
- @top_srcdir@/milena/mln/core/concept/proxy.hxx
+EXCLUDE = @top_srcdir@/milena/sandbox \
+ @top_srcdir@/milena/mln/core/concept/proxy.hxx \
+ @top_srcdir@/milena/doc/tutorial/samples
EXCLUDE_SYMLINKS = YES
EXCLUDE_PATTERNS = *spe.hh
EXCLUDE_SYMBOLS =
-EXAMPLE_PATH =
+EXAMPLE_PATH = @top_srcdir@/milena/doc/tutorial/samples \
+ @top_builddir@/milena/doc/tutorial/outputs \
+ @top_srcdir@/milena/doc/tutorial/outputs
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
+IMAGE_PATH = @top_srcdir@/milena/doc/tutorial/figures \
+ @top_builddir@/milena/doc/tutorial/figures
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index b49d7dc..039f5dc 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -1,23 +1,38 @@
# FIXME: To be overhauled! (See ticket #134).
-# FIXME: Rename `internal' as `all' or `complete'.
-DOXYGEN = doxygen
+include $(top_srcdir)/milena/doc/doc.mk
+
+SUBDIRS = tutorial
-.PHONY: doc user-doc internal-doc html html_user
+DOXYGEN = doxygen
-doc: html
+.PHONY: doc user-doc complete-doc html_complete html_user
-internal-doc: html
+doc: complete-doc
-user-doc: html_user
+complete-doc: html_complete
+user-doc: html_user tutorial
-html-local: Doxyfile
- $(DOXYGEN) Doxyfile_internal
+html_complete: tuto_html figures Doxyfile
+ $(DOXYGEN) Doxyfile_complete
-html_user: Doxyfile
+html_user: tuto_html figures Doxyfile
$(DOXYGEN) Doxyfile_user
+figures: all
+ @failcom='exit 1'; \
+ list='${wildcard $(FIGURES_DIR)/*.p*m}'; for img in $$list; do \
+ echo "Converting $$img to png"; \
+ convert $$img $(FIGURES_DIR)/`basename $$img .ppm`.png \
+ || eval $$failcom; \
+ done;
+
+tuto_html:
+ $(MAKE) -C tutorial tuto_html
+
+tuto: all
+ $(MAKE) -C tutorial tuto
edit = sed -e "s|@ID@|$$Id|" \
-e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
@@ -26,28 +41,28 @@ edit = sed -e "s|@ID@|$$Id|" \
-e 's,@top_srcdir\@,$(top_srcdir),g'
# FIXME: This is not good. We should set these parameters for both
-# documentation (internal and user) using @VARIABLES@. Don't generate
-# Doxyfile_user from Doxyfile_internal! Both should be a product
+# documentation (complete and user) using @VARIABLES@. Don't generate
+# Doxyfile_user from Doxyfile_complete! Both should be a product
# derived from a single source, Doxyfile.in.
-edit_user = sed -e 's,OUTPUT_DIRECTORY = ./internal/,OUTPUT_DIRECTORY =
./user/,g' \
+edit_user = sed -e 's,OUTPUT_DIRECTORY = ./complete/,OUTPUT_DIRECTORY =
./user/,g' \
-e 's,EXTRACT_ALL = YES,EXTRACT_ALL = NO,g' \
-e 's,EXTRACT_PRIVATE = YES,EXTRACT_PRIVATE = NO,g' \
-e 's,EXTRACT_STATIC = YES,EXTRACT_STATIC = NO,g' \
-e 's,EXTRACT_LOCAL_CLASSES = YES,EXTRACT_LOCAL_CLASSES = NO,g' \
- -e 's,HIDE_UNDOC_MEMBERS = NO,HIDE_UNDOC_MEMBERS = YES,g' \
- -e 's,HIDE_UNDOC_CLASSES = NO,HIDE_UNDOC_CLASSES = YES,g' \
- -e 's,HIDE_FRIEND_COMPOUNDS = NO,HIDE_FRIEND_COMPOUNDS = YES,g' \
- -e 's,HIDE_IN_BODY_DOCS = NO,HIDE_IN_BODY_DOCS = YES,g' \
+ -e 's,HIDE_UNDOC_MEMBERS = NO,HIDE_UNDOC_MEMBERS = YES,g' \
+ -e 's,HIDE_UNDOC_CLASSES = NO,HIDE_UNDOC_CLASSES = YES,g' \
+ -e 's,HIDE_FRIEND_COMPOUNDS = NO,HIDE_FRIEND_COMPOUNDS = YES,g' \
+ -e 's,HIDE_IN_BODY_DOCS = NO,HIDE_IN_BODY_DOCS = YES,g' \
-e 's,INTERNAL_DOCS = YES,INTERNAL_DOCS = NO,g' \
-e 's,GENERATE_TODOLIST = YES,GENERATE_TODOLIST = NO,g' \
- -e 's,PROJECT_NUMBER = \",PROJECT_NUMBER = \"User
documentation ,g' \
- -e 's,EXCLUDE_SYMBOLS =,EXCLUDE_SYMBOLS = *::internal*,g'
+ -e 's,PROJECT_NUMBER = \",PROJECT_NUMBER = \"User
documentation ,g' \
+ -e 's,EXCLUDE_SYMBOLS =,EXCLUDE_SYMBOLS = *::internal*,g'
EXTRA_DIST = Doxyfile.in
-CLEANFILES = Doxyfile_internal \
+CLEANFILES = Doxyfile_complete \
Doxyfile_user
# Sed is used to generate Doxyfile from Doxyfile.in instead of
@@ -56,9 +71,9 @@ CLEANFILES = Doxyfile_internal \
# sed instead of configure saves us a lot of time.
Doxyfile: $(top_srcdir)/milena/ChangeLog $(srcdir)/Doxyfile.in
Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog`; \
- $(edit) $(srcdir)/Doxyfile.in >Doxyfile_internal && \
- $(edit_user) Doxyfile_internal >Doxyfile_user
+ $(edit) $(srcdir)/Doxyfile.in >Doxyfile_complete && \
+ $(edit_user) Doxyfile_complete >Doxyfile_user
clean-local:
- rm -rf internal user
+ rm -rf complete user
diff --git a/milena/doc/doc.mk b/milena/doc/doc.mk
new file mode 100644
index 0000000..d911d86
--- /dev/null
+++ b/milena/doc/doc.mk
@@ -0,0 +1,7 @@
+## FIXME: Revamp (see Olena 0.11's test suite). -*- Automake -*-
+
+include $(top_srcdir)/milena/tests/tests.mk
+
+OUTPUTS_DIR = $(top_builddir)/milena/doc/tutorial/outputs
+FIGURES_DIR = $(top_builddir)/milena/doc/tutorial/figures
+
diff --git a/milena/doc/tutorial/Makefile.am b/milena/doc/tutorial/Makefile.am
new file mode 100644
index 0000000..0b70c3e
--- /dev/null
+++ b/milena/doc/tutorial/Makefile.am
@@ -0,0 +1,18 @@
+SUBDIRS = samples
+
+.PHONY: tuto
+
+TUTO_DIR = "milena/doc/tutorial"
+TEXINPUTS = $(top_srcdir)/$(TUTO_DIR):$(top_builddir)/$(TUTO_DIR):
+
+tuto:
+ TEXINPUTS=$(TEXINPUTS) pdflatex $(top_srcdir)/$(TUTO_DIR)/tutorial.tex
+
+tuto_html:
+ chmod u+x $(top_srcdir)/$(TUTO_DIR)/todoxygen.sh
+ $(top_srcdir)/$(TUTO_DIR)/todoxygen.sh $(top_srcdir)/$(TUTO_DIR)/tutorial.tex
$(top_builddir)/$(TUTO_DIR)
+
+clean-local:
+ rm -f *.aux *.toc *.log *.bbl *blg *.lot *.out *~
+ rm -f tutorial.pdf
+ rm *.haux *.hh *.html *.htoc
diff --git a/milena/doc/tutorial/samples/graph-output-1.tex
b/milena/doc/tutorial/outputs/graph-output-1.txt
similarity index 100%
rename from milena/doc/tutorial/samples/graph-output-1.tex
rename to milena/doc/tutorial/outputs/graph-output-1.txt
diff --git a/milena/doc/tutorial/samples/ima2d-3-output.tex
b/milena/doc/tutorial/outputs/ima2d-3-output.txt
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-3-output.tex
rename to milena/doc/tutorial/outputs/ima2d-3-output.txt
diff --git a/milena/doc/tutorial/samples/ima2d-display-output-1.tex
b/milena/doc/tutorial/outputs/ima2d-display-output-1.txt
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-display-output-1.tex
rename to milena/doc/tutorial/outputs/ima2d-display-output-1.txt
diff --git a/milena/doc/tutorial/samples/ima2d-display-output-2.tex
b/milena/doc/tutorial/outputs/ima2d-display-output-2.txt
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-display-output-2.tex
rename to milena/doc/tutorial/outputs/ima2d-display-output-2.txt
diff --git a/milena/doc/tutorial/samples/Makefile.am
b/milena/doc/tutorial/samples/Makefile.am
new file mode 100644
index 0000000..dcbf13c
--- /dev/null
+++ b/milena/doc/tutorial/samples/Makefile.am
@@ -0,0 +1,41 @@
+## Process this file through Automake to create Makefile.in -*- Makefile -*-
+
+include $(top_srcdir)/milena/doc/doc.mk
+
+bin_PROGRAMS = \
+ borderthickness \
+ dpoint-1 \
+ ima-has \
+ ima-size \
+ ima2d-1 \
+ ima2d-decl-2-blobs-full \
+ ima2d-rot \
+ labeling-compute-full \
+ logical-not \
+ paste-call-1 \
+ point-1
+
+borderthickness_SOURCES = borderthickness.cc
+dpoint_1_SOURCES = dpoint-1.cc
+ima_has_SOURCES = ima-has.cc
+ima_size_SOURCES = ima-size.cc
+ima2d_1_SOURCES = ima2d-1.cc
+ima2d_decl_2_blobs_full_SOURCES = ima2d-decl-2-blobs-full.cc
+ima2d_rot_SOURCES = ima2d-rot.cc
+labeling_compute_full_SOURCES = labeling-compute-full.cc
+logical_not_SOURCES = logical-not.cc
+paste_call_1_SOURCES = paste-call-1.cc
+point_1_SOURCES = point-1.cc
+
+all:
+ mkdir -p $(OUTPUTS_DIR)
+ mkdir -p $(FIGURES_DIR)
+ @failcom='exit 1'; \
+ list='$(bin_PROGRAMS)'; for bin in $$list; do \
+ echo "Running $$bin"; \
+ ./$$bin > $(OUTPUTS_DIR)/$$bin.txt || eval $$failcom; \
+ done;
+
+clean-local:
+ rm -Rf $(OUTPUTS_DIR) $(FIGURES_DIR)
+
diff --git a/milena/doc/tutorial/samples/accu-right-instanciation.tex
b/milena/doc/tutorial/samples/accu-right-instanciation.cc
similarity index 100%
rename from milena/doc/tutorial/samples/accu-right-instanciation.tex
rename to milena/doc/tutorial/samples/accu-right-instanciation.cc
diff --git a/milena/doc/tutorial/samples/accu-wrong-instanciation.tex
b/milena/doc/tutorial/samples/accu-wrong-instanciation.cc
similarity index 100%
rename from milena/doc/tutorial/samples/accu-wrong-instanciation.tex
rename to milena/doc/tutorial/samples/accu-wrong-instanciation.cc
diff --git a/milena/doc/tutorial/samples/borderthickness-output.tex
b/milena/doc/tutorial/samples/borderthickness-output.tex
deleted file mode 100644
index 201aedb..0000000
--- a/milena/doc/tutorial/samples/borderthickness-output.tex
+++ /dev/null
@@ -1,13 +0,0 @@
-- - - - - - - -
-- - - - - - - -
-- - - - - - - -
-- - - - | - - -
-- - - | - - - -
-- - - - - - - -
-- - - - - - - -
-- - - - - - - -
-
-===========
-
-- |
-| -
diff --git a/milena/doc/tutorial/samples/borderthickness.cc
b/milena/doc/tutorial/samples/borderthickness.cc
new file mode 100644
index 0000000..1e59076
--- /dev/null
+++ b/milena/doc/tutorial/samples/borderthickness.cc
@@ -0,0 +1,18 @@
+#include <mln/essential/2d.hh>
+int main()
+{
+ using namespace mln;
+
+ bool vals[3][3] = { { 0, 1, 1 },
+ { 1, 0, 0 },
+ { 1, 1, 0 } };
+
+ image2d<bool> ima_def = make::image(vals);
+ debug::println_with_border(ima_def);
+
+ std::cout << "===========" << std::endl << std::endl;
+
+ border::thickness = 0;
+ image2d<bool> ima_bt0 = make::image(vals);
+ debug::println_with_border(ima_bt0);
+}
diff --git a/milena/doc/tutorial/samples/borderthickness.tex
b/milena/doc/tutorial/samples/borderthickness.tex
deleted file mode 100644
index a059ba3..0000000
--- a/milena/doc/tutorial/samples/borderthickness.tex
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <mln/core/image/image2d.hh>
-#include <mln/debug/println_with_border.hh>
-int main()
-{
- using namespace mln;
-
- bool vals[2][2] = { {0, 1},
- {1, 0} };
- image2d<bool> ima_def = make::image2d(vals);
- debug::println_with_border(ima_def);
-
- std::cout << "===========" << std::endl << std::endl;
-
- border::thickness = 0;
- image2d<bool> ima_bt0 = make::image2d(vals);
- debug::println_with_border(ima_bt0);
-}
diff --git a/milena/doc/tutorial/samples/box2d-1.tex
b/milena/doc/tutorial/samples/box2d-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/box2d-1.tex
rename to milena/doc/tutorial/samples/box2d-1.cc
diff --git a/milena/doc/tutorial/samples/box2d-2.tex
b/milena/doc/tutorial/samples/box2d-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/box2d-2.tex
rename to milena/doc/tutorial/samples/box2d-2.cc
diff --git a/milena/doc/tutorial/samples/domain-display-1.tex
b/milena/doc/tutorial/samples/domain-display-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/domain-display-1.tex
rename to milena/doc/tutorial/samples/domain-display-1.cc
diff --git a/milena/doc/tutorial/samples/domain-display-out-1.tex
b/milena/doc/tutorial/samples/domain-display-out-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/domain-display-out-1.tex
rename to milena/doc/tutorial/samples/domain-display-out-1.cc
diff --git a/milena/doc/tutorial/samples/dpoint-1-output.tex
b/milena/doc/tutorial/samples/dpoint-1-output.tex
deleted file mode 100644
index 8982f0f..0000000
--- a/milena/doc/tutorial/samples/dpoint-1-output.tex
+++ /dev/null
@@ -1 +0,0 @@
-(0, 1)
diff --git a/milena/doc/tutorial/samples/dpoint-1.tex
b/milena/doc/tutorial/samples/dpoint-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/dpoint-1.tex
rename to milena/doc/tutorial/samples/dpoint-1.cc
diff --git a/milena/doc/tutorial/samples/estim-sites.tex
b/milena/doc/tutorial/samples/estim-sites.cc
similarity index 100%
rename from milena/doc/tutorial/samples/estim-sites.tex
rename to milena/doc/tutorial/samples/estim-sites.cc
diff --git a/milena/doc/tutorial/samples/extension-ignore.tex
b/milena/doc/tutorial/samples/extension-ignore.cc
similarity index 100%
rename from milena/doc/tutorial/samples/extension-ignore.tex
rename to milena/doc/tutorial/samples/extension-ignore.cc
diff --git a/milena/doc/tutorial/samples/extension-ignore2.tex
b/milena/doc/tutorial/samples/extension-ignore2.tex
deleted file mode 100644
index 7e7ef54..0000000
--- a/milena/doc/tutorial/samples/extension-ignore2.tex
+++ /dev/null
@@ -1 +0,0 @@
-my_routine(ima.domain());
diff --git a/milena/doc/tutorial/samples/fill-call-1.tex
b/milena/doc/tutorial/samples/fill-call-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fill-call-1.tex
rename to milena/doc/tutorial/samples/fill-call-1.cc
diff --git a/milena/doc/tutorial/samples/fill-part-1.tex
b/milena/doc/tutorial/samples/fill-part-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fill-part-1.tex
rename to milena/doc/tutorial/samples/fill-part-1.cc
diff --git a/milena/doc/tutorial/samples/fill-part-2.tex
b/milena/doc/tutorial/samples/fill-part-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fill-part-2.tex
rename to milena/doc/tutorial/samples/fill-part-2.cc
diff --git a/milena/doc/tutorial/samples/fill-part-3.tex
b/milena/doc/tutorial/samples/fill-part-3.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fill-part-3.tex
rename to milena/doc/tutorial/samples/fill-part-3.cc
diff --git a/milena/doc/tutorial/samples/fill.tex b/milena/doc/tutorial/samples/fill.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fill.tex
rename to milena/doc/tutorial/samples/fill.cc
diff --git a/milena/doc/tutorial/samples/forall-piter-1.tex
b/milena/doc/tutorial/samples/forall-piter-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/forall-piter-1.tex
rename to milena/doc/tutorial/samples/forall-piter-1.cc
diff --git a/milena/doc/tutorial/samples/fun-p2b-1.tex
b/milena/doc/tutorial/samples/fun-p2b-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fun-p2b-1.tex
rename to milena/doc/tutorial/samples/fun-p2b-1.cc
diff --git a/milena/doc/tutorial/samples/fun-p2v-1.tex
b/milena/doc/tutorial/samples/fun-p2v-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fun-p2v-1.tex
rename to milena/doc/tutorial/samples/fun-p2v-1.cc
diff --git a/milena/doc/tutorial/samples/graph-add-edges.tex
b/milena/doc/tutorial/samples/graph-add-edges.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-add-edges.tex
rename to milena/doc/tutorial/samples/graph-add-edges.cc
diff --git a/milena/doc/tutorial/samples/graph-add-vertex.tex
b/milena/doc/tutorial/samples/graph-add-vertex.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-add-vertex.tex
rename to milena/doc/tutorial/samples/graph-add-vertex.cc
diff --git a/milena/doc/tutorial/samples/graph-data.tex
b/milena/doc/tutorial/samples/graph-data.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-data.tex
rename to milena/doc/tutorial/samples/graph-data.cc
diff --git a/milena/doc/tutorial/samples/graph-i2v-vertex.tex
b/milena/doc/tutorial/samples/graph-i2v-vertex.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-i2v-vertex.tex
rename to milena/doc/tutorial/samples/graph-i2v-vertex.cc
diff --git a/milena/doc/tutorial/samples/graph-iter-edge-nbh-edge.tex
b/milena/doc/tutorial/samples/graph-iter-edge-nbh-edge.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-iter-edge-nbh-edge.tex
rename to milena/doc/tutorial/samples/graph-iter-edge-nbh-edge.cc
diff --git a/milena/doc/tutorial/samples/graph-iter-vertex-nbh-vertex.tex
b/milena/doc/tutorial/samples/graph-iter-vertex-nbh-vertex.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-iter-vertex-nbh-vertex.tex
rename to milena/doc/tutorial/samples/graph-iter-vertex-nbh-vertex.cc
diff --git a/milena/doc/tutorial/samples/graph-iter-vertex.tex
b/milena/doc/tutorial/samples/graph-iter-vertex.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-iter-vertex.tex
rename to milena/doc/tutorial/samples/graph-iter-vertex.cc
diff --git a/milena/doc/tutorial/samples/graph-iter.tex
b/milena/doc/tutorial/samples/graph-iter.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-iter.tex
rename to milena/doc/tutorial/samples/graph-iter.cc
diff --git a/milena/doc/tutorial/samples/graph-p-vertices.tex
b/milena/doc/tutorial/samples/graph-p-vertices.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-p-vertices.tex
rename to milena/doc/tutorial/samples/graph-p-vertices.cc
diff --git a/milena/doc/tutorial/samples/ima-has.cc
b/milena/doc/tutorial/samples/ima-has.cc
new file mode 100644
index 0000000..9513541
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima-has.cc
@@ -0,0 +1,38 @@
+#include <mln/essential/2d.hh>
+int main()
+{
+ using namespace mln;
+
+ // Default border size is set to 0.
+
+ // Image defined on a box2d from
+ // (0, 0) to (2, 2)
+ image2d<int> ima1(2, 3);
+
+ std::cout << "ima1.has(0, 0) : "
+ << ima1.has(point2d(0, 0)) << std::endl;
+
+ std::cout << "ima1.has(-3, 0) : "
+ << ima1.has(point2d(-3, 0)) << std::endl;
+
+ std::cout << "ima1.has(2, 5) : "
+ << ima1.has(point2d(2, 5)) << std::endl;
+
+ std::cout << "=========" << std::endl;
+
+ // Set default border size to 0.
+ border::thickness = 0;
+
+ // Image defined on a box2d from
+ // (0, 0) to (2, 2)
+ image2d<int> ima2(2, 3);
+
+ std::cout << "ima2.has(0, 0) : "
+ << ima2.has(point2d(0, 0)) << std::endl;
+
+ std::cout << "ima2.has(-3, 0) : "
+ << ima2.has(point2d(-3, 0)) << std::endl;
+
+ std::cout << "ima2.has(2, 5) : "
+ << ima2.has(point2d(2, 5)) << std::endl;
+}
diff --git a/milena/doc/tutorial/samples/ima-load.tex
b/milena/doc/tutorial/samples/ima-load.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima-load.tex
rename to milena/doc/tutorial/samples/ima-load.cc
diff --git a/milena/doc/tutorial/samples/ima-save.tex
b/milena/doc/tutorial/samples/ima-save.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima-save.tex
rename to milena/doc/tutorial/samples/ima-save.cc
diff --git a/milena/doc/tutorial/samples/ima-size-output.tex
b/milena/doc/tutorial/samples/ima-size-output.tex
deleted file mode 100644
index 6be445f..0000000
--- a/milena/doc/tutorial/samples/ima-size-output.tex
+++ /dev/null
@@ -1 +0,0 @@
-nrows = 10 - ncols = 12
diff --git a/milena/doc/tutorial/samples/ima-size.tex
b/milena/doc/tutorial/samples/ima-size.cc
similarity index 52%
rename from milena/doc/tutorial/samples/ima-size.tex
rename to milena/doc/tutorial/samples/ima-size.cc
index 46d5a08..9fa845d 100644
--- a/milena/doc/tutorial/samples/ima-size.tex
+++ b/milena/doc/tutorial/samples/ima-size.cc
@@ -1,8 +1,9 @@
-#include <core/image/image2d.hh>
-#include <core/site_set/box2d.hh>
+#include <mln/essential/2d.hh>
int main()
{
- mln::image2d<int> ima(box2d(0,0, 10,12));
+ using namespace mln;
+
+ image2d<int> ima(make::box2d(0,0, 10,12));
std::cout << "nrows = " << ima.nrows()
<< " - "
diff --git a/milena/doc/tutorial/samples/ima2d-1-output.tex
b/milena/doc/tutorial/samples/ima2d-1-output.tex
deleted file mode 100644
index e689fa5..0000000
--- a/milena/doc/tutorial/samples/ima2d-1-output.tex
+++ /dev/null
@@ -1,2 +0,0 @@
-b = [(-2,3)...(3,-5)]
-domain = [(-2,3)...(3,-5)]
diff --git a/milena/doc/tutorial/samples/ima2d-1.cc
b/milena/doc/tutorial/samples/ima2d-1.cc
new file mode 100644
index 0000000..bc0da47
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima2d-1.cc
@@ -0,0 +1,13 @@
+#include <mln/essential/2d.hh>
+int main()
+{
+ using namespace mln;
+
+ // Define a box2d from (-2,-3) to (3,5).
+ box2d b = make::box2d(-2,-3, 3,5);
+ // Initialize an image with b as domain.
+ image2d<int> ima(b);
+
+ std::cout << "b = " << b << std::endl;
+ std::cout << "domain = " << ima.domain() << std::endl;
+}
diff --git a/milena/doc/tutorial/samples/ima2d-1.tex
b/milena/doc/tutorial/samples/ima2d-1.tex
deleted file mode 100644
index f792182..0000000
--- a/milena/doc/tutorial/samples/ima2d-1.tex
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <mln/core/alias/box2d.hh>
-#include <mln/core/image/image2d.hh>
-int main()
-{
- // Define a box2d from (-2,3) to (3,-5).
- box2d b(-2,3, 3,-5);
- // Initialize an image with b as domain.
- image2d<int> ima(b);
-
- cout << "b = " << b << std::endl;
- cout << "domain = " << ima.domain() << std::endl;
-}
diff --git a/milena/doc/tutorial/samples/ima2d-2.tex
b/milena/doc/tutorial/samples/ima2d-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-2.tex
rename to milena/doc/tutorial/samples/ima2d-2.cc
diff --git a/milena/doc/tutorial/samples/ima2d-3.tex
b/milena/doc/tutorial/samples/ima2d-3.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-3.tex
rename to milena/doc/tutorial/samples/ima2d-3.cc
diff --git a/milena/doc/tutorial/samples/ima2d-4.tex
b/milena/doc/tutorial/samples/ima2d-4.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-4.tex
rename to milena/doc/tutorial/samples/ima2d-4.cc
diff --git a/milena/doc/tutorial/samples/ima2d-5.tex
b/milena/doc/tutorial/samples/ima2d-5.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-5.tex
rename to milena/doc/tutorial/samples/ima2d-5.cc
diff --git a/milena/doc/tutorial/samples/ima2d-6-clone.tex
b/milena/doc/tutorial/samples/ima2d-6-clone.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-6-clone.tex
rename to milena/doc/tutorial/samples/ima2d-6-clone.cc
diff --git a/milena/doc/tutorial/samples/ima2d-7.tex
b/milena/doc/tutorial/samples/ima2d-7.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-7.tex
rename to milena/doc/tutorial/samples/ima2d-7.cc
diff --git a/milena/doc/tutorial/samples/ima2d-decl-1.tex
b/milena/doc/tutorial/samples/ima2d-decl-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-decl-1.tex
rename to milena/doc/tutorial/samples/ima2d-decl-1.cc
diff --git a/milena/doc/tutorial/samples/ima2d-decl-2-blobs-full.cc
b/milena/doc/tutorial/samples/ima2d-decl-2-blobs-full.cc
new file mode 100644
index 0000000..9728ac7
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima2d-decl-2-blobs-full.cc
@@ -0,0 +1,21 @@
+#include <mln/essential/2d.hh>
+int main()
+{
+ using namespace mln;
+ using value::int_u8;
+
+ bool vals[6][5] = {
+ {0, 1, 1, 0, 0},
+ {0, 1, 1, 0, 0},
+ {0, 0, 0, 0, 0},
+ {1, 1, 0, 1, 0},
+ {1, 0, 1, 1, 1},
+ {1, 0, 0, 0, 0}
+ };
+ image2d<bool> ima = make::image(vals);
+
+ int_u8 nlabels;
+ image2d<int_u8> lbl = labeling::blobs(ima, c4(), nlabels);
+
+ debug::println(lbl);
+}
diff --git a/milena/doc/tutorial/samples/ima2d-decl-2-blobs-output.tex
b/milena/doc/tutorial/samples/ima2d-decl-2-blobs-output.tex
deleted file mode 100644
index 0e08731..0000000
--- a/milena/doc/tutorial/samples/ima2d-decl-2-blobs-output.tex
+++ /dev/null
@@ -1,7 +0,0 @@
-0 1 1 0 0
-0 1 1 0 0
-0 0 0 0 0
-2 2 0 3 0
-2 0 3 3 3
-2 0 0 0 0
-
diff --git a/milena/doc/tutorial/samples/ima2d-decl-2-blobs.tex
b/milena/doc/tutorial/samples/ima2d-decl-2-blobs.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-decl-2-blobs.tex
rename to milena/doc/tutorial/samples/ima2d-decl-2-blobs.cc
diff --git a/milena/doc/tutorial/samples/ima2d-decl-2.tex
b/milena/doc/tutorial/samples/ima2d-decl-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-decl-2.tex
rename to milena/doc/tutorial/samples/ima2d-decl-2.cc
diff --git a/milena/doc/tutorial/samples/ima2d-display-1.tex
b/milena/doc/tutorial/samples/ima2d-display-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-display-1.tex
rename to milena/doc/tutorial/samples/ima2d-display-1.cc
diff --git a/milena/doc/tutorial/samples/ima2d-display-2.tex
b/milena/doc/tutorial/samples/ima2d-display-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-display-2.tex
rename to milena/doc/tutorial/samples/ima2d-display-2.cc
diff --git a/milena/doc/tutorial/samples/ima2d-restricted-1.tex
b/milena/doc/tutorial/samples/ima2d-restricted-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-restricted-1.tex
rename to milena/doc/tutorial/samples/ima2d-restricted-1.cc
diff --git a/milena/doc/tutorial/samples/ima2d-restricted-2.tex
b/milena/doc/tutorial/samples/ima2d-restricted-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-restricted-2.tex
rename to milena/doc/tutorial/samples/ima2d-restricted-2.cc
diff --git a/milena/doc/tutorial/samples/ima2d-restricted-3.tex
b/milena/doc/tutorial/samples/ima2d-restricted-3.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-restricted-3.tex
rename to milena/doc/tutorial/samples/ima2d-restricted-3.cc
diff --git a/milena/doc/tutorial/samples/ima2d-restricted-display-1.tex
b/milena/doc/tutorial/samples/ima2d-restricted-display-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-restricted-display-1.tex
rename to milena/doc/tutorial/samples/ima2d-restricted-display-1.cc
diff --git a/milena/doc/tutorial/samples/ima2d-rot.cc
b/milena/doc/tutorial/samples/ima2d-rot.cc
new file mode 100644
index 0000000..4832045
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima2d-rot.cc
@@ -0,0 +1,42 @@
+#include <mln/essential/2d.hh>
+int main()
+{
+ using namespace mln;
+
+ border::thickness = 30;
+
+ // Declare the image to be rotated.
+ image2d<value::rgb8> ima1_(220, 220);
+ level::fill(ima1_, literal::cyan);
+ border::fill(ima1_, literal::yellow);
+ // Set an infinite extension.
+ mln_VAR(ima1, extend(ima1_, pw::cst(literal::yellow)));
+
+ // Declare the output image.
+ image2d<value::rgb8> ima2(220, 220);
+ level::fill(ima2, literal::cyan);
+ border::fill(ima2, literal::yellow);
+
+ box2d extended_domain= ima1.domain();
+ extended_domain.enlarge(border::thickness);
+
+ // Draw the domain bounding box
+ draw::box(ima1, geom::bbox(ima1_), literal::red);
+ // Save the image, including its border.
+ io::ppm::save(ima1 | extended_domain,
+ "../figures/ima2d-rot-1.ppm");
+
+ // Define and apply a point-wise rotation
+ fun::x2x::rotation<2,float> rot1(0.5, literal::zero);
+ image2d<value::rgb8>::fwd_piter p(ima1.domain());
+ for_all(p)
+ {
+ algebra::vec<2,float> pv = p.to_site().to_vec();
+ algebra::vec<2,float> v = rot1.inv()(pv);
+ ima2(p) = ima1(v);
+ }
+
+ draw::box(ima2, ima2.bbox(), literal::red);
+ io::ppm::save(ima2 | extended_domain,
+ "../figures/ima2d-rot-2.ppm");
+}
diff --git a/milena/doc/tutorial/samples/labeling-compute-call.tex
b/milena/doc/tutorial/samples/labeling-compute-call.cc
similarity index 100%
rename from milena/doc/tutorial/samples/labeling-compute-call.tex
rename to milena/doc/tutorial/samples/labeling-compute-call.cc
diff --git a/milena/doc/tutorial/samples/labeling-compute-full.cc
b/milena/doc/tutorial/samples/labeling-compute-full.cc
new file mode 100644
index 0000000..fa378ca
--- /dev/null
+++ b/milena/doc/tutorial/samples/labeling-compute-full.cc
@@ -0,0 +1,27 @@
+#include <mln/essential/2d.hh>
+int main()
+{
+ using namespace mln;
+ using value::int_u8;
+
+ bool vals[6][5] = {
+ {0, 1, 1, 0, 0},
+ {0, 1, 1, 0, 0},
+ {0, 0, 0, 0, 0},
+ {1, 1, 0, 1, 0},
+ {1, 0, 1, 1, 1},
+ {1, 0, 0, 0, 0}
+ };
+ image2d<bool> ima = make::image(vals);
+
+ int_u8 nlabels;
+ image2d<int_u8> lbl = labeling::blobs(ima, c4(), nlabels);
+
+ util::array<box2d> boxes =
+ labeling::compute(accu::meta::bbox(),
+ lbl,
+ nlabels);
+
+ for (unsigned i = 1; i <= nlabels; ++i)
+ std::cout << boxes[i] << std::endl;
+}
diff --git a/milena/doc/tutorial/samples/labeling-compute-result-output.tex
b/milena/doc/tutorial/samples/labeling-compute-result-output.tex
deleted file mode 100644
index d7fbc06..0000000
--- a/milena/doc/tutorial/samples/labeling-compute-result-output.tex
+++ /dev/null
@@ -1,3 +0,0 @@
-[(1,2)...(2,3)]
-[(4,1)...(6,2)]
-[(4,3)...(5,5)]
diff --git a/milena/doc/tutorial/samples/labeling-compute-result.tex
b/milena/doc/tutorial/samples/labeling-compute-result.cc
similarity index 100%
rename from milena/doc/tutorial/samples/labeling-compute-result.tex
rename to milena/doc/tutorial/samples/labeling-compute-result.cc
diff --git a/milena/doc/tutorial/samples/logical-not-output.tex
b/milena/doc/tutorial/samples/logical-not-output.tex
deleted file mode 100644
index 27c6ceb..0000000
--- a/milena/doc/tutorial/samples/logical-not-output.tex
+++ /dev/null
@@ -1,17 +0,0 @@
-ima:
-| -
-- |
-
-----
-ima_neg:
-- |
-| -
-
-ima:
-| -
-- |
-
-----
-not_inplace(ima)
-- |
-| -
diff --git a/milena/doc/tutorial/samples/logical-not.tex
b/milena/doc/tutorial/samples/logical-not.cc
similarity index 77%
rename from milena/doc/tutorial/samples/logical-not.tex
rename to milena/doc/tutorial/samples/logical-not.cc
index ecb7748..ede62ca 100644
--- a/milena/doc/tutorial/samples/logical-not.tex
+++ b/milena/doc/tutorial/samples/logical-not.cc
@@ -1,6 +1,4 @@
-#include <mln/core/image/image2d.hh>
-#include <mln/logical/not.hh>
-#include <mln/debug/println.hh>
+#include <mln/essential/2d.hh>
int main()
{
using namespace mln;
@@ -9,7 +7,7 @@ int main()
{1, 0},
{0, 1}
};
- image2d<bool> ima = make::image2d(vals);
+ image2d<bool> ima = make::image(vals);
std::cout << "ima:" << std::endl;
debug::println(ima);
diff --git a/milena/doc/tutorial/samples/mln_var-1.tex
b/milena/doc/tutorial/samples/mln_var-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/mln_var-1.tex
rename to milena/doc/tutorial/samples/mln_var-1.cc
diff --git a/milena/doc/tutorial/samples/mln_var-2.tex
b/milena/doc/tutorial/samples/mln_var-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/mln_var-2.tex
rename to milena/doc/tutorial/samples/mln_var-2.cc
diff --git a/milena/doc/tutorial/samples/mln_var-3.tex
b/milena/doc/tutorial/samples/mln_var-3.cc
similarity index 100%
rename from milena/doc/tutorial/samples/mln_var-3.tex
rename to milena/doc/tutorial/samples/mln_var-3.cc
diff --git a/milena/doc/tutorial/samples/out.ppm b/milena/doc/tutorial/samples/out.ppm
new file mode 100644
index 0000000000000000000000000000000000000000..7a33c29f788c3048de656608515af2b838ac61da
GIT binary patch
literal 145320
zcmeI1L2DdG5Jr90uUN<>xyX*eIph|w2>}O;$sds84KX;9QAEJMUMcVFN-OPXX1b@k
zx~lsvwpovMx~so>^Lj@6?x(ZwHotB!x7Qap+mD+MUpK#h`n<io*!+0@Vzc@C=H|=K
z&!1m?J97T{`s4O|`{mQk#ra>?a@L!7zy0yc=Kc2H?Zx$<e{U`>KW<)c|J#1P`tr~A
z@@Dh);=`2;dUgGE^ZncRuiyM|_VVS6jr=`(`Rdi#?Xze6ApwU8JiEQ+4+(fk;P~qB
zP!Bbb08GMww*>Y~%D%n3tMpbL^>mm3Om^6G=S#k45>@h)=OY1_bS{k!%X`2is`Md>
z4mmtt@+gyX@c1*lCjrX@9y5t5QDyA}o?;SJTAG2mjuRMR5>?g~#c_i=d_Tb?s_c*l
z4@(|r5>=wgdI>zqBv{sKiU(O$tN|t~hR@Wa2~07GDp6&P1YmOXQsrR91ZJ2-l{G|B
zkp~Y`FJw|a=Al|@=pli5CQ&7-v`t_+lc=%>M|oJ|A|_F#ttdQzQL%<3CQ)U@PW3bO
zQYKL)s<cWVfl08mYDzy!99=0)j>f{liV37Ki7HWL`2=9Hq7ayRG=XF$QDu2ijCQJ@
zgV{{ViT$L+N-Yz}VG>oM%907JVG>nZ+M}PjGMPk`B}LH>exoa0$t0>AO_hUd63Ax~
zRier=39MogEXy=yjbs`)7bY8MVq;5K%Ot8qmD&lwWMh(PU^xm*qDpO1G{DuGB`7i}
zL#?TVb4g%GK!-_Gi7NFH&}9-;;=1(-s4<Bu^+d70t)WLyXA)J0=D|bpnoOcfRH>1G
zGLvAb(G(A|s#pU|Rt%r1M-$Lz5>=wgbqSPXQbr!V3OGmt(+Lz|5>>7f#dOP>|7lSs
zQDyV|lvrRXCQ&7-%uS#)lc=(UN!lK>Ad{#vR}^g{H@i9mCQ;>V7x=(&0%e&*m8dd3
zf#OVpWqMPNrP1MgnC!6W&X;V#B&tM}DG69IDRVi$LMhKf0!B=t$`ny}0Hb0J#!RBh
zioK39wH=eF5>+lsz@AA|8O2w%>O3%cyA0vgWy(_yPdY|f%gz+?k2RC*;4wL|#QTUz
zR2kALmbBQ+Re?!Vi7F=(c*rEGM3wauIAIbj>o>(_i*!3nT_$CAx5-dgtpvuHM3tzr
zW&+ijM3uF4<aXXCm_(H|Md6kfo5DOWi7IV+9c7lMnM9SSvQ7f^nUr<&CHUm;kfZob
ztIkO#QDq%bXf-$JI4+n(m3Z<ffjK5oC91SeU;&e0Y2B2dd#+a5-k6knw3fy=K@(WU
zB&tM}b_qCS5>*EEn^xJ2nM9R#qR?t?&~bb+i7JEQq*8VYlc*9^S|s3+Nm)1FHXi*B
zSw%j921#TRRa%H55I-eKb;=~F#FOH`gjb1+<77;>?_RM?_vFCt2|^|IG_dRvOaDwt
zg(eq3iHnLca}vm9Qfz5L3aT^;+NPb0W(mP0sx-O&7Xf2X$qFV>rI#ieaAG+{6edxn
zB^7n&TE`@+M3wpp#9&g^&BIPN4?C-wM3wrYsJnGmpFIqds1i?#{}Ns%*B0A%A6RO5
za$pxM*~E1ch{&YWY;pnUBuuHP3Ft8?woIKo>+|g3MnT)Ob7YpFOrpxH>v;qKhvTR+
zi7I0>-64m^CB<bDRUY@TrT5xQqDoY`Hi4*2%DQ>jY4l;I0F$V4tteXBh%?p_m`PNL
zC&hmWuZ-&>{S>zE7O^bj$${N;#xgcNuxt*?Hkg!Em|OrE*9@m5Cs2|}v84$qsM08C
zn|8`#cE40fxKT{{s2!82(j;pOEDJM<DlMAW42{D=T4EAawgG2(CQ&7-OiQ30CS~0`
z>@@MPW5Oh=OcO;LTX6O&nqm@F;>o063)!fG?K?h}R-PR2&DMF!iC`HV%T}3`b)|4@
zBXMR~lz=UhJnSrLO6ONo!%U*eplq8ni7HX$R04Y-zukFRzDzFP-IETgG|763vE>CE
z^tk`-!;;9|T+1t6@kt)QgFJxW(>TyQ_{18@6{ICylwj!_%f~d<WKymH6D(oUDCp#N
zj?>r!ld?vzbcW>=jg^^1mC0@~*;>k0H4o%LBi6T*_w$*=j4B<dauJR7J!z^+$;9LW
zDC?PsOGu#61(T*&Mr>&4nv-elk4aQ%MtCNTUYJCcO>Ot9XzY?nR9RG&3P1{$yJyn-
z=iqAZibi!9oCok?58wxo4pFahe^*Q%u0f69)`Z^FxtcT%!FXYkyUKW=>eJXKld@`d
z@YOqbDH`1|i7ErAvMh}rnFLGMSXuxn0XVv!9G>}2o<D|F^KIkeP5i)#VRr@`y!>mo
zaFdx_t8X>|QyQJ_-KN{O1U}o8Za+|gM!!s&V%aTn6AQ0KBTRBvd2&BlnMT)4qROE?
zrvJJCQdaElx%=)xYhrIv{n0J~)e%iWQmOoafy!X32l2}!s<dF+7mdS;Ve+t9tiHT0
z5K=7CBaH!=G*zYaNU`Idhw@8f3?@yn^bC?pZF?G>Uwp3j?%{byr5kgD3^_EdO7D8S
zyY~seB&xjYR_2>9G=|x`O_`MT%_%h#j4HzhqcIYbrdU>iM}5+eG{WSl@OC#d>V#Mh
z7?{RjOrpxsOX$JDJ&m#NKIA+2-PeoK@Bl9>*~C=kp_NuCJ-8ZFCOse+iAkwhW$kl=
zL}RiY8V4$aF$tCrF3b2diXTp1F!`X#2Zau?IR3p*n=}r1#$!_IK9E!N%`O>}nbMZg
zGL0}f&4NEw?rD_5rYm>-)03V0^gu{Y_NdDEdOU^ii6byMVHF>$?1;tz(x^;!q00C)
z%56sa3nnK#Is9lBk?}oTr!)@y24+$gU_y#5lU>sYlgp7d!E#Td%(c8Qcb`n(sZY;{
z?a6jj8DEd5Y~>ya&t!Nkq46=hFu8F18-h~(wlO}9S&!9^5j^>S3rxmSB{ZIZcys_J
z7kW}YrlCq`Jc93uw~a6<t223A-NltR(;d=Ar4|X~35s+N!(>wLa#a~$kGj}Rj@Ay7
zvdlbzC7zY2N@$$qZ|sLKnL+Y0EaTHCS8I(|Q%p*LiPFpa{2Y_exC&*MRK*e+SJ60}
z+!~WLRT&>h1)vm$XpqSYSVE%$ig!c6WZvE_XARNq12nmh%`SE3#5)>%ylIn3$<_oC
zNzZ1YQnUDg@KF^oS*qR6aec&rr~fv~q=f98idyA)!f&(|nCuAMQ3CuOY?(<(yOxW*
z&Fc@miHcydeQqb(@A5~DGbx#SQ<h~tE|Hrp3MSixcDC`3KhQpt627IHs?X&ZwuPm2
z!DJ^`E^N8`kHKUM7IlwVQh~iNDWO!~RSOl6)b9u%hRMLJMgT0M#*UbjbPAcue%Opo
z$2kQigMk_ct?WwsVp3wVcbe9W**%VSB1{ILG#XSZ>+Oz7$xBOIHsh>paKO`H(l4R`
zaZ)L{M<yjW8^vYMqSD&1gLKNITP(wZq*ypidU2*=Q-crHFO$-^?7da@#NY_2mk*Pb
p$yD!X`~kaWQrf3$yrj|M!&7JlFj)c1LcMHd*nvs@B>_(f{14b_By9iy
literal 0
HcmV?d00001
diff --git a/milena/doc/tutorial/samples/parray-append.tex
b/milena/doc/tutorial/samples/parray-append.cc
similarity index 100%
rename from milena/doc/tutorial/samples/parray-append.tex
rename to milena/doc/tutorial/samples/parray-append.cc
diff --git a/milena/doc/tutorial/samples/parray-display-1.tex
b/milena/doc/tutorial/samples/parray-display-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/parray-display-1.tex
rename to milena/doc/tutorial/samples/parray-display-1.cc
diff --git a/milena/doc/tutorial/samples/paste-call-1-output.tex
b/milena/doc/tutorial/samples/paste-call-1-output.tex
deleted file mode 100644
index 987bf30..0000000
--- a/milena/doc/tutorial/samples/paste-call-1-output.tex
+++ /dev/null
@@ -1,3 +0,0 @@
-b b b b
-b b b b
-b b b b
diff --git a/milena/doc/tutorial/samples/paste-call-1.tex
b/milena/doc/tutorial/samples/paste-call-1.cc
similarity index 67%
rename from milena/doc/tutorial/samples/paste-call-1.tex
rename to milena/doc/tutorial/samples/paste-call-1.cc
index 50e4885..e4bfec2 100644
--- a/milena/doc/tutorial/samples/paste-call-1.tex
+++ b/milena/doc/tutorial/samples/paste-call-1.cc
@@ -1,8 +1,4 @@
-#include <mln/core/image/image2d.hh>
-#include <mln/make/box2d.hh>
-#include <mln/level/fill.hh>
-#include <mln/level/paste.hh>
-#include <mln/debug/println.hh>
+#include <mln/essential/2d.hh>
int main()
{
using namespace mln;
diff --git a/milena/doc/tutorial/samples/paste.tex b/milena/doc/tutorial/samples/paste.cc
similarity index 100%
rename from milena/doc/tutorial/samples/paste.tex
rename to milena/doc/tutorial/samples/paste.cc
diff --git a/milena/doc/tutorial/samples/point-1-output.tex
b/milena/doc/tutorial/samples/point-1-output.tex
deleted file mode 100644
index 39f77d0..0000000
--- a/milena/doc/tutorial/samples/point-1-output.tex
+++ /dev/null
@@ -1,2 +0,0 @@
-has(p1)? false
-has(p2)? true
diff --git a/milena/doc/tutorial/samples/point-1.tex
b/milena/doc/tutorial/samples/point-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/point-1.tex
rename to milena/doc/tutorial/samples/point-1.cc
diff --git a/milena/doc/tutorial/samples/predicate-1.tex
b/milena/doc/tutorial/samples/predicate-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/predicate-1.tex
rename to milena/doc/tutorial/samples/predicate-1.cc
diff --git a/milena/doc/tutorial/samples/win-create-1-display.tex
b/milena/doc/tutorial/samples/win-create-1-display.cc
similarity index 100%
rename from milena/doc/tutorial/samples/win-create-1-display.tex
rename to milena/doc/tutorial/samples/win-create-1-display.cc
diff --git a/milena/doc/tutorial/samples/win-create-1.tex
b/milena/doc/tutorial/samples/win-create-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/win-create-1.tex
rename to milena/doc/tutorial/samples/win-create-1.cc
diff --git a/milena/doc/tutorial/samples/win-create-2.tex
b/milena/doc/tutorial/samples/win-create-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/win-create-2.tex
rename to milena/doc/tutorial/samples/win-create-2.cc
diff --git a/milena/doc/tutorial/samples/win-create-3.cc
b/milena/doc/tutorial/samples/win-create-3.cc
new file mode 100644
index 0000000..8e4bf97
--- /dev/null
+++ b/milena/doc/tutorial/samples/win-create-3.cc
@@ -0,0 +1,7 @@
+bool b[25] = { 0, 0, 1, 0, 0,
+ 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1,
+ 1, 1, 0, 1, 1,
+ 1, 0, 1, 0, 1 };
+window2d win = convert::to<window2d>(b)
+
diff --git a/milena/doc/tutorial/todoxygen.sh b/milena/doc/tutorial/todoxygen.sh
new file mode 100755
index 0000000..5442cc4
--- /dev/null
+++ b/milena/doc/tutorial/todoxygen.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+if [ $# -ne 2 ]; then
+ echo "Usage: $0 <file.tex> <output dir>";
+ exit 1;
+fi
+
+out="$2/`basename $1 .tex`.hh"
+html="$2/`basename $1 .tex`.html"
+
+#Convert .tex to .html
+hevea -O -fix $1 -o $html
+
+bodyl=`grep -n "<BODY >" $html | cut -d ':' -f 1`
+nlines=`wc -l $html | cut -d ' ' -f 1`
+tail_line=$(($nlines - $bodyl))
+
+echo '/*! ' > $out
+echo '\htmlonly' >> $out
+tail -n $tail_line $html >> $out
+echo '\endhtmlonly */' >> $out
+
+sed -i -e 's/ /\ /g' $out
+sed -i -e 's/↦/\&map/g' $out
+sed -i -e 's/’/\&rsquo/g' $out
+sed -i -e 's/→/\&rarr/g' $out
+sed -i -e 's/“/\&ldquo/g' $out
+sed -i -e 's/”/\&rdquo/g' $out
+sed -i -e 's/≡/\&equiv/g' $out
+
+#Doxygen wants us to preserve '\n' after commands.
+sed -i -e 's/\\endhtmlonly/\\endhtmlonly\n/g' $out
+sed -i -e 's/\\htmlonly/\n\\htmlonly\n/g' $out
+sed -i -e 's/\\endhtmlonly/\\endhtmlonly\n/g' $out
+sed -i -e 's/\\htmlonly/\n\\htmlonly\n/g' $out
diff --git a/milena/doc/tutorial/tutorial.tex b/milena/doc/tutorial/tutorial.tex
index 4c0c052..f58c8d2 100644
--- a/milena/doc/tutorial/tutorial.tex
+++ b/milena/doc/tutorial/tutorial.tex
@@ -6,6 +6,7 @@
\usepackage{color}
\usepackage{html}
\usepackage{tikz}
+\usepackage{pgf}
\newcommand{\img}[4]{
\begin{figure}[ht!]
@@ -66,7 +67,19 @@ showstringspaces=false,linewidth=14cm}
\newcommand{\doxycode}[1]{
\backslash endhtmlonly%
-\backslash include #1.tex%
+\backslash include #1.cc%
+\backslash htmlonly%
+}
+
+\newcommand{\doxyoutput}[1]{
+\backslash endhtmlonly%
+\backslash include #1.txt%
+\backslash htmlonly%
+}
+
+\newcommand{\doxyfigure}[2]{
+\backslash endhtmlonly%
+\backslash image html #1.png%
\backslash htmlonly%
}
@@ -88,7 +101,12 @@ $$
\renewcommand{\doxychapter}[2]{\chapter{#2}\label{#1}}
\renewcommand{\doxysection}[2]{\section{#2}\label{#1}}
\renewcommand{\doxysubsection}[2]{\subsection{#2}\label{#1}}
-\renewcommand{\doxycode}[1]{\lstinputlisting[frame=single]{samples/#1}}
+\renewcommand{\doxycode}[1]{\lstinputlisting[frame=single]{samples/#1.cc}}
+\renewcommand{\doxyoutput}[1]{\lstinputlisting[frame=single]{outputs/#1.txt}}
+\renewcommand{\doxyfigure}[2]{%
+\pgfimage[width=#2]{figures/#1}%
+\label{#1}%
+}
\renewenvironment{doxymath}
{
$$
@@ -118,6 +136,14 @@ $$
\textit{#1}%
}
+\newcommand{\must}{%
+\textbf{must}
+}
+\newcommand{\should}{%
+\textbf{should}
+}
+
+
\usetikzlibrary{er}
\newcommand{\neighcfour}{%
@@ -211,9 +237,11 @@ $$
\begin{document}
+% Doxygen use only - Generate the left menu.
\begin{htmlonly}
\backslash endhtmlonly
\backslash page tutorial Tutorial
+- \backslash subpage installation
- \backslash subpage foreword
- \backslash subpage site
- \backslash subpage siteset
@@ -227,6 +255,7 @@ $$
- \backslash subpage arithmops
- \backslash subpage mathtools
- \backslash subpage globalvars
+- \backslash subpage macros
\backslash htmlonly
\end{htmlonly}
@@ -235,6 +264,20 @@ $$
\end{latexonly}
%====================================
+\doxychapter{installation}{Installation}
+
+%**************************
+\doxysection{requirements}{Requirements}
+
+%**************************
+\doxysection{getolena}{Getting Olena}
+
+%**************************
+\doxysection{buildingolena}{Building Olena}
+
+
+
+%====================================
\doxychapter{foreword}{Foreword}
%**************************
@@ -297,6 +340,24 @@ Olena's tarball is structured as follow:
\item swilena: Python bindings for Olena.
\end{itemize}
+\doxysection{compilehint}{Writing and compiling a program with Olena}
+
+Before writing your first program, please be ware of these hints:
+
+\begin{itemize}
+ \item By default, Olena enables a lot of internal pre and post conditions.
+ Usually, this is a useful feature and it \should be enabled. It can heavily
+ slow down a program though and these tests can be disabled by compiling
+ using \code{-DNDEBUG}.
+ \begin{verbatim}
+g++ -DNDEBUG -Ipath/to/mln my_program.cc
+ \end{verbatim}
+
+ \item If you decide to use optimization flags to compile for debugging,
+ prefer using \code{-O1}. It is much faster to compile and it gives good
+ performance results.
+
+\end{itemize}
%====================================
\clearpage
@@ -498,7 +559,7 @@ FIXME & FIXME \\
%**************************
\doxysection{imapossvalues}{Possible value types}
-Every image type must take its type of value as parameter.
+Every image type \must take its type of value as parameter.
The value type can be one of the builtins one:
\begin{itemize}
\item \type{bool}
@@ -537,7 +598,7 @@ Value type & underlying data type \\
All these types are available in mln/value and accessible in the
\namespace{mln::value} namespace.
-Most of the time, the name of the header which must be included to use one of these data
+Most of the time, the name of the header which \must be included to use one of these
data
types is actually ``type\_name.hh". For instance, for \type{rgb8} the header will
be
\header{rgb8.hh}.
@@ -595,14 +656,14 @@ exactly equivalent.
\doxycode{ima2d-1}
Output:
-\doxycode{ima2d-1-output}
+\doxyoutput{ima2d-1}
To know if a site belongs to an image domain or not, a method ``\code{has()}''
is
available.
\doxycode{point-1}
Output:
-\doxycode{point-1-output}
+\doxyoutput{point-1}
Since the notion of site is independent from the image it applies on, we can
form expressions where a site passed to several images:
@@ -626,7 +687,7 @@ as shown in the following example.
Output:
-\doxycode{borderthickness-output}
+\doxyoutput{borderthickness}
It is important to note that to display the border in the ouput, we use a
special debug function, \code{debug::println\_with\_border}. Indeed, the border and the
@@ -691,16 +752,39 @@ information.
in consideration the extension/border if it exists. The default border
thickness is set to 3 as shown by the following example.
-[FIXME: Add example has(p) when p is in the border and border::thickness
-modified.]
+\doxycode{ima-has}
+
+Output:
+
+\doxyoutput{ima-has}
-Most of the time, this is the good behavior. For instance, if a rotation of 20
-degrees is applied to an image, sites which were not previously in the domain
+Most of the time, this is the good behavior. For instance, if a rotation
+is applied to an image, sites which were not previously in the domain
will be part of it. Thanks to the extension/border, these sites will be
-associated to the value they had when they were part of the extension/border.
+associated to the value of the extension/border.
+
+In the following example, the extension is set to a constant color \var{yellow}.
+It means that whatever the new sites computed through the rotation, it will be
+part of the image and a value will be available. Site which were previously in
+the extension/border, will be associated to \var{yellow} in the output image.
+
+\doxycode{ima2d-rot}
+
+Output:
+
+\bigskip
+
+\begin{tabular}{c c}
+\doxyfigure{ima2d-rot-1}{4cm} & \doxyfigure{ima2d-rot-2}{4cm} \\
+\multicolumn{2}{c}{\var{ima1} and its border before rotation (left) and \var{ima2}
+ and its border after rotation} \\
+\end{tabular}
+
+\bigskip
[Image+bord rotation 20degres, avant, apres]
+
Sometimes taking the domain in consideration may not be the expected behavior.
If you do not want to use the extension/border for a specific routine, simply
restrict the image to its domain.
@@ -717,9 +801,6 @@ Note that:
\code{border::get(ima.domain())} == \code{border::get(ima | ima.domain())} == 0
\end{center}
-So it is also valid to write:
-\doxycode{extension-ignore2}
-
%================================================
\doxysection{imamorphed}{Morphed images}
@@ -817,7 +898,7 @@ Most of the time, images can be modified and these two methods can be
used both
to read a value and modify it. Both methods are equivalent.
\doxycode{ima2d-3}
Output:
-\doxycode{ima2d-3-output}
+\doxyoutput{ima2d-3-output}
Usually, you will want to use the functional way, ``\code{ima(Site)}'', more
particularly while iterating over all the sites through an iterator. This use
@@ -847,7 +928,7 @@ provided in \hpath{mln/geom} in the following files:
\doxycode{ima-size}
Output:
-\doxycode{ima-size-output}
+\doxyoutput{ima-size}
%================================================
@@ -868,13 +949,14 @@ Voir les vset => attendre que ca soit ameliore?
In Olena, there are both the window and neighborhood concept. A window can be
defined on any sites around a central site which may also be included.
-A neighborhood is more restrictive and must not include the central site.
+A neighborhood is more restrictive and \must not include the central site.
Therefore these two concepts are really similar and are detailed together in
this section.
By default, structural elements are centered. The central site is located at the
-origin of the grid: ``\var{literal::origin}''. With image2d, the central site is
-(0,0).
+origin of the grid: ``\var{literal::origin}''. With \type{image2d}, the central
site is
+(0,0). Centered structural elements \must have an odd size.
+
\doxysection{sedef}{Define an element}
@@ -968,11 +1050,15 @@ Another way to define the same window is to provide a bool array:
\doxycode{win-create-2}
\textbf{Note that despite the different ways of defining these windows,
- ``'var{win}'' == ``\var{win2}''}.
-The boolean array must always have an odd size.
+ ``var{win}'' == ``\var{win2}''}.
+The boolean array \must always have an odd size.
While creating a windows thanks to a bool array/matrix, the window's center is the
central site of the array/matrix.
+\textbf{This way of defining a window is very powerful since it enables the possibility
+of having non-square windows such as:}
+
+
\subsubsection{Neighborhood}
@@ -1094,11 +1180,11 @@ owns the method ``\code{coord row() const}'' which is
defined as
\doxysection{sitesdpoint}{Dpoint}
Dpoints are relative sites. They are usually used in window and neighborhood
definitions. Since the central site is not constant, windows and neighborhoods
-must be recomputed and dpoints help in doing that.
+\must be recomputed and dpoints help in doing that.
\doxycode{dpoint-1}
Output:
-\doxycode{dpoint-1-output}
+\doxyoutput{dpoint-1}
@@ -1175,7 +1261,7 @@ use the \code{for\_all} loop: \code{level::fill()} and
\code{level::paste()}.
Important note: macros for iterators exist in two versions:
``\code{mln\_*iter}'' and ``\code{mln\_*iter\_}''. The difference is that
the
-first version must be used in templated function whereas the second one must be
+first version \must be used in templated function whereas the second one \must be
used in non templated functions.
If you want a list of all the macros available in Olena, please refert to
@@ -1286,7 +1372,7 @@ data for the sites (5, 5) to (14, 14) (so it has 100 sites).
\doxycode{paste-call-1}
Output:
-\doxycode{paste-call-1-output}
+\doxyoutput{paste-call-1}
Before pasting, the couple of images looked like:
@@ -1328,10 +1414,10 @@ Consider the following image:
Then label this image thanks to \code{labeling::blobs()}:
\doxycode{ima2d-decl-2-blobs}
Output:
-\doxycode{ima2d-decl-2-blobs-output}
+\doxyoutput{ima2d-decl-2-blobs-full}
Note that this routine returns the number of components in its third parameter.
-This parameter \textbf{must} be of the same type as the returned image value.
+This parameter \must be of the same type as the returned image value.
%**************************
@@ -1358,7 +1444,7 @@ algorithm a version which returns a new image and another which
works in place.
Sample code:
\doxycode{logical-not}
Output:
-\doxycode{logical-not-output}
+\doxyoutput{logical-not}
%**************************
\doxysection{compute}{Compute}
@@ -1433,9 +1519,9 @@ It exists two versions of each accumulator.
\type{accu::meta::bbox}.
\end{itemize}
-Note that when an accumulator is passed to \code{*::compute()}, it must be
instanciated.You cannot write:
+Note that when an accumulator is passed to \code{*::compute()}, it \must be
instanciated.You cannot write:
\doxycode{accu-wrong-instanciation}
-Instead, you must write:
+Instead, you \must write:
\doxycode{accu-right-instanciation}
\doxysubsection{exlblcompute}{Example with labeling::compute()}
@@ -1449,7 +1535,7 @@ Consider the following image:
Then label this image thanks to \code{labeling::blobs()}:
\doxycode{ima2d-decl-2-blobs}
Output:
-\doxycode{ima2d-decl-2-blobs-output}
+\doxyoutput{ima2d-decl-2-blobs-full}
Then, use \code{labeling::compute()} with the bbox accumulator:
\doxycode{labeling-compute-call}
@@ -1462,7 +1548,7 @@ In this case, it returns an array of \type{box2d}.
set the background to 0, we will want to iterate from 1 to nlabels included.
\doxycode{labeling-compute-result}
Output:
-\doxycode{labeling-compute-result-output}
+\doxyoutput{labeling-compute-full}
\subsection{Routines based on accumulators and *::compute()}
@@ -1516,7 +1602,7 @@ You can easily get a \type{Function\_p2b} by comparing the value
returned
by a \type{Function\_p2v} to another Value.
The following sample codes illustrate this feature.
-In order to use C functions as predicate, they must have one of the following
+In order to use C functions as predicate, they \must have one of the following
prototype if you work on 2D images:
\doxycode{predicate-1}
Of course, you just need to change the point type if you use another image
@@ -1553,15 +1639,15 @@ When writing:
\doxycode{ima2d-restricted-1}
-\var{sub\_D} must be included in \code{ima.domain()}.
+\var{sub\_D} \must be included in \code{ima.domain()}.
Let's have an image, \var{imab}, like this:
-\doxycode{ima2d-display-output-1}
+\doxyoutput{ima2d-display-output-1}
Extract a sub image from \var{imab} with sites having their value set to 1.
\doxycode{mln_var-2}
Then, \var{imab1} looks like:
-\doxycode{ima2d-display-output-2}
+\doxyoutput{ima2d-display-output-2}
Now, if we want to extract a sub image it may fail, depending on the site set
used:
@@ -1604,7 +1690,7 @@ Specific data can be associated to each vertex and/or edges.
First, create a graph which looks like the following:
-\doxycode{graph-output-1}
+\doxyoutput{graph-output-1}
First we need to add vertices:
@@ -1694,12 +1780,26 @@ trace::quiet & Enable trace printing & true/false \\
%====================================
\newpage
\clearpage
-\doxychapter{macros}{Useful Macros}
+\doxychapter{macros}{Useful macros}
+\renewcommand{\arraystretch}{2}
+
+\doxysection{vardeclmacros}{Variable declaration macros}
+\begin{tabular}{l|p{4cm}|p{6cm}}
+Name & Arguments & Description \\
+\hline
+mln\_VAR(N, V) & N : name of the variable. & \\
+ & V : value to assign to N. & Declare a variable N of type N\_t and
+ assign the value V. \\
+
+mln\_const\_VAR(N, V) & N : name of the variable. & \\
+ & V : value to assign to N. & Declare a const variable N of type N\_t
+ and assign the value V. \\
+\end{tabular}
+
\doxysection{macrositerators}{Iterator type macros}
\doxysubsection{macrosdefit}{Default iterator types}
-\renewcommand{\arraystretch}{2}
\begin{tabular}{l|p{4cm}|p{6cm}}
Name & Arguments & Description \\
\hline
@@ -1795,4 +1895,16 @@ mln\_bkd\_nixter(I, N) & I : image type, & \\
backward iterator of a neighborhood on an image of type I. \\
\end{tabular}
+
+\doxysubsection{macrosbkdit}{Graph iterators}
+\begin{tabular}{l|p{4cm}|p{6cm}}
+Name & Arguments & Description \\
+\hline
+mln\_vertex\_iter(G) & G : graph type & Iterator on vertices. \\
+mln\_edge\_iter(G) & G : graph type & Iterator on edges. \\
+mln\_vertex\_nbh\_edge\_iter(G) & G : graph type & Iterator on the edges
adjacent to a vertex. \\
+mln\_vertex\_nbh\_vertex\_iter(G) & G : graph type & Iterator on the vertices
adjacent to a vertex. \\
+mln\_edge\_nbh\_edge\_iter(G) & G : graph type & Iterator on the edges adjacent
to an edge. \\
+\end{tabular}
+
\end{document}
diff --git a/milena/mln/core/internal/complex_window_p_base.hh
b/milena/mln/core/internal/complex_window_p_base.hh
index 2362c54..c02ba4b 100644
--- a/milena/mln/core/internal/complex_window_p_base.hh
+++ b/milena/mln/core/internal/complex_window_p_base.hh
@@ -28,7 +28,7 @@
#ifndef MLN_CORE_IMAGE_COMPLEX_WINDOW_P_BASE_HH
# define MLN_CORE_IMAGE_COMPLEX_WINDOW_P_BASE_HH
-/// \file mln/core/image/complex_window_p_base.hh
+/// \file mln/core/internal/complex_window_p_base.hh
/// \brief Definition of a generic window centered on the face
/// of a complex, based on a pair of (forward and backward) complex
/// iterators. The center (site) is part of the window.
diff --git a/milena/mln/core/routine/extend.hh b/milena/mln/core/routine/extend.hh
index 984d9a0..6d447c1 100644
--- a/milena/mln/core/routine/extend.hh
+++ b/milena/mln/core/routine/extend.hh
@@ -31,7 +31,7 @@
/*!
* \file mln/core/routine/extend.hh
*
- * \brief Definition of a morpher that extends the domain of an image.
+ * \brief Definition of a morpher that extends the extended domain of an image.
*
* \todo Use the 'instant' mechanism.
* \todo Deal with ambiguities.
diff --git a/milena/mln/core/site_set/p_complex.hh
b/milena/mln/core/site_set/p_complex.hh
index 3420519..3fcb7da 100644
--- a/milena/mln/core/site_set/p_complex.hh
+++ b/milena/mln/core/site_set/p_complex.hh
@@ -103,7 +103,7 @@ namespace mln
/* FIXME: Aggregate site data (location). */
- /** \brief A complex psite set based on a the \N-faces of a complex
+ /** \brief A complex psite set based on the N-faces of a complex
of dimension \tparam D (a \p D-complex).
\arg \p D The dimension of the complex.
diff --git a/milena/mln/debug/graph.hh b/milena/mln/debug/graph.hh
index a23d386..e92b802 100644
--- a/milena/mln/debug/graph.hh
+++ b/milena/mln/debug/graph.hh
@@ -29,7 +29,7 @@
#ifndef MLN_DEBUG_DRAW_GRAPH_HH
# define MLN_DEBUG_DRAW_GRAPH_HH
-/// \file mln/debug/draw_graph.hh
+/// \file mln/debug/graph.hh
/// \brief Draw an (classical) image from a mln::graph_image.
# include <mln/pw/image.hh>
diff --git a/milena/mln/debug/println_with_border.hh
b/milena/mln/debug/println_with_border.hh
index 05971a0..52ff01b 100644
--- a/milena/mln/debug/println_with_border.hh
+++ b/milena/mln/debug/println_with_border.hh
@@ -81,7 +81,7 @@ namespace mln
{
mlc_is(mln_trait_image_speed(I), trait::image::speed::fastest)::check();
- impl::println_with_border(exact(input).bbox(), exact(input));
+ impl::println_with_border(geom::bbox(exact(input)), exact(input));
}
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/fun/x2v/bilinear.hh b/milena/mln/fun/x2v/bilinear.hh
index 8aa242f..e1e577b 100644
--- a/milena/mln/fun/x2v/bilinear.hh
+++ b/milena/mln/fun/x2v/bilinear.hh
@@ -34,7 +34,7 @@
# include <mln/convert/to.hh>
# include <mln/algebra/vec.hh>
-/*! \file mln/fun/x2x/bilinear.hh
+/*! \file mln/fun/x2v/bilinear.hh
*
* \brief Define a bilinear interpolation of values from an underlying image
*/
diff --git a/milena/mln/fun/x2v/linear.hh b/milena/mln/fun/x2v/linear.hh
index 7a2e329..8f62185 100644
--- a/milena/mln/fun/x2v/linear.hh
+++ b/milena/mln/fun/x2v/linear.hh
@@ -28,7 +28,7 @@
#ifndef MLN_FUN_X2X_LINEAR_HH
# define MLN_FUN_X2X_LINEAR_HH
-/*! \file mln/fun/x2x/linear.hh
+/*! \file mln/fun/x2v/linear.hh
*
* \brief Define a linear interpolation of values from an underlying image
*/
diff --git a/milena/mln/fun/x2v/nneighbor.hh b/milena/mln/fun/x2v/nneighbor.hh
index ae805a9..a2f9595 100644
--- a/milena/mln/fun/x2v/nneighbor.hh
+++ b/milena/mln/fun/x2v/nneighbor.hh
@@ -33,7 +33,7 @@
# include <mln/algebra/vec.hh>
# include <mln/convert/to.hh>
-/*! \file mln/fun/x2x/nneighbor.hh
+/*! \file mln/fun/x2v/nneighbor.hh
*
* \brief Define a nneighbor interpolation of values from an underlying image
*/
diff --git a/milena/mln/geom/nsites.hh b/milena/mln/geom/nsites.hh
index b8b790e..cf6ffa1 100644
--- a/milena/mln/geom/nsites.hh
+++ b/milena/mln/geom/nsites.hh
@@ -28,10 +28,8 @@
#ifndef MLN_GEOM_NSITES_HH
# define MLN_GEOM_NSITES_HH
-/*! \file mln/geom/nsites.hh
- *
- * \brief Compute the number of sites of an image or a site set.
- */
+/// \file mln/geom/nsites.hh
+/// Compute the number of sites of an image or a site set.
# include <mln/core/concept/site_set.hh>
# include <mln/core/concept/image.hh>
@@ -52,7 +50,6 @@ namespace mln
unsigned nsites(const Image<I>& input);
-
# ifndef MLN_INCLUDE_ONLY
@@ -72,7 +69,7 @@ namespace mln
trace::entering("geom::impl::generic::nsites");
const S& s = exact(s_);
mln_precondition(s.is_valid());
-
+
unsigned n = 0;
mln_piter(S) p(s);
for_all(p)
@@ -80,7 +77,7 @@ namespace mln
trace::exiting("geom::impl::generic::nsites");
return n;
- }
+ }
} // end of namespace mln::geom::impl::generic
@@ -112,7 +109,7 @@ namespace mln
const Site_Set<S>& s)
{
return impl::generic::nsites(s);
- }
+ }
template <typename S>
inline
@@ -120,7 +117,7 @@ namespace mln
const Site_Set<S>& s)
{
return impl::nsites_method(s);
- }
+ }
// Dispatch facade.
@@ -130,12 +127,12 @@ namespace mln
{
return nsites_dispatch(mln_trait_site_set_nsites(S)(),
s);
- }
+ }
} // end of namespace mln::geom::internal
-
+
// Facades.
template <typename S>
diff --git a/milena/mln/topo/n_face.hh b/milena/mln/topo/n_face.hh
index 2f8a7e0..ef1aad8 100644
--- a/milena/mln/topo/n_face.hh
+++ b/milena/mln/topo/n_face.hh
@@ -99,7 +99,7 @@ namespace mln
/* FIXME: We should not provide lower_dim_adj_faces() when N ==
0 nor higher_dim_adj_faces() when N == D. */
- /// \Return an array of face handles pointing to adjacent (n-1)-faces.
+ /// Return an array of face handles pointing to adjacent (n-1)-faces.
std::vector< algebraic_n_face<N - 1, D> > lower_dim_adj_faces() const;
/// Return an array of face handles pointing to adjacent (n+1)-faces.
std::vector< algebraic_n_face<N + 1, D> > higher_dim_adj_faces()
const;
diff --git a/milena/mln/util/internal/graph_nbh_iter.hh
b/milena/mln/util/internal/graph_nbh_iter.hh
index 9b7aa3a..e43c5ea 100644
--- a/milena/mln/util/internal/graph_nbh_iter.hh
+++ b/milena/mln/util/internal/graph_nbh_iter.hh
@@ -31,7 +31,7 @@
# include <mln/core/concept/proxy.hh>
# include <mln/util/internal/graph_nbh_iter_base.hh>
-/// \file mln/util/internal/graph_vertex_nbh_vertex_iter.hh
+/// \file mln/util/internal/graph_nbh_iter.hh
/// \brief Implementation for graph vertex iterators centered to a vertex.
namespace mln
diff --git a/milena/tests/core/site_set/p_complex.cc
b/milena/tests/core/site_set/p_complex.cc
index 490d387..0f84118 100644
--- a/milena/tests/core/site_set/p_complex.cc
+++ b/milena/tests/core/site_set/p_complex.cc
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/core/image/p_complex.cc
+/// \file tests/core/site_set/p_complex.cc
/// \brief Test of mln::p_complex and mln::geom::complex_geometry.
#include <algorithm>
diff --git a/milena/tests/morpho/complex_image_wst.cc
b/milena/tests/morpho/complex_image_wst.cc
index 8060cee..f6aab30 100644
--- a/milena/tests/morpho/complex_image_wst.cc
+++ b/milena/tests/morpho/complex_image_wst.cc
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/core/image/complex_image_swt.cc
+/// \file tests/morpho/complex_image_swt.cc
/// \brief Testing Meyer's Watershed Transform on mln::complex_image.
#include <iostream>
--
1.5.6.5