Commit bec6f7e0 authored by Thierry Geraud's avatar Thierry Geraud
Browse files

Bug fixes.

	* mln/core/image/plain.hh (trait): Fix speed.
	* mln/morpho/reconstruction/by_dilation/union_find.hh:
	Fix missing include.
	(is_proc): Move into code.
	* tests/io/magick/magick.cc: Rename as...
	* tests/io/magick/load.cc: ...this since it tests 'load'.
	(include): Fix missing.
	Cleanup code.
	* tests/io/magick/Makefile.am: Update.


git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@3793 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent b0e7fdd4
2009-05-15 Thierry Geraud <thierry.geraud@lrde.epita.fr>
Bug fixes.
* mln/core/image/plain.hh (trait): Fix speed.
* mln/morpho/reconstruction/by_dilation/union_find.hh:
Fix missing include.
(is_proc): Move into code.
* tests/io/magick/magick.cc: Rename as...
* tests/io/magick/load.cc: ...this since it tests 'load'.
(include): Fix missing.
Cleanup code.
* tests/io/magick/Makefile.am: Update.
2009-05-14 Guillaume Sadegh <sadegh@lrde.epita.fr>
 
Add breadth first search canvas for graphs.
......@@ -66,8 +66,9 @@ namespace mln
template <typename I>
struct image_< plain<I> > : image_< I > // Same as I except...
{
// ...this change.
// ...these changes:
typedef trait::image::category::identity_morpher category;
typedef mln_internal_trait_image_speed_from(I) speed; // Un-fastest.
};
} // end of namespace mln::trait
......
......@@ -32,6 +32,7 @@
# include <vector>
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
# include <mln/data/fill.hh>
# include <mln/level/compare.hh>
# include <mln/level/sort_psites.hh>
......@@ -89,14 +90,6 @@ namespace mln
}
// template <typename P>
// inline
// bool is_proc(const P& n, const P& p) const
// {
// return g(n) > g(p) or (g(n) == g(p) &&
// util::ord_strict(n, p));
// }
template <typename Par>
inline
......@@ -147,7 +140,7 @@ namespace mln
// Initialization.
{
initialize(output, f);
data::paste(f, output);
data::fill(output, f);
initialize(parent, f);
initialize(deja_vu, f);
data::fill(deja_vu, false);
......@@ -164,8 +157,11 @@ namespace mln
mln_niter(N) n(nbh, p);
for_all(n)
{
// if (f.domain().has(n))
// mln_invariant(deja_vu(n) == is_proc(n, p));
// if (f.domain().has(n))
// mln_invariant(deja_vu(n)
// ==
// (g(n) > g(p) || (g(n) == g(p)
// && util::ord_strict(n, p))));
if (f.domain().has(n) && deja_vu(n))
{
// Do-Union.
......
......@@ -3,8 +3,8 @@
include $(top_srcdir)/milena/tests/tests.mk
check_PROGRAMS = \
magick
load
magick_SOURCES = magick.cc
load_SOURCES = load.cc
TESTS = $(check_PROGRAMS)
......@@ -25,36 +25,30 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
/// \file tests/io/magick/magick.cc
/// \file tests/io/magick/load.cc
///
/// Test on mln::io::magick::*.
/// Test on mln::io::magick::load.
#include <mln/core/image/image2d.hh>
#include <mln/io/magick/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/value/rgb8.hh>
#include <mln/io/ppm/load.hh>
#include <mln/level/compare.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
#include <mln/io/magick/load.hh>
#include "tests/data.hh"
#include <mln/debug/println.hh>
int main()
{
using namespace mln;
{
image2d<value::rgb8> lena_im;
io::magick::load(lena_im, "lena.png");
image2d<value::rgb8> lena_ppm;
io::ppm::load(lena_ppm, "lena.ppm");
image2d<value::rgb8> lena_mln;
io::ppm::load(lena_mln, "lena.ppm");
image2d<value::rgb8> lena_png;
io::magick::load(lena_png, "lena.png");
mln_assertion(lena_im.domain() == lena_mln.domain());
mln_assertion(lena_im == lena_mln);
}
mln_assertion(lena_png == lena_ppm);
}
Supports Markdown
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