
* doc/examples/erosion.cc, * doc/examples/labeling_algo.cc, * doc/examples/tuto_bis.cc, * doc/oldies/2008__tour1.cc, * doc/oldies/2008__tour3.cc, * doc/tutorial/examples/box.cc, * doc/tutorial/examples/for_Z.cc, * doc/tutorial/examples/image_safe.cc, * doc/tutorial/examples/p_array.2.cc, * doc/tutorial/examples/p_array.cc, * doc/tutorial/examples/p_image.cc, * doc/tutorial/examples/p_key.cc, * doc/tutorial/examples/p_line2d.cc, * doc/tutorial/examples/p_queue.cc, * doc/tutorial/examples/p_vaccess.cc, * doc/tutorial/examples/proxy.cc, * doc/tutorial/examples/sub_image_if.cc, * tools/seed2tiling.cc: update --- milena/ChangeLog | 23 ++++++++++++++++++++++ milena/doc/examples/erosion.cc | 6 +--- milena/doc/examples/labeling_algo.cc | 4 +- milena/doc/examples/tuto_bis.cc | 16 +++++++------- milena/doc/oldies/2008__tour1.cc | 27 ++++++++++--------------- milena/doc/oldies/2008__tour3.cc | 4 +- milena/doc/tutorial/examples/box.cc | 4 +- milena/doc/tutorial/examples/for_Z.cc | 6 ++-- milena/doc/tutorial/examples/image_safe.cc | 8 +++--- milena/doc/tutorial/examples/p_array.2.cc | 6 ++-- milena/doc/tutorial/examples/p_array.cc | 4 +- milena/doc/tutorial/examples/p_image.cc | 4 +- milena/doc/tutorial/examples/p_key.cc | 4 +- milena/doc/tutorial/examples/p_line2d.cc | 6 ++-- milena/doc/tutorial/examples/p_queue.cc | 4 +- milena/doc/tutorial/examples/p_vaccess.cc | 14 ++++++------ milena/doc/tutorial/examples/proxy.cc | 4 +- milena/doc/tutorial/examples/sub_image_if.cc | 4 +- milena/tools/seed2tiling.cc | 9 +++---- 19 files changed, 86 insertions(+), 71 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 5936533..c713b83 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,28 @@ 2008-12-29 Guillaume Lazzara <z@lrde.epita.fr> + Propagate renaming level::fill/paste as data::fill/paste (again). + + * doc/examples/erosion.cc, + * doc/examples/labeling_algo.cc, + * doc/examples/tuto_bis.cc, + * doc/oldies/2008__tour1.cc, + * doc/oldies/2008__tour3.cc, + * doc/tutorial/examples/box.cc, + * doc/tutorial/examples/for_Z.cc, + * doc/tutorial/examples/image_safe.cc, + * doc/tutorial/examples/p_array.2.cc, + * doc/tutorial/examples/p_array.cc, + * doc/tutorial/examples/p_image.cc, + * doc/tutorial/examples/p_key.cc, + * doc/tutorial/examples/p_line2d.cc, + * doc/tutorial/examples/p_queue.cc, + * doc/tutorial/examples/p_vaccess.cc, + * doc/tutorial/examples/proxy.cc, + * doc/tutorial/examples/sub_image_if.cc, + * tools/seed2tiling.cc: update + +2008-12-29 Guillaume Lazzara <z@lrde.epita.fr> + Add forward declarations for all init_() functions. * core/routine/init.hh: include init.hxx. diff --git a/milena/doc/examples/erosion.cc b/milena/doc/examples/erosion.cc index 8d0d51c..7903f6e 100644 --- a/milena/doc/examples/erosion.cc +++ b/milena/doc/examples/erosion.cc @@ -39,7 +39,6 @@ # include <mln/binarization/threshold.hh> # include <mln/morpho/hit_or_miss.hh> -# include <mln/level/fill.hh> # include <mln/border/fill.hh> # include <mln/io/pbm/load.hh> # include <mln/io/pgm/load.hh> @@ -49,9 +48,8 @@ # include <mln/morpho/opening.hh> # include <mln/trait/value_.hh> # include <mln/value/int_u8.hh> -# include <mln/level/paste.hh> +# include <mln/data/paste.hh> # include <mln/labeling/blobs.hh> -# include <mln/level/fill.hh> # include <mln/pw/all.hh> # include <mln/convert/to_fun.hh> # include <mln/geom/bbox.hh> @@ -69,7 +67,7 @@ void clean_lines(mln::image2d<bool>& in, for (unsigned i = nlabels; i > 0; --i) { - level::paste(pw::cst(false) + data::paste(pw::cst(false) | geom::bbox(lbl | (pw::value(lbl) == pw::cst(i))),//.to_larger(bbox_larger), in); } diff --git a/milena/doc/examples/labeling_algo.cc b/milena/doc/examples/labeling_algo.cc index 6cf27b0..3891e36 100644 --- a/milena/doc/examples/labeling_algo.cc +++ b/milena/doc/examples/labeling_algo.cc @@ -33,7 +33,7 @@ # include <mln/core/image/sub_image.hh> # include <mln/core/alias/neighb2d.hh> # include <mln/value/int_u8.hh> -# include <mln/level/fill.hh> +# include <mln/data/fill.hh> # include <mln/level/stretch.hh> # include <mln/border/fill.hh> # include <mln/io/pbm/load.hh> @@ -60,7 +60,7 @@ int main() std::vector<int_u8> vec; image2d<int> input(in.domain()); - level::fill(input, lab); + data::fill(input, lab); opt::at(lab, 0,0) = 0; image2d<unsigned> inte = geom::seeds2tiling(lab, c4 ()); diff --git a/milena/doc/examples/tuto_bis.cc b/milena/doc/examples/tuto_bis.cc index 3dd2c09..bfacf7d 100644 --- a/milena/doc/examples/tuto_bis.cc +++ b/milena/doc/examples/tuto_bis.cc @@ -18,8 +18,8 @@ # include <mln/fun/i2v/array.hh> # include <mln/fun/p2v/iota.hh> -# include <mln/level/paste.hh> -# include <mln/level/fill.hh> +# include <mln/data/paste.hh> +# include <mln/data/fill.hh> # include <mln/level/transform.hh> # include <mln/extension/fill.hh> @@ -144,7 +144,7 @@ int main() mln_VAR(ima, ima_ | domain); mln_VAR(cell, ima | is_cell); - level::fill(cell, fun::p2v::iota()); + data::fill(cell, fun::p2v::iota()); debug::println(cell); // 1 2 3 // @@ -152,7 +152,7 @@ int main() mln_VAR(edge, extend((ima | is_edge).rw(), ima)); - level::paste(morpho::gradient(edge, e2c.win()), edge); + data::paste(morpho::gradient(edge, e2c.win()), edge); // ^^^ // edge -> neighboring cells debug::println(edge); @@ -161,7 +161,7 @@ int main() // 1 1 image2d<unsigned> label(domain, 0); - level::fill(label, 9); + data::fill(label, 9); debug::println(label); // 9 9 9 9 9 // 9 9 9 9 9 @@ -176,7 +176,7 @@ int main() unsigned nbasins; - level::fill(wst, morpho::meyer_wst(edge, e2e, nbasins)); + data::fill(wst, morpho::meyer_wst(edge, e2e, nbasins)); // ^^^ // edge -> neighboring edges debug::println(wst); @@ -230,7 +230,7 @@ int main() // 9 9 9 - level::paste(morpho::dilation(extend(lab, label), + data::paste(morpho::dilation(extend(lab, label), c4().win()), label); @@ -263,7 +263,7 @@ int main() for (unsigned i = 1; i <= nbasins; ++i) std::cout << "mean value of basin #" << i << " is " << m(i) << std::endl; -// level::fill(cell, level::transform(lab, m)); +// data::fill(cell, level::transform(lab, m)); // debug::println(cell); // // 2 2 2 // // diff --git a/milena/doc/oldies/2008__tour1.cc b/milena/doc/oldies/2008__tour1.cc index 4d148c8..94e8fcb 100644 --- a/milena/doc/oldies/2008__tour1.cc +++ b/milena/doc/oldies/2008__tour1.cc @@ -32,8 +32,8 @@ #include <oln/arith/plus.hh> // arith -#include <oln/level/fill.hh> // level -#include <oln/level/paste.hh> +#include <oln/data/fill.hh> // data +#include <oln/data/paste.hh> #include <oln/debug/println.hh> // debug @@ -166,20 +166,15 @@ int main() // Memory has been allocated so data can be stored but pixel values // have not been initialized yet. So we fill img3a, that is, all // pixels of img3a, with the value 'a': - level::fill(img3a, 'a'); + data::fill(img3a, 'a'); - // The "fill" algorithm is located in the sub-namespace "level" - // since this algorithm deals with the "level" of pixel values. + // The "fill" algorithm is located in the sub-namespace "data" + // since this algorithm deals with the "data" of pixel 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/point is given by the - // corresponding pixel value. - - // The full name of this routine is "oln::level::fill". To access + // The full name of this routine is "oln::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 - // oln::level::fill is defined in the file "oln/level/fill.hh". + // oln::data::fill is defined in the file "oln/data/fill.hh". // Most algorithms in Olena are constructed following the classical // scheme: "output algo(input)", where the input image is only read. @@ -190,7 +185,7 @@ int main() // Obsolete: explicitly state that the image is provided so that its data is // Obsolete: modified "inplace". - // Obsolete: The algorithm call shall be "level::fill(inplace(ima), val)". + // Obsolete: The algorithm call shall be "data::fill(inplace(ima), val)". // Obsolete: When forgetting the "inplace(..)" statement it does not compile. @@ -201,10 +196,10 @@ int main() image1d<char> img3b(5, 14); // We initialize the image values. - level::fill(img3b, 'b'); + data::fill(img3b, 'b'); // Last we now paste the contents of img3b in img3a... - level::paste(img3b, img3a); + data::paste(img3b, img3a); // ...and print the result. debug::println(img3a); @@ -242,7 +237,7 @@ int main() // tests are performed at run-time to ensure that the program is // correct. - // For instance, the algorithm level::paste tests that the set of + // For instance, the algorithm data::paste tests that the set of // points of img3b (whose values are to be pasted) is a subset of // the destination image. We can reproduce this same test: diff --git a/milena/doc/oldies/2008__tour3.cc b/milena/doc/oldies/2008__tour3.cc index 4c6ef19..7d1f63f 100644 --- a/milena/doc/oldies/2008__tour3.cc +++ b/milena/doc/oldies/2008__tour3.cc @@ -36,7 +36,7 @@ #include <oln/core/gen/pw_value.hh> #include <oln/core/gen/fun_ops.hh> -#include <oln/level/fill.hh> +#include <oln/data/fill.hh> #include <oln/debug/fill.hh> #include <oln/debug/println.hh> @@ -138,7 +138,7 @@ int main() // And now for a little test: what is the result of this code? { image2d<int> test(ima.points()); - level::fill(test, ima); + data::fill(test, ima); (test + c4).at(1, 1) = 9; debug::println(test); } diff --git a/milena/doc/tutorial/examples/box.cc b/milena/doc/tutorial/examples/box.cc index 9d4b9d6..7f92bdc 100644 --- a/milena/doc/tutorial/examples/box.cc +++ b/milena/doc/tutorial/examples/box.cc @@ -1,6 +1,6 @@ # include <mln/core/image/image2d.hh> # include <mln/debug/println.hh> -# include <mln/level/fill.hh> +# include <mln/data/fill.hh> template <typename B> @@ -9,7 +9,7 @@ void picture(const B& b) using namespace mln; image2d<char> ima(5, 5); - level::fill(ima, '-'); + data::fill(ima, '-'); unsigned i = 0; mln_piter(B) p(b); diff --git a/milena/doc/tutorial/examples/for_Z.cc b/milena/doc/tutorial/examples/for_Z.cc index c06fb59..3b34a72 100644 --- a/milena/doc/tutorial/examples/for_Z.cc +++ b/milena/doc/tutorial/examples/for_Z.cc @@ -17,7 +17,7 @@ # include <mln/convert/to_fun.hh> # include <mln/debug/println.hh> # include <mln/labeling/blobs.hh> -# include <mln/level/fill.hh> +# include <mln/data/fill.hh> # include <mln/geom/bbox.hh> @@ -205,9 +205,9 @@ int main() // image2d<rgb8> cool(ima.domain()); -// level::fill(cool, literal::black); +// data::fill(cool, literal::black); -// level::fill( (cool | (pw::value(lab) == 1u)).rw(), +// data::fill( (cool | (pw::value(lab) == 1u)).rw(), // literal::red ); // debug::println(cool); diff --git a/milena/doc/tutorial/examples/image_safe.cc b/milena/doc/tutorial/examples/image_safe.cc index 158b591..ddad1f9 100644 --- a/milena/doc/tutorial/examples/image_safe.cc +++ b/milena/doc/tutorial/examples/image_safe.cc @@ -2,8 +2,8 @@ # include <mln/core/site_set/p_line2d.hh> # include <mln/core/image/safe.hh> # include <mln/debug/println.hh> -# include <mln/level/fill.hh> -# include <mln/level/paste.hh> +# include <mln/data/fill.hh> +# include <mln/data/paste.hh> # include <mln/pw/all.hh> @@ -14,10 +14,10 @@ int main() typedef image2d<int> I; I ima(3, 3); - level::fill(ima, 0); + data::fill(ima, 0); safe_image<I> ima_(ima); - level::paste(pw::cst(8) | p_line2d(point2d(-1,-1), + data::paste(pw::cst(8) | p_line2d(point2d(-1,-1), point2d( 3, 3)), ima_); debug::println(ima); diff --git a/milena/doc/tutorial/examples/p_array.2.cc b/milena/doc/tutorial/examples/p_array.2.cc index 68d3ab2..182e293 100644 --- a/milena/doc/tutorial/examples/p_array.2.cc +++ b/milena/doc/tutorial/examples/p_array.2.cc @@ -3,7 +3,7 @@ # include <mln/core/window.hh> # include <mln/debug/println.hh> -# include <mln/level/fill.hh> +# include <mln/data/fill.hh> template <typename A> @@ -12,8 +12,8 @@ mln::image2d<char> picture(const A& arr) using namespace mln; image2d<char> ima(5, 5); - level::fill(ima, '-'); - + data::fill(ima, '-'); + unsigned i = 0; mln_piter(A) p(arr); for_all(p) diff --git a/milena/doc/tutorial/examples/p_array.cc b/milena/doc/tutorial/examples/p_array.cc index 4a94f9b..3a4186a 100644 --- a/milena/doc/tutorial/examples/p_array.cc +++ b/milena/doc/tutorial/examples/p_array.cc @@ -1,7 +1,7 @@ # include <mln/core/image/image2d.hh> # include <mln/core/site_set/p_array.hh> # include <mln/debug/println.hh> -# include <mln/level/fill.hh> +# include <mln/data/fill.hh> template <typename A> @@ -10,7 +10,7 @@ void picture(const A& arr) using namespace mln; image2d<char> ima(5, 5); - level::fill(ima, '-'); + data::fill(ima, '-'); unsigned i = 0; mln_piter(A) p(arr); diff --git a/milena/doc/tutorial/examples/p_image.cc b/milena/doc/tutorial/examples/p_image.cc index c360293..462ba61 100644 --- a/milena/doc/tutorial/examples/p_image.cc +++ b/milena/doc/tutorial/examples/p_image.cc @@ -2,7 +2,7 @@ # include <mln/core/site_set/p_array.hh> # include <mln/core/site_set/p_image.hh> # include <mln/debug/println.hh> -# include <mln/level/fill.hh> +# include <mln/data/fill.hh> template <typename A> @@ -11,7 +11,7 @@ void picture(const A& arr) using namespace mln; image2d<char> ima(5, 5); - level::fill(ima, '-'); + data::fill(ima, '-'); unsigned i = 0; mln_piter(A) p(arr); diff --git a/milena/doc/tutorial/examples/p_key.cc b/milena/doc/tutorial/examples/p_key.cc index b4292d6..bcf58eb 100644 --- a/milena/doc/tutorial/examples/p_key.cc +++ b/milena/doc/tutorial/examples/p_key.cc @@ -1,7 +1,7 @@ # include <mln/core/image/image2d.hh> # include <mln/core/site_set/p_key.hh> # include <mln/debug/println.hh> -# include <mln/level/fill.hh> +# include <mln/data/fill.hh> # include <mln/fun/v2v/inc.hh> # include <mln/fun/v2v/dec.hh> @@ -13,7 +13,7 @@ void picture(const S& s) using namespace mln; image2d<char> ima(5, 5); - level::fill(ima, '-'); + data::fill(ima, '-'); mln_piter(S) p(s); for_all(p) diff --git a/milena/doc/tutorial/examples/p_line2d.cc b/milena/doc/tutorial/examples/p_line2d.cc index 75bec49..928c908 100644 --- a/milena/doc/tutorial/examples/p_line2d.cc +++ b/milena/doc/tutorial/examples/p_line2d.cc @@ -5,7 +5,7 @@ # include <mln/core/site_set/p_set.hh> # include <mln/core/image/sub_image.hh> -# include <mln/level/fill.hh> +# include <mln/data/fill.hh> # include <mln/debug/println.hh> @@ -15,13 +15,13 @@ int main() using namespace mln; image2d<char> ima(6, 11); - level::fill(ima, '.'); + data::fill(ima, '.'); p_line2d line(point2d(4,10), point2d(1,1)); std::cout << line << std::endl; - level::fill((ima | line).rw(), 'x'); + data::fill((ima | line).rw(), 'x'); debug::println(ima); p_set<point2d> s; diff --git a/milena/doc/tutorial/examples/p_queue.cc b/milena/doc/tutorial/examples/p_queue.cc index 099fa6d..5701961 100644 --- a/milena/doc/tutorial/examples/p_queue.cc +++ b/milena/doc/tutorial/examples/p_queue.cc @@ -2,7 +2,7 @@ # include <mln/core/site_set/p_queue.hh> # include <mln/core/site_set/p_queue_fast.hh> # include <mln/debug/println.hh> -# include <mln/level/fill.hh> +# include <mln/data/fill.hh> # include <mln/core/site_set/p_priority.hh> @@ -14,7 +14,7 @@ void picture(const S& s) using namespace mln; image2d<char> ima(5, 5); - level::fill(ima, '-'); + data::fill(ima, '-'); unsigned i = 0; mln_piter(S) p(s); diff --git a/milena/doc/tutorial/examples/p_vaccess.cc b/milena/doc/tutorial/examples/p_vaccess.cc index 0e0f841..051edfb 100644 --- a/milena/doc/tutorial/examples/p_vaccess.cc +++ b/milena/doc/tutorial/examples/p_vaccess.cc @@ -2,8 +2,8 @@ # include <mln/core/alias/neighb2d.hh> # include <mln/value/int_u8.hh> -# include <mln/level/fill.hh> -# include <mln/level/paste.hh> +# include <mln/data/fill.hh> +# include <mln/data/paste.hh> # include <mln/debug/println.hh> # include <mln/util/timer.hh> # include <mln/labeling/blobs.hh> @@ -121,19 +121,19 @@ int main() { image2d<int> ima_(arr.bbox()); - level::fill(ima_, 0); + data::fill(ima_, 0); for (unsigned l = 1; l <= nlabels; ++l) for (unsigned r = 0; r < arr(l).nelements(); ++r) - level::paste(pw::cst(10 * l + r) | arr(l)[r], ima_); + data::paste(pw::cst(10 * l + r) | arr(l)[r], ima_); debug::println(ima_); } { image2d<int> ima_(arr.bbox()); - level::fill(ima_, 0); + data::fill(ima_, 0); for (unsigned l = 1; l <= nlabels; ++l) if (arr(l).nsites() > 1) - level::paste(pw::cst(l) | arr(l), ima_); + data::paste(pw::cst(l) | arr(l), ima_); debug::println(ima_); } } @@ -144,7 +144,7 @@ int main() // mln_assertion(rs.bbox() == ima.bbox()); // image2d<int_u8> ima_(ima.domain()); -// level::fill(ima_, 0); +// data::fill(ima_, 0); // for (unsigned r = 0; r < rs.nelements(); ++r) // { // mln_piter_(p_run2d) p(rs[r]); diff --git a/milena/doc/tutorial/examples/proxy.cc b/milena/doc/tutorial/examples/proxy.cc index 053a824..0437b1c 100644 --- a/milena/doc/tutorial/examples/proxy.cc +++ b/milena/doc/tutorial/examples/proxy.cc @@ -1,7 +1,7 @@ # include <mln/core/image/image2d.hh> # include <mln/core/site_set/p_array.hh> # include <mln/debug/println.hh> -# include <mln/level/fill.hh> +# include <mln/data/fill.hh> template <typename A> @@ -10,7 +10,7 @@ void picture(const A& arr) using namespace mln; image2d<char> ima(5, 5); - level::fill(ima, '-'); + data::fill(ima, '-'); unsigned i = 0; mln_piter(A) p(arr); diff --git a/milena/doc/tutorial/examples/sub_image_if.cc b/milena/doc/tutorial/examples/sub_image_if.cc index 5bcb740..e5a69f3 100644 --- a/milena/doc/tutorial/examples/sub_image_if.cc +++ b/milena/doc/tutorial/examples/sub_image_if.cc @@ -11,7 +11,7 @@ # include <mln/labeling/blobs.hh> # include <mln/geom/bbox.hh> -# include <mln/level/fill.hh> +# include <mln/data/fill.hh> # include <mln/debug/println.hh> @@ -47,7 +47,7 @@ void foo(const I& input) O output; initialize(output, input); - level::fill(output, 9); + data::fill(output, 9); std::cout << geom::bbox(output) << std::endl; debug::println(output); diff --git a/milena/tools/seed2tiling.cc b/milena/tools/seed2tiling.cc index 4ebda1b..3f4efeb 100644 --- a/milena/tools/seed2tiling.cc +++ b/milena/tools/seed2tiling.cc @@ -36,7 +36,6 @@ # include <mln/core/image/sub_image.hh> # include <mln/core/alias/neighb2d.hh> # include <mln/value/int_u8.hh> -# include <mln/level/fill.hh> # include <mln/level/stretch.hh> # include <mln/border/fill.hh> # include <mln/io/pbm/load.hh> @@ -71,22 +70,22 @@ int main(int argc, char* argv[]) image2d<bool> input = io::pbm::load(argv[1]); { - const w_window2d_int& w_win = make::mk_chamfer_3x3_int<2,3> (); + const w_window2d_int& w_win = make::mk_chamfer_3x3_int<2,3>(); unsigned n; image2d<unsigned> lab = labeling::foreground(input, c4(), n); std::cout << "number of labels = " << n << std::endl; - image2d<unsigned> inte = geom::seeds2tiling(lab, c4 ()); - border::fill (inte, 0); + image2d<unsigned> inte = geom::seeds2tiling(lab, c4()); + border::fill(inte, 0); image2d<int_u8> inte2 = level::stretch(int_u8(), inte); io::pgm::save(inte2, "ima1.pgm"); std::cout << "ima1 generate with seeds2tiling" << std::endl; - inte = geom::seeds2tiling_roundness(lab, w_win, max, c4 ()); + inte = geom::seeds2tiling_roundness(lab, w_win, max, c4()); border::fill(inte, 0); inte2 = level::stretch(int_u8(), inte); -- 1.5.6.5