Commit 8e605358 authored by Roland Levillain's avatar Roland Levillain
Browse files

Do not use mln_VAR in Milena tests, apps and tools.

	* apps/constrained-connectivity/constrained-connectivity.cc,
	* tests/core/image/dmorph/transformed_image.cc,
	* tests/core/image/dmorph/unproject_image.cc,
	* tests/core/image/graph_image.cc,
	* tests/morpho/tree/filter/filter.cc,
	* tests/world/inter_pixel/compute.cc,
	* tests/world/inter_pixel/display_edge.cc:
	Here.
	* tests/core/routine/extend.cc,
	* tests/labeling/foreground.cc,
	* tests/linear/sobel_2d.cc,
	* tests/morpho/elementary/gradient.cc,
	* tests/morpho/elementary/gradient_external.cc,
	* tests/morpho/elementary/gradient_internal.cc,
	* tests/morpho/elementary/laplacian.cc,
	* tests/morpho/skeleton_constrained.cc,
	* tests/morpho/tree/compute_attribute_image.cc,
	* tests/morpho/tree/compute_parent.cc,
	* tests/pw/image.cc,
	* tests/world/inter_pixel/immerse.cc,
	* tools/area_flooding.cc:
	Do not include mln/core/var.hh.
parent 43a7295d
2014-06-19 Roland Levillain <roland@lrde.epita.fr>
Do not use mln_VAR in Milena tests, apps and tools.
* apps/constrained-connectivity/constrained-connectivity.cc,
* tests/core/image/dmorph/transformed_image.cc,
* tests/core/image/dmorph/unproject_image.cc,
* tests/core/image/graph_image.cc,
* tests/morpho/tree/filter/filter.cc,
* tests/world/inter_pixel/compute.cc,
* tests/world/inter_pixel/display_edge.cc:
Here.
* tests/core/routine/extend.cc,
* tests/labeling/foreground.cc,
* tests/linear/sobel_2d.cc,
* tests/morpho/elementary/gradient.cc,
* tests/morpho/elementary/gradient_external.cc,
* tests/morpho/elementary/gradient_internal.cc,
* tests/morpho/elementary/laplacian.cc,
* tests/morpho/skeleton_constrained.cc,
* tests/morpho/tree/compute_attribute_image.cc,
* tests/morpho/tree/compute_parent.cc,
* tests/pw/image.cc,
* tests/world/inter_pixel/immerse.cc,
* tools/area_flooding.cc:
Do not include mln/core/var.hh.
2014-05-23 Roland Levillain <roland@lrde.epita.fr>
 
Help SWIG wrap mln::internal::image_base.
// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2013, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -85,8 +86,6 @@
#include <mln/io/pgm/load.hh>
#include <mln/debug/println.hh>
#include <mln/core/var.hh>
int main(int argc, char* argv[])
{
......@@ -123,7 +122,8 @@ int main(int argc, char* argv[])
debug::println("f:", f);
// Compute the associated line graph gradient.
mln_VAR(g, world::inter_pixel::compute (f, fun::vv2v::diff_abs<int_u8>()));
typedef image_if<image2d<int_u8>, world::inter_pixel::is_separator> g_t;
g_t g = world::inter_pixel::compute (f, fun::vv2v::diff_abs<int_u8>());
debug::println("g:", g);
......@@ -131,7 +131,8 @@ int main(int argc, char* argv[])
typedef morpho::watershed::topo_wst<g_t, world::inter_pixel::dbl_neighb2d> tree_t;
tree_t tree(g, world::inter_pixel::e2e());
tree.go();
mln_VAR(w, morpho::watershed::topological(tree));
typedef image_if<image2d<int_u8>, world::inter_pixel::is_separator> w_t;
w_t w = morpho::watershed::topological(tree);
debug::println("w:", w);
// Computing the set of values of W.
......@@ -145,7 +146,11 @@ int main(int argc, char* argv[])
for (std::set<int_u8>::const_iterator alpha = values.begin();
alpha != values.end(); ++alpha)
{
mln_VAR(alpha_cc, w | (pw::value(w) > pw::cst(*alpha)));
typedef image_if< w_t,
fun::greater_v2b_expr_< pw::value_<w_t>,
pw::cst_<int_u8> > >
alpha_cc_t;
alpha_cc_t alpha_cc = w | (pw::value(w) > pw::cst(*alpha));
std::cout << *alpha << "-cc:" << std::endl;
/* FIXME: There should be variants of debug::println allowing
the user to pass an optional ``support'' larger than the
......@@ -201,7 +206,8 @@ int main(int argc, char* argv[])
mln_ch_value_(w_t, int_u8) max_val =
morpho::tree::compute_attribute_image_from(max_accu, t, init_max_val);
// Attribute image of components' height.
mln_ch_value_(w_t, int_u8) height;
typedef mln_ch_value_(w_t, int_u8) height_t;
height_t height;
initialize(height, w);
for_all(e)
height(e) = max_val(e) - min_val(e);
......@@ -210,9 +216,16 @@ int main(int argc, char* argv[])
// Thresholding W using first integer values with a condition on HEIGHT.
for (unsigned alpha = 0; alpha <= 6; ++alpha)
{
mln_VAR(alpha_alpha_cc,
w | (pw::value(w) > pw::cst(alpha)
|| (pw::value(height) > pw::cst(alpha))));
typedef image_if< w_t,
fun::or__v2b_expr_<
fun::greater_v2b_expr_< pw::value_<w_t>,
pw::cst_<unsigned> >,
fun::greater_v2b_expr_< pw::value_<height_t>,
pw::cst_<unsigned> > > >
alpha_alpha_cc_t;
alpha_alpha_cc_t alpha_alpha_cc =
w | (pw::value(w) > pw::cst(alpha)
|| (pw::value(height) > pw::cst(alpha)));
std::cout << "(" << alpha << ", " << alpha << ")-cc:" << std::endl;
// FIXME: Same remark as above about println.
debug::impl::println(w.unmorph_().domain(), alpha_alpha_cc);
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2014 EPITA Research and Development Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -23,7 +23,6 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
#include <mln/core/var.hh>
#include <mln/core/image/image2d.hh>
#include <mln/fun/p2p/translation.hh>
#include <mln/debug/iota.hh>
......@@ -42,8 +41,10 @@ int main()
debug::iota(ima);
dpoint2d dp(-1,+1);
mln_VAR( ima_, transform_domain( ima,
fun::p2p::translation_t<point2d>(dp) ) );
typedef transformed_image< mln::image2d<int>,
fun::p2p::translation_t<point2d> > ima__t;
ima__t ima_ = transform_domain( ima,
fun::p2p::translation_t<point2d>(dp) );
box2d b_ = geom::bbox(ima_.domain());
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2014 EPITA Research and Development Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -26,7 +26,6 @@
#include <mln/core/image/image1d.hh>
#include <mln/core/image/image2d.hh>
#include <mln/core/image/dmorph/unproject_image.hh>
#include <mln/core/var.hh>
#include <mln/fun/v2v/projection.hh>
......@@ -47,7 +46,10 @@ int main()
fun::v2v::projection<point2d, 0> f;
mln_VAR( ima_, unproject(ima, make::box2d(3, 3), f) );
typedef unproject_image< image1d<int>,
box2d,
fun::v2v::projection<point2d, 0u> > ima__t;
ima__t ima_ = unproject(ima, make::box2d(3, 3), f);
debug::println(ima_);
ima_(point2d(1,1)) = 9;
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2014 EPITA Research and Development Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -30,7 +30,6 @@
#include <mln/core/image/graph_elt_neighborhood.hh>
#include <mln/core/concept/function.hh>
#include <mln/core/neighb.hh>
#include <mln/core/var.hh>
#include <mln/accu/shape/bbox.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/util/graph.hh>
......@@ -120,7 +119,10 @@ int main()
iota(i) = 10 + i;
// Create graph image.
mln_const_VAR(ima, (iota | pv));
typedef pw::image< fun::i2v::array<unsigned>,
p_vertices< util::graph,
fun::i2v::array<point2d> > > ima_t;
ima_t ima = iota | pv;
{
// FIXME: Move this part to a special test case.
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -23,8 +24,6 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
#include <mln/core/var.hh>
#include <mln/core/image/image2d.hh>
#include <mln/core/image/dmorph/sub_image.hh>
......
// Copyright (C) 2007, 2008, 2009, 2010, 2013 EPITA Research and
// Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2010, 2013, 2014 EPITA Research and
// Development Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -25,7 +25,6 @@
// executable file might be covered by the GNU General Public License.
#include <mln/core/image/image2d.hh>
#include <mln/core/var.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/load.hh>
#include <mln/core/alias/neighb2d.hh>
......
// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2010, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -25,7 +25,6 @@
// executable file might be covered by the GNU General Public License.
#include <mln/core/image/image2d.hh>
#include <mln/core/var.hh>
#include <mln/value/int_u8.hh>
#include <mln/data/stretch.hh>
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -26,7 +27,6 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/image/dmorph/sub_image.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/var.hh>
#include <mln/value/int_u8.hh>
#include <mln/debug/iota.hh>
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -26,7 +27,6 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/image/dmorph/sub_image.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/var.hh>
#include <mln/value/int_u8.hh>
#include <mln/debug/iota.hh>
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -26,7 +27,6 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/image/dmorph/sub_image.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/var.hh>
#include <mln/value/int_u8.hh>
#include <mln/make/image2d.hh>
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -25,7 +26,6 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/var.hh>
#include <mln/value/int_u8.hh>
#include <mln/debug/iota.hh>
......
// Copyright (C) 2008, 2009, 2010, 2011 EPITA Research and Development
// Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2010, 2011, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -26,7 +26,6 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/var.hh>
#include <mln/value/int_u8.hh>
#include <mln/make/dual_neighb.hh>
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -30,7 +31,6 @@
#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
#include <mln/core/var.hh>
#include <mln/morpho/tree/data.hh>
#include <mln/morpho/tree/compute_attribute_image.hh>
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -23,7 +24,6 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
#include <mln/core/var.hh>
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/image/dmorph/image_if.hh>
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2014 EPITA Research and Development Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -25,7 +25,6 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/var.hh>
#include <mln/pw/all.hh>
#include <mln/value/int_u8.hh>
......@@ -68,7 +67,9 @@ int main()
A a = morpho::tree::compute_attribute_image(attribute_t (), tree);
unsigned lambda = 5;
mln_VAR(predicate, pw::value(a) >= pw::cst(lambda));
typedef fun::geq_v2b_expr_< pw::value_<image2d<unsigned> >,
pw::cst_<unsigned> > predicate_t;
predicate_t predicate = pw::value(a) >= pw::cst(lambda);
I ref = morpho::closing::area(input, c4(), lambda);
{
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2014 EPITA Research and Development
// Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -28,7 +29,6 @@
#include <mln/core/alias/box2d.hh>
#include <mln/core/site_set/p_array.hh>
#include <mln/pw/image.hh>
#include <mln/core/var.hh>
int main()
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2014 EPITA Research and Development Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -25,7 +25,6 @@
#include <cmath>
#include <mln/core/var.hh>
#include <mln/core/image/image2d.hh>
#include <mln/data/compare.hh>
#include <mln/world/inter_pixel/immerse.hh>
......@@ -74,7 +73,8 @@ int main()
mln_assertion(compute(imax, d) == (make::image2d(refs) | is_separator()));
mln_VAR(g, compute(imax, d));
typedef image_if<image2d<int>, world::inter_pixel::is_separator> g_t;
g_t g = compute(imax, d);
unsigned n_basins;
debug::println(morpho::watershed::flooding(g, e2e(), n_basins));
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2014 EPITA Research and Development Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -23,7 +23,6 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
#include <mln/core/var.hh>
#include <mln/core/image/image2d.hh>
#include <mln/data/compare.hh>
#include <mln/world/inter_pixel/immerse.hh>
......@@ -62,18 +61,18 @@ int main()
typedef image_if<I, is_pixel> Ix;
Ix imax = immerse(ima);
mln_VAR(g, compute(imax, d));
image_if<I, is_separator> g = compute(imax, d);
std::cout << g.unmorph_().bbox() << std::endl;
mln_VAR(out1, display_edge(g.unmorph_(), 0, 1));
I out1 = display_edge(g.unmorph_(), 0, 1);
debug::println(out1);
mln_VAR(out2, display_edge(g.unmorph_(), 0, 2));
I out2 = display_edge(g.unmorph_(), 0, 2);
debug::println(out2);
mln_VAR(out3, display_edge(g.unmorph_(), 0, 3));
I out3 = display_edge(g.unmorph_(), 0, 3);
debug::println(out3);
mln_VAR(out4, display_edge(g.unmorph_(), 0, 4));
I out4 = display_edge(g.unmorph_(), 0, 4);
debug::println(out4);
mln_VAR(out5, display_edge(g.unmorph_(), 0, 5));
I out5 = display_edge(g.unmorph_(), 0, 5);
debug::println(out5);
}
......@@ -88,18 +87,18 @@ int main()
typedef image_if<I, is_pixel> Ix;
Ix imax = immerse(ima);
mln_VAR(g, compute(imax, d));
image_if<I, is_separator> g = compute(imax, d);
std::cout << g.unmorph_().bbox() << std::endl;
mln_VAR(out1, display_edge(g.unmorph_(), 0, 1));
I out1 = display_edge(g.unmorph_(), 0, 1);
debug::println(out1);
mln_VAR(out2, display_edge(g.unmorph_(), 0, 2));
I out2 = display_edge(g.unmorph_(), 0, 2);
debug::println(out2);
mln_VAR(out3, display_edge(g.unmorph_(), 0, 3));
I out3 = display_edge(g.unmorph_(), 0, 3);
debug::println(out3);
mln_VAR(out4, display_edge(g.unmorph_(), 0, 4));
I out4 = display_edge(g.unmorph_(), 0, 4);
debug::println(out4);
mln_VAR(out5, display_edge(g.unmorph_(), 0, 5));
I out5 = display_edge(g.unmorph_(), 0, 5);
debug::println(out5);
}
}
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2014 EPITA Research and Development Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -23,7 +23,6 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
#include <mln/core/var.hh>
#include <mln/core/image/image2d.hh>
#include <mln/data/compare.hh>
#include <mln/world/inter_pixel/immerse.hh>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment