3771: Fix missing files and tests in world inter-pixel.

https://svn.lrde.epita.fr/svn/oln/trunk/milena Index: ChangeLog from Thierry Geraud <thierry.geraud@lrde.epita.fr> Fix missing files and tests in world inter-pixel. * mln/world/inter_pixel/all.hh: New. * mln/world/inter_pixel/dim2/all.hh: Fix copyright. * mln/world/all.hh: New. * mln/all.hh: Update. * tests/world/inter_pixel/is_separator.cc: New. * tests/world/inter_pixel/is_pixel.cc: New. * tests/world/inter_pixel/Makefile.am: Update. * tests/world/inter_pixel/separator_to_pixels.cc: New. * mln/world/inter_pixel/make: Remove; useless. * tests/world/inter_pixel/image2full.cc: Remove; new stuff is... * tests/world/inter_pixel/immerse.hh: ...this. mln/all.hh | 1 mln/world/all.hh | 41 ++++++++++++++++++ mln/world/inter_pixel/all.hh | 47 ++++++++++++++++++++ mln/world/inter_pixel/dim2/all.hh | 6 +- tests/world/inter_pixel/Makefile.am | 12 ++++- tests/world/inter_pixel/is_pixel.cc | 46 ++++++++++++++++++++ tests/world/inter_pixel/is_separator.cc | 47 ++++++++++++++++++++ tests/world/inter_pixel/separator_to_pixels.cc | 56 +++++++++++++++++++++++++ 8 files changed, 250 insertions(+), 6 deletions(-) Index: mln/world/inter_pixel/all.hh --- mln/world/inter_pixel/all.hh (revision 0) +++ mln/world/inter_pixel/all.hh (revision 0) @@ -0,0 +1,47 @@ +// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// +// This file is part of the Olena Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License version 2 as published by the +// Free Software Foundation. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING. If not, write to +// the Free Software Foundation, 51 Franklin Street, Fifth Floor, +// Boston, MA 02111-1307, USA. +// +// As a special exception, you may use this file as part of a free +// software library without restriction. Specifically, if other files +// instantiate templates or use macros or inline functions from this +// file, or you compile this file and link it with other files to +// produce an executable, this file does not by itself cause the +// resulting executable to be covered by the GNU General Public +// License. This exception does not however invalidate any other +// reasons why the executable file might be covered by the GNU General +// Public License. + +#ifndef MLN_WORLD_INTER_PIXEL_ALL_HH +# define MLN_WORLD_INTER_PIXEL_ALL_HH + +/// \file mln/world/inter_pixel/all.hh +/// +/// File that includes all the inter-pixel routines. + + +// Sub-directories. +# include <mln/world/inter_pixel/dim2/all.hh> + + +# include <mln/world/inter_pixel/compute.hh> +# include <mln/world/inter_pixel/immerse.hh> +# include <mln/world/inter_pixel/is_separator.hh> +# include <mln/world/inter_pixel/is_pixel.hh> +# include <mln/world/inter_pixel/separator_to_pixels.hh> + + +#endif // ! MLN_WORLD_INTER_PIXEL_ALL_HH Index: mln/world/inter_pixel/dim2/all.hh --- mln/world/inter_pixel/dim2/all.hh (revision 3770) +++ mln/world/inter_pixel/dim2/all.hh (working copy) @@ -1,4 +1,5 @@ -// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -30,10 +31,9 @@ /// \file mln/world/inter_pixel/dim2/all.hh /// -/// File that includes all the dim2 routines. +/// File that includes all the inter-pixel 2D routines. -// Local directory. # include <mln/world/inter_pixel/dim2/is_dot.hh> # include <mln/world/inter_pixel/dim2/is_edge.hh> # include <mln/world/inter_pixel/dim2/is_pixel.hh> Index: mln/world/all.hh --- mln/world/all.hh (revision 0) +++ mln/world/all.hh (revision 0) @@ -0,0 +1,41 @@ +// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// +// This file is part of the Olena Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License version 2 as published by the +// Free Software Foundation. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING. If not, write to +// the Free Software Foundation, 51 Franklin Street, Fifth Floor, +// Boston, MA 02111-1307, USA. +// +// As a special exception, you may use this file as part of a free +// software library without restriction. Specifically, if other files +// instantiate templates or use macros or inline functions from this +// file, or you compile this file and link it with other files to +// produce an executable, this file does not by itself cause the +// resulting executable to be covered by the GNU General Public +// License. This exception does not however invalidate any other +// reasons why the executable file might be covered by the GNU General +// Public License. + +#ifndef MLN_WORLD_ALL_HH +# define MLN_WORLD_ALL_HH + +/// \file mln/world/all.hh +/// +/// File that includes all the world routines. + + +// Sub-directories. +# include <mln/world/binary_2d/all.hh> +# include <mln/world/inter_pixel/all.hh> + + +#endif // ! MLN_WORLD_ALL_HH Index: mln/all.hh --- mln/all.hh (revision 3770) +++ mln/all.hh (working copy) @@ -72,6 +72,7 @@ #include <mln/util/all.hh> #include <mln/value/all.hh> #include <mln/win/all.hh> +#include <mln/world/all.hh> #include <mln/essential/1d.hh> #include <mln/essential/2d.hh> Index: tests/world/inter_pixel/is_separator.cc --- tests/world/inter_pixel/is_separator.cc (revision 0) +++ tests/world/inter_pixel/is_separator.cc (revision 0) @@ -0,0 +1,47 @@ +// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// +// This file is part of the Olena Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License version 2 as published by the +// Free Software Foundation. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING. If not, write to +// the Free Software Foundation, 51 Franklin Street, Fifth Floor, +// Boston, MA 02111-1307, USA. +// +// As a special exception, you may use this file as part of a free +// software library without restriction. Specifically, if other files +// instantiate templates or use macros or inline functions from this +// file, or you compile this file and link it with other files to +// produce an executable, this file does not by itself cause the +// resulting executable to be covered by the GNU General Public +// License. This exception does not however invalidate any other +// reasons why the executable file might be covered by the GNU General +// Public License. + +/// \file tests/world/inter_pixel/is_separator.cc +/// +/// Tests on mln::world::inter_pixel::is_separator. + +#include <mln/core/alias/point2d.hh> +#include <mln/world/inter_pixel/is_separator.hh> + + +int main() +{ + using namespace mln; + using namespace world::inter_pixel; + + point2d p00(0, 0), p01(0, 1), p10(1, 0), p11(1, 1); + + mln_assertion(! is_separator()(p00)); + mln_assertion( is_separator()(p01)); + mln_assertion(! is_separator()(p11)); + mln_assertion( is_separator()(p10)); +} Property changes on: tests/world/inter_pixel/is_separator.cc ___________________________________________________________________ Added: svn:mergeinfo Index: tests/world/inter_pixel/is_pixel.cc --- tests/world/inter_pixel/is_pixel.cc (revision 0) +++ tests/world/inter_pixel/is_pixel.cc (revision 0) @@ -0,0 +1,46 @@ +// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// +// This file is part of the Olena Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License version 2 as published by the +// Free Software Foundation. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING. If not, write to +// the Free Software Foundation, 51 Franklin Street, Fifth Floor, +// Boston, MA 02111-1307, USA. +// +// As a special exception, you may use this file as part of a free +// software library without restriction. Specifically, if other files +// instantiate templates or use macros or inline functions from this +// file, or you compile this file and link it with other files to +// produce an executable, this file does not by itself cause the +// resulting executable to be covered by the GNU General Public +// License. This exception does not however invalidate any other +// reasons why the executable file might be covered by the GNU General +// Public License. + +/// \file tests/world/inter_pixel/is_pixel.cc +/// +/// Tests on mln::world::inter_pixel::is_pixel. + +#include <mln/core/alias/point2d.hh> +#include <mln/world/inter_pixel/is_pixel.hh> + + +int main() +{ + using namespace mln; + using namespace world::inter_pixel; + + point2d p00(0, 0), p01(0, 1), p11(1, 1); + + mln_assertion( is_pixel()(p00)); + mln_assertion(! is_pixel()(p01)); + mln_assertion(! is_pixel()(p11)); +} Index: tests/world/inter_pixel/Makefile.am --- tests/world/inter_pixel/Makefile.am (revision 3770) +++ tests/world/inter_pixel/Makefile.am (working copy) @@ -6,10 +6,16 @@ dim2 check_PROGRAMS = \ - image2full \ - immerse + compute \ + immerse \ + is_pixel \ + is_separator \ + separator_to_pixels -image2full_SOURCES = image2full.cc +compute_SOURCES = compute.cc immerse_SOURCES = immerse.cc +is_pixel_SOURCES = is_pixel.cc +is_separator_SOURCES = is_separator.cc +separator_to_pixels_SOURCES = separator_to_pixels.cc TESTS = $(check_PROGRAMS) Index: tests/world/inter_pixel/separator_to_pixels.cc --- tests/world/inter_pixel/separator_to_pixels.cc (revision 0) +++ tests/world/inter_pixel/separator_to_pixels.cc (revision 0) @@ -0,0 +1,56 @@ +// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// +// This file is part of the Olena Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License version 2 as published by the +// Free Software Foundation. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING. If not, write to +// the Free Software Foundation, 51 Franklin Street, Fifth Floor, +// Boston, MA 02111-1307, USA. +// +// As a special exception, you may use this file as part of a free +// software library without restriction. Specifically, if other files +// instantiate templates or use macros or inline functions from this +// file, or you compile this file and link it with other files to +// produce an executable, this file does not by itself cause the +// resulting executable to be covered by the GNU General Public +// License. This exception does not however invalidate any other +// reasons why the executable file might be covered by the GNU General +// Public License. + +/// \file tests/world/inter_pixel/separator_to_pixels.cc +/// +/// Tests on mln::world::inter_pixel::separator_to_pixels. + +#include <mln/core/alias/point2d.hh> +#include <mln/world/inter_pixel/separator_to_pixels.hh> + + +int main() +{ + using namespace mln; + using namespace world::inter_pixel; + + point2d + p00(0, 0), p01(0, 1), p02(0, 2), + p10(1, 0), + p20(2, 0); + + { + point2d p00_, p02_; + separator_to_pixels(p01, p00_, p02_); + mln_assertion(p00_ == p00 && p02_ == p02); + } + { + point2d p00_, p20_; + separator_to_pixels(p10, p00_, p20_); + mln_assertion(p00_ == p00 && p20_ == p20); + } +}
participants (1)
-
Thierry Geraud