* apps/statues/mesh-complex-segm.cc,
* doc/benchmark/canvas.cc,
* doc/oldies/2006__tour_1.txt,
* doc/oldies/2006__tour_2.txt,
* doc/tutorial/examples/image_plain.cc,
* doc/tutorial/examples/sub_image.cc,
* doc/tutorial/samples/fill-call-1.cc,
* doc/tutorial/samples/fill-part-image.cc,
* doc/tutorial/samples/fill-subdomain-shorter.cc,
* doc/tutorial/samples/fill-subdomain.cc,
* doc/tutorial/samples/fill-subimage-cfun.cc,
* doc/tutorial/samples/ima2d-7.cc,
* doc/tutorial/samples/ima2d-rot.cc,
* doc/tutorial/samples/paste-call-1.cc,
* doc/tutorial/tutorial.tex: rename level::fill/paste as
data::fill/paste.
---
milena/ChangeLog | 21 ++++++++++++++++++++
milena/apps/statues/mesh-complex-segm.cc | 2 +-
milena/doc/benchmark/canvas.cc | 4 +-
milena/doc/oldies/2006__tour_1.txt | 10 ++++----
milena/doc/oldies/2006__tour_2.txt | 4 +-
milena/doc/tutorial/examples/image_plain.cc | 6 ++--
milena/doc/tutorial/examples/sub_image.cc | 4 +-
milena/doc/tutorial/samples/fill-call-1.cc | 4 +-
milena/doc/tutorial/samples/fill-part-image.cc | 4 +-
.../doc/tutorial/samples/fill-subdomain-shorter.cc | 4 +-
milena/doc/tutorial/samples/fill-subdomain.cc | 8 +++---
milena/doc/tutorial/samples/fill-subimage-cfun.cc | 4 +-
milena/doc/tutorial/samples/ima2d-7.cc | 2 +-
milena/doc/tutorial/samples/ima2d-rot.cc | 4 +-
milena/doc/tutorial/samples/paste-call-1.cc | 4 +-
milena/doc/tutorial/tutorial.tex | 20 +++++++++---------
16 files changed, 63 insertions(+), 42 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index e1a51ee..1ae05f4 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,26 @@
2008-12-29 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Update tutorial according to the last renamings.
+
+ * apps/statues/mesh-complex-segm.cc,
+ * doc/benchmark/canvas.cc,
+ * doc/oldies/2006__tour_1.txt,
+ * doc/oldies/2006__tour_2.txt,
+ * doc/tutorial/examples/image_plain.cc,
+ * doc/tutorial/examples/sub_image.cc,
+ * doc/tutorial/samples/fill-call-1.cc,
+ * doc/tutorial/samples/fill-part-image.cc,
+ * doc/tutorial/samples/fill-subdomain-shorter.cc,
+ * doc/tutorial/samples/fill-subdomain.cc,
+ * doc/tutorial/samples/fill-subimage-cfun.cc,
+ * doc/tutorial/samples/ima2d-7.cc,
+ * doc/tutorial/samples/ima2d-rot.cc,
+ * doc/tutorial/samples/paste-call-1.cc,
+ * doc/tutorial/tutorial.tex: rename level::fill/paste as
+ data::fill/paste.
+
+2008-12-29 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Fix compilation issues.
* tests/unit_test/Makefile.am,
diff --git a/milena/apps/statues/mesh-complex-segm.cc
b/milena/apps/statues/mesh-complex-segm.cc
index 05fffe0..00c9d13 100644
--- a/milena/apps/statues/mesh-complex-segm.cc
+++ b/milena/apps/statues/mesh-complex-segm.cc
@@ -146,7 +146,7 @@ int main(int argc, char* argv[])
`---------*/
mln::rgb8_2complex_image3df output(wshed.domain());
- mln::level::fill(output, mln::literal::white);
+ mln::data::fill(output, mln::literal::white);
// FIXME: Use a colorize functor instead.
// Choose random colors for each basin number.
diff --git a/milena/doc/benchmark/canvas.cc b/milena/doc/benchmark/canvas.cc
index b40a6c3..fd7f698 100644
--- a/milena/doc/benchmark/canvas.cc
+++ b/milena/doc/benchmark/canvas.cc
@@ -110,10 +110,10 @@ namespace mln
labeling<F>::init()
{
initialize(deja_vu, f.input);
- mln::level::fill(deja_vu, false);
+ mln::data::fill(deja_vu, false);
initialize(parent, f.input);
initialize(output, f.input);
- mln::level::fill(output, L(literal::zero));
+ mln::data::fill(output, L(literal::zero));
nlabels = 0;
}
diff --git a/milena/doc/oldies/2006__tour_1.txt b/milena/doc/oldies/2006__tour_1.txt
index b083281..26be330 100644
--- a/milena/doc/oldies/2006__tour_1.txt
+++ b/milena/doc/oldies/2006__tour_1.txt
@@ -25,7 +25,7 @@ image1d<T> and image3d<T> are similarly constructed
char[] values = { 'a', 'b', 'c',
'd', 'e', 'f' };
image2d<char> ima(2, 3);
-level::fill(ima, values);
+data::fill(ima, values);
debug::print(ima.bbox());
// [(0, 0)..(1, 2)]
@@ -54,7 +54,7 @@ debug::print(ima, p);
bbox2d bb = set(from(1,5), to(2,7));
image2d<char> ima2(bb);
ima2.set_name("ima2");
-level::fill(ima2, values);
+data::fill(ima2, values);
debug::print(ima2);
// 5 6 7
@@ -127,7 +127,7 @@ int[] values = { 0, 1, 1, 1, 0,
0, 1, 1, 1, 0,
0, 0, 0, 0, 0 };
image2d<bool> ima(from(1,1), to(4,4));
-level::fill(ima, values);
+data::fill(ima, values);
debug::print(ima);
// 1 2 3 4 5
// - - - - -
@@ -145,7 +145,7 @@ debug::print(ima2);
// 3| 0 0 0 0 0
// 4| 0 0 0 0 0
-actually, after level::fill we have:
+actually, after data::fill we have:
// 0 1 2 3 4 5 6
// - - - - - - -
@@ -232,7 +232,7 @@ int[] values = { 0, 1, 1, 1, 0,
0, 1, 1, 1, 0,
0, 0, 0, 0, 0 };
image2d_without_border<bool> ima(from(1,1), to(4,4));
-level::fill(ima, values);
+data::fill(ima, values);
debug::print(ima);
// 1 2 3 4 5
// - - - - -
diff --git a/milena/doc/oldies/2006__tour_2.txt b/milena/doc/oldies/2006__tour_2.txt
index e4d7011..ea06530 100644
--- a/milena/doc/oldies/2006__tour_2.txt
+++ b/milena/doc/oldies/2006__tour_2.txt
@@ -21,7 +21,7 @@ T: value type
int[] values = { 'a', 'b', 'c',
'd', 'e', 'f' };
image2d<char> ima(2, 3);
-level::fill(ima, values);
+data::fill(ima, values);
debug::print(ima.bbox());
// [(0, 0)..(1, 2)]
@@ -51,7 +51,7 @@ debug::print(ima, p);
bbox2d bb = set(from(1,5), to(2,7));
image2d<char> ima2(bb);
ima2.set_name("ima2");
-level::fill(ima2, values);
+data::fill(ima2, values);
debug::print(ima2);
// 5 6 7
diff --git a/milena/doc/tutorial/examples/image_plain.cc
b/milena/doc/tutorial/examples/image_plain.cc
index 94ad5c6..4bfdf79 100644
--- a/milena/doc/tutorial/examples/image_plain.cc
+++ b/milena/doc/tutorial/examples/image_plain.cc
@@ -2,7 +2,7 @@
# include <mln/core/image/plain.hh>
# include <mln/debug/println.hh>
# include <mln/debug/iota.hh>
-# include <mln/level/fill_with_value.hh>
+# include <mln/data/fill_with_value.hh>
# include <mln/opt/at.hh>
@@ -36,7 +36,7 @@ int main()
debug::println(ima);
image2d<I_> mos(2, 2);
- level::fill_with_value(mos, ima);
- level::fill_with_value(opt::at(mos, 1,1), 0);
+ data::fill_with_value(mos, ima);
+ data::fill_with_value(opt::at(mos, 1,1), 0);
picture(mos);
}
diff --git a/milena/doc/tutorial/examples/sub_image.cc
b/milena/doc/tutorial/examples/sub_image.cc
index 533ffe7..0321d30 100644
--- a/milena/doc/tutorial/examples/sub_image.cc
+++ b/milena/doc/tutorial/examples/sub_image.cc
@@ -6,7 +6,7 @@
# include <mln/debug/println.hh>
# include <mln/morpho/elementary/gradient.hh>
-# include <mln/level/fill_with_value.hh>
+# include <mln/data/fill_with_value.hh>
int main()
@@ -22,7 +22,7 @@ int main()
debug::println(sub);
debug::println(morpho::elementary::gradient(sub, c4()));
- level::fill_with_value((ima | box2d(2,3)).rw(), 0);
+ data::fill_with_value((ima | box2d(2,3)).rw(), 0);
debug::println(ima);
trait::image::print(sub);
diff --git a/milena/doc/tutorial/samples/fill-call-1.cc
b/milena/doc/tutorial/samples/fill-call-1.cc
index d41a5d9..1afba03 100644
--- a/milena/doc/tutorial/samples/fill-call-1.cc
+++ b/milena/doc/tutorial/samples/fill-call-1.cc
@@ -8,11 +8,11 @@ int main()
// \}
// \{
- level::fill(imga, 'a');
+ data::fill(imga, 'a');
// \}
// \{
- level::fill((imga | box2d(1,2)).rw(), 'a');
+ data::fill((imga | box2d(1,2)).rw(), 'a');
// \}
}
diff --git a/milena/doc/tutorial/samples/fill-part-image.cc
b/milena/doc/tutorial/samples/fill-part-image.cc
index 0c90f35..e3ad3a2 100644
--- a/milena/doc/tutorial/samples/fill-part-image.cc
+++ b/milena/doc/tutorial/samples/fill-part-image.cc
@@ -29,13 +29,13 @@ int main()
// contained in arr and fill these ones
// with 0.
// We must call "rw()" here.
- level::fill((ima | arr).rw(), 0);
+ data::fill((ima | arr).rw(), 0);
debug::println((ima | arr));
mln_VAR(ima2, ima | arr);
// We do not need to call "rw()" here.
- level::fill(ima2, 0);
+ data::fill(ima2, 0);
// \}
debug::println(ima2);
diff --git a/milena/doc/tutorial/samples/fill-subdomain-shorter.cc
b/milena/doc/tutorial/samples/fill-subdomain-shorter.cc
index 7526682..fc4d725 100644
--- a/milena/doc/tutorial/samples/fill-subdomain-shorter.cc
+++ b/milena/doc/tutorial/samples/fill-subdomain-shorter.cc
@@ -26,8 +26,8 @@ int main()
image2d<rgb8> ima2;
initialize(ima2, ima);
- level::fill(ima2, literal::black);
+ data::fill(ima2, literal::black);
- level::fill((ima2 | (pw::value(lab) == pw::cst(2u))).rw(), literal::red);
+ data::fill((ima2 | (pw::value(lab) == pw::cst(2u))).rw(), literal::red);
// \}
}
diff --git a/milena/doc/tutorial/samples/fill-subdomain.cc
b/milena/doc/tutorial/samples/fill-subdomain.cc
index efe8d58..a5ec65e 100644
--- a/milena/doc/tutorial/samples/fill-subdomain.cc
+++ b/milena/doc/tutorial/samples/fill-subdomain.cc
@@ -36,8 +36,8 @@ int main()
image2d<label_8> tmp;
initialize(tmp, lbl);
- level::fill(tmp, 0);
- level::fill((tmp | lbl_2.domain()).rw(), 1);
+ data::fill(tmp, 0);
+ data::fill((tmp | lbl_2.domain()).rw(), 1);
doc::ppmsave(debug::colorize(rgb8(), tmp, 1), "fill-subdomain");
// Create a black image from ima.
@@ -45,9 +45,9 @@ int main()
// \{
image2d<rgb8> ima2;
initialize(ima2, ima);
- level::fill(ima2, literal::black);
+ data::fill(ima2, literal::black);
- level::fill((ima2 | lbl_2.domain()).rw(), literal::red);
+ data::fill((ima2 | lbl_2.domain()).rw(), literal::red);
// \}
doc::ppmsave(ima2, "fill-subdomain");
diff --git a/milena/doc/tutorial/samples/fill-subimage-cfun.cc
b/milena/doc/tutorial/samples/fill-subimage-cfun.cc
index 6f3a4dd..2ff6c6c 100644
--- a/milena/doc/tutorial/samples/fill-subimage-cfun.cc
+++ b/milena/doc/tutorial/samples/fill-subimage-cfun.cc
@@ -30,9 +30,9 @@ int main()
// \{
image2d<rgb8> ima2;
initialize(ima2, ima);
- level::fill(ima2, literal::black);
+ data::fill(ima2, literal::black);
- level::fill((ima2 | row_oddity).rw(), literal::red);
+ data::fill((ima2 | row_oddity).rw(), literal::red);
// \}
doc::ppmsave(ima2, "fill-subimage-cfun");
diff --git a/milena/doc/tutorial/samples/ima2d-7.cc
b/milena/doc/tutorial/samples/ima2d-7.cc
index d15d3b9..3f4cd35 100644
--- a/milena/doc/tutorial/samples/ima2d-7.cc
+++ b/milena/doc/tutorial/samples/ima2d-7.cc
@@ -8,6 +8,6 @@ int main()
image2d<value::int_u8> img2b;
initialize(img2b, img2a);
- level::fill(img2b, img2a);
+ data::fill(img2b, img2a);
// \}
}
diff --git a/milena/doc/tutorial/samples/ima2d-rot.cc
b/milena/doc/tutorial/samples/ima2d-rot.cc
index 84cd1ad..6463a5c 100644
--- a/milena/doc/tutorial/samples/ima2d-rot.cc
+++ b/milena/doc/tutorial/samples/ima2d-rot.cc
@@ -12,14 +12,14 @@ int main()
// Declare the image to be rotated.
image2d<value::rgb8> ima1_(220, 220);
- level::fill(ima1_, literal::cyan);
+ data::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);
+ data::fill(ima2, literal::cyan);
border::fill(ima2, literal::yellow);
box2d extended_domain= ima1.domain();
diff --git a/milena/doc/tutorial/samples/paste-call-1.cc
b/milena/doc/tutorial/samples/paste-call-1.cc
index 88d4f88..01a8bc5 100644
--- a/milena/doc/tutorial/samples/paste-call-1.cc
+++ b/milena/doc/tutorial/samples/paste-call-1.cc
@@ -9,10 +9,10 @@ int main()
image2d<unsigned char> imga(imgb.domain());
// Initialize the image values.
- level::fill(imgb, 'b');
+ data::fill(imgb, 'b');
// Paste the content of imgb in imga.
- level::paste(imgb, imga);
+ data::paste(imgb, imga);
debug::println(imga);
// \}
diff --git a/milena/doc/tutorial/tutorial.tex b/milena/doc/tutorial/tutorial.tex
index f8e758b..a2affa1 100644
--- a/milena/doc/tutorial/tutorial.tex
+++ b/milena/doc/tutorial/tutorial.tex
@@ -1031,7 +1031,7 @@ Sometimes, you may want to initialize an image from another one:
\var{img2b} is declared without specifying a domain. Its border size is set to
the default one, e.g 0. By using \code{initialize} \var{img2b} is initialized
with the same domain and border/extension as \var{img2a}. The data is not
- copied though. Other routines like \code{level::fill} can be called in order to
+ copied though. Other routines like \code{data::fill} can be called in order to
do so (See also \doxyref{fillop}).
@@ -1405,7 +1405,7 @@ passed as parameter. These macros can be used with any container
like images or
site sets.
Here follow an example with the implemantions of the most basic routines which
-use the \code{for\_all} loop: \code{level::fill()} and \code{level::paste()}.
+use the \code{for\_all} loop: \code{data::fill()} and \code{data::paste()}.
\doxycode{fill}
@@ -1474,9 +1474,9 @@ Routine name & Description \\ \hline
level::clone() & creates a deep copy of an object. Any shared data is
duplicated. \\
-level::fill() & fill an object with a value. \\
+data::fill() & fill an object with a value. \\
-level::paste() & paste object data to another object. \\
+data::paste() & paste object data to another object. \\
labeling::blobs() & find and label the different components of an image. \\
@@ -1497,17 +1497,17 @@ have not been initialized yet. So we fill \var{imga} with the
value 'a':
\doxycode[2]{fill-call-1}
-The ``\code{fill}'' algorithm is located in the sub-namespace
"\namespace{mln::level}" since this
-algorithm deals with the ``level'' of site values.
+The ``\code{fill}'' algorithm is located in the sub-namespace
"\namespace{mln::data}" since this
+algorithm deals with the site values.
Note that the term "level" refers to the fact that an image can be considered
as
a landscape where the elevation at a particular location/site is given by
the corresponding site value.
-The full name of this routine is ``\namespace{mln::level::fill}''.
+The full name of this routine is ``\namespace{mln::data::fill}''.
To access to a particular algorithm, the proper file shall be included.
The file names of algorithms strictly map their C++ name; so
-\namespace{mln::level::fill} is defined in the file \header{mln/level/fill.hh}.
+\namespace{mln::data::fill} is defined in the file \header{mln/data/fill.hh}.
%----------------
\subsection*{Note}
@@ -1515,7 +1515,7 @@ Most algorithms in Olena are constructed following the classical
scheme: "output
algo(input)", where the input image is only read. However some few algorithms
take an input image in order to modify it. To enforce this particular feature,
the user shall explicitly state that the image is provided so that its data is
-modified "read/write". The algorithm call shall be
``\code{level::fill(ima.rw(),
+modified "read/write". The algorithm call shall be
``\code{data::fill(ima.rw(),
val)}''. When forgetting the ``\code{rw()}'' call it does not compile.
\doxycode[3]{fill-call-1}
@@ -1551,7 +1551,7 @@ Gives:
The notion of site sets plays an important role in Olena. Many tests are
performed at run-time to ensure that the program is correct.
-For instance, the algorithm level::paste tests that the set of sites of imgb
+For instance, the algorithm data::paste tests that the set of sites of imgb
(whose values are to be pasted) is a subset of the destination image.
--
1.5.6.5