https://svn.lrde.epita.fr/svn/oln/trunk/milena
This is just a fix. There's still some work to do there (see
https://trac.lrde.org/olena/ticket/134).
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Have the documentation compile again with parallel builds.
* doc/Makefile.am (html-local, html_user): Fix paths.
(Doxyfile): Likewise.
Use information from Milena's ChangeLog, not from the top-most
ChangeLog.
Makefile.am | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
Index: doc/Makefile.am
--- doc/Makefile.am (revision 1701)
+++ doc/Makefile.am (working copy)
@@ -1,3 +1,5 @@
+# FIXME: To be overhauled! (See ticket #134).
+
DOXYGEN = doxygen
.PHONY: doc user-doc internal-doc html html_user
@@ -10,10 +12,10 @@
html-local: Doxyfile
- $(DOXYGEN) $(srcdir)/Doxyfile_internal
+ $(DOXYGEN) Doxyfile_internal
-html_user:: Doxyfile
- $(DOXYGEN) $(srcdir)/Doxyfile_user
+html_user: Doxyfile
+ $(DOXYGEN) Doxyfile_user
edit = sed -e "s|@ID@|$$Id|" \
@@ -22,6 +24,10 @@
-e 's,@top_builddir\@,$(top_builddir),g' \
-e 's,@top_srcdir\@,$(top_srcdir),g'
+# FIXME: This is not good. We should set these parameters for both
+# documentation (internal and user) using @VARIABLES@. Don't generate
+# Doxyfile_user from Doxyfile_internal! Both should be a product
+# derived from a single source, Doxyfile.in.
edit_user = sed -e 's,OUTPUT_DIRECTORY = ./internal/,OUTPUT_DIRECTORY = ./user/,g' \
-e 's,EXTRACT_ALL = YES,EXTRACT_ALL = NO,g' \
-e 's,EXTRACT_PRIVATE = YES,EXTRACT_PRIVATE = NO,g' \
@@ -44,10 +50,10 @@
# configure, because the former is way faster than the latter.
# Moreover, this file is updated whenever ChangeLog is touched: using
# sed instead of configure saves us a lot of time.
-Doxyfile: $(top_srcdir)/ChangeLog $(srcdir)/Doxyfile.in
- Id=`grep '^\$$Id' $(top_srcdir)/ChangeLog`; \
- $(edit) $(srcdir)/Doxyfile.in >Doxyfile_internal; \
- $(edit_user) $(srcdir)/Doxyfile_internal >Doxyfile_user
+Doxyfile: $(top_srcdir)/milena/ChangeLog $(srcdir)/Doxyfile.in
+ Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog`; \
+ $(edit) $(srcdir)/Doxyfile.in >Doxyfile_internal && \
+ $(edit_user) Doxyfile_internal >Doxyfile_user
clean-local:
rm -rf internal user
https://svn.lrde.epita.fr/svn/oln/trunk/milena
This way we'll keep track of Boost things we depend on, and maybe should
turn into non Boost-dependent ones. We should prevent circumvent the
compilation of Boost-dependent tests is the required Boost libraries are
missing on the host.
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Add a memo file on Boost features used in Milena.
* README.BOOST: New.
README.BOOST | 3 +++
1 file changed, 3 insertions(+)
Index: README.BOOST
--- README.BOOST (revision 0)
+++ README.BOOST (revision 0)
@@ -0,0 +1,3 @@
+Milena components depending on one or several Boost libraries.
+
+- accu::tuple (depends on Boost Tuple and The Boost Preprocessor Library).
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Move convert::to_upper_window into its own file.
* mln/convert/to_window.hh
(convert::to_upper_window(const Neighborhood<N>&)): Move this
function...
* mln/convert/to_upper_window.hh: ...here (new file).
(convert::to_upper_window(const Windows<W>&)): New function.
* mln/canvas/labeling.hh: Adjust.
* mln/labeling/background.hh,
* mln/labeling/blobs.hh,
* mln/labeling/flat_zones.hh,
* mln/labeling/foreground.hh,
* mln/labeling/level.hh,
* mln/labeling/level.spe.hh,
* mln/labeling/regional_maxima.hh,
* mln/labeling/regional_minima.hh:
Adjust comments.
canvas/labeling.hh | 2
convert/to_upper_window.hh | 104 ++++++++++++++++++++++++++++++++++++++++++++
convert/to_window.hh | 22 ---------
labeling/background.hh | 6 --
labeling/blobs.hh | 6 --
labeling/flat_zones.hh | 6 --
labeling/foreground.hh | 6 --
labeling/level.hh | 6 --
labeling/level.spe.hh | 6 --
labeling/regional_maxima.hh | 6 --
labeling/regional_minima.hh | 6 --
11 files changed, 122 insertions(+), 54 deletions(-)
Index: mln/convert/to_window.hh
--- mln/convert/to_window.hh (revision 1697)
+++ mln/convert/to_window.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007 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
@@ -53,10 +53,6 @@
template <typename N>
window<mln_dpoint(N)> to_window(const Neighborhood<N>& nbh);
- /// Convert a neighborhood \p nbh into an upper window.
- template <typename N>
- window<mln_dpoint(N)> to_upper_window(const Neighborhood<N>& nbh);
-
/// Convert a binary image \p ima into a window.
template <typename I>
window<mln_dpoint(I)> to_window(const Image<I>& ima);
@@ -96,22 +92,6 @@
}
// FIXME: Same remark as for to_window(const Neighborhood<N>&)
- template <typename N>
- inline
- window<mln_dpoint(N)> to_upper_window(const Neighborhood<N>& nbh_)
- {
- const N& nbh = exact(nbh_);
- typedef mln_dpoint(N) D;
- typedef mln_point(D) P;
- window<D> win;
- mln_niter(N) n(nbh, P::origin);
- for_all(n)
- if (n > P::origin)
- win.insert(n - P::origin);
- return win;
- }
-
- // FIXME: Same remark as for to_window(const Neighborhood<N>&)
template <typename I>
inline
window<mln_dpoint(I)> to_window(const Image<I>& ima_)
Index: mln/convert/to_upper_window.hh
--- mln/convert/to_upper_window.hh (revision 0)
+++ mln/convert/to_upper_window.hh (revision 0)
@@ -0,0 +1,104 @@
+// Copyright (C) 2007, 2008 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_CONVERT_TO_UPPER_WINDOW_HH
+# define MLN_CONVERT_TO_UPPER_WINDOW_HH
+
+/*! \file mln/convert/to_upper_window.hh
+ *
+ * \brief Conversions to upper mln::window.
+ */
+
+# include <mln/core/concept/delta_point_site.hh>
+# include <mln/core/concept/neighborhood.hh>
+# include <mln/core/window.hh>
+
+
+namespace mln
+{
+
+ namespace convert
+ {
+
+ /// Convert a window \p nbh into an upper window.
+ template <typename W>
+ window<mln_dpoint(W)> to_upper_window(const Window<W>& win);
+
+ /// Convert a neighborhood \p nbh into an upper window.
+ template <typename N>
+ window<mln_dpoint(N)> to_upper_window(const Neighborhood<N>& nbh);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ /* FIXME: According to milena/core/concepts/README, windows are
+ not necessarily based on a set of dpoints. So the current
+ algorithm won't work on non dpoint-set-based windows. In the
+ general case (of windows not being a set of dpoints), the
+ window resulting from this conversion (as well as the iterators
+ based on such windows!) should depend on the initial
+ neighborhood (i.e., delegate the actual iteration to the
+ aggregated neighborhood). When this is fixed, document this in
+ depth in milena/core/concepts/README. */
+ template <typename W>
+ inline
+ window<mln_dpoint(W)> to_upper_window(const Window<W>& win_)
+ {
+ const W& input_win = exact(win_);
+ typedef mln_dpoint(W) D;
+ typedef mln_point(D) P;
+ window<D> win;
+ mln_qiter(W) q(input_win, P::origin);
+ for_all(q)
+ if (q > P::origin)
+ win.insert(q - P::origin);
+ return win;
+ }
+
+ template <typename N>
+ inline
+ window<mln_dpoint(N)> to_upper_window(const Neighborhood<N>& nbh_)
+ {
+ const N& nbh = exact(nbh_);
+ typedef mln_dpoint(N) D;
+ typedef mln_point(D) P;
+ window<D> win;
+ mln_niter(N) n(nbh, P::origin);
+ for_all(n)
+ if (n > P::origin)
+ win.insert(n - P::origin);
+ return win;
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::convert
+
+} // end of namespace mln
+
+
+#endif // ! MLN_CONVERT_TO_WINDOW_HH
Index: mln/canvas/labeling.hh
--- mln/canvas/labeling.hh (revision 1697)
+++ mln/canvas/labeling.hh (working copy)
@@ -36,7 +36,7 @@
# include <mln/core/concept/image.hh>
# include <mln/level/fill.hh>
-# include <mln/convert/to_window.hh> // FIXME: to_upper_window
+# include <mln/convert/to_upper_window.hh>
namespace mln
Index: mln/labeling/blobs.hh
--- mln/labeling/blobs.hh (revision 1697)
+++ mln/labeling/blobs.hh (working copy)
@@ -48,15 +48,13 @@
{
/* FIXME: The neighborhood shall not be passed as argument, but
- bound to the input image. We can also optionnaly provide a
- version of this function for regular-grid-based images where
- the neighborhood is replaced by a (user-provided) window. */
+ bound to the input image. */
/*! Connected component labeling of the binary objects of a binary
* image.
*
* \param[in] input The input image.
- * \param[in] nbh The neighborhood.
+ * \param[in] nbh The connexity of the objects.
* \param[out] nlabels The number of labels.
* \return The label image.
*
Index: mln/labeling/flat_zones.hh
--- mln/labeling/flat_zones.hh (revision 1697)
+++ mln/labeling/flat_zones.hh (working copy)
@@ -45,14 +45,12 @@
{
/* FIXME: The neighborhood shall not be passed as argument, but
- bound to the input image. We can also optionnaly provide a
- version of this function for regular-grid-based images where
- the neighborhood is replaced by a (user-provided) window. */
+ bound to the input image. */
/*! Connected component labeling of the flat zones of an image.
*
* \param[in] input The input image.
- * \param[in] nbh The neighborhood to consider.
+ * \param[in] nbh The connexity of the flat zones.
* \param[out] nlabels The number of labels.
* \return The label image.
*/
Index: mln/labeling/level.hh
--- mln/labeling/level.hh (revision 1697)
+++ mln/labeling/level.hh (working copy)
@@ -51,16 +51,14 @@
{
/* FIXME: The neighborhood shall not be passed as argument, but
- bound to the input image. We can also optionnaly provide a
- version of this function for regular-grid-based images where
- the neighborhood is replaced by a (user-provided) window. */
+ bound to the input image. */
/*! Connected component labeling of the image objects at a given
* level.
*
* \param[in] input The input image.
* \param[in] val The level to consider for the labeling.
- * \param[in] nbh The neighborhood.
+ * \param[in] nbh The connexity of the level components.
* \param[out] nlabels The number of labels.
* \return The label image.
*/
Index: mln/labeling/foreground.hh
--- mln/labeling/foreground.hh (revision 1697)
+++ mln/labeling/foreground.hh (working copy)
@@ -44,15 +44,13 @@
{
/* FIXME: The neighborhood shall not be passed as argument, but
- bound to the input image. We can also optionnaly provide a
- version of this function for regular-grid-based images where
- the neighborhood is replaced by a (user-provided) window. */
+ bound to the input image. */
/*! Connected component labeling of the object part in a binary
* image.
*
* \param[in] input The input image.
- * \param[in] nbh The neighborhood to consider.
+ * \param[in] nbh The connexity of the foreground.
* \param[out] nlabels The number of labels.
* \return The label image.
*
Index: mln/labeling/regional_minima.hh
--- mln/labeling/regional_minima.hh (revision 1697)
+++ mln/labeling/regional_minima.hh (working copy)
@@ -48,15 +48,13 @@
{
/* FIXME: The neighborhood shall not be passed as argument, but
- bound to the input image. We can also optionnaly provide a
- version of this function for regular-grid-based images where
- the neighborhood is replaced by a (user-provided) window. */
+ bound to the input image. */
/*! Connected component labeling of the regional minima of an
* image.
*
* \param[in] input The input image.
- * \param[in] nbh The neighborhood to consider.
+ * \param[in] nbh The connexity of the regional minima.
* \param[out] nlabels The number of labeled regions.
* \return The label image.
*
Index: mln/labeling/regional_maxima.hh
--- mln/labeling/regional_maxima.hh (revision 1697)
+++ mln/labeling/regional_maxima.hh (working copy)
@@ -48,15 +48,13 @@
{
/* FIXME: The neighborhood shall not be passed as argument, but
- bound to the input image. We can also optionnaly provide a
- version of this function for regular-grid-based images where
- the neighborhood is replaced by a (user-provided) window. */
+ bound to the input image. */
/*! Connected component labeling of the regional maxima of an
* image.
*
* \param[in] input The input image.
- * \param[in] nbh The neighborhood to consider.
+ * \param[in] nbh The connexity of the regional maxima.
* \param[out] nlabels The number of labeled regions.
* \return The label image.
*
Index: mln/labeling/level.spe.hh
--- mln/labeling/level.spe.hh (revision 1697)
+++ mln/labeling/level.spe.hh (working copy)
@@ -50,16 +50,14 @@
{
/* FIXME: The neighborhood shall not be passed as argument, but
- bound to the input image. We can also optionnaly provide a
- version of this function for regular-grid-based images where
- the neighborhood is replaced by a (user-provided) window. */
+ bound to the input image. */
/*! Connected component labeling of the image objects at a given
* level.
*
* \param[in] input The input image.
* \param[in] val The level to consider for the labeling.
- * \param[in] nbh The neighborhood.
+ * \param[in] nbh The connexity of the level components.
* \param[out] nlabels The number of labels.
* \return The label image.
*/
Index: mln/labeling/background.hh
--- mln/labeling/background.hh (revision 1697)
+++ mln/labeling/background.hh (working copy)
@@ -44,15 +44,13 @@
{
/* FIXME: The neighborhood shall not be passed as argument, but
- bound to the input image. We can also optionnaly provide a
- version of this function for regular-grid-based images where
- the neighborhood is replaced by a (user-provided) window. */
+ bound to the input image. */
/*! Connected component labeling of the background part in a
* binary image.
*
* \param[in] input The input image.
- * \param[in] nbh The neighborhood to consider.
+ * \param[in] nbh The connexity of the background.
* \param[out] nlabels The number of labels.
* \return The label image.
*
https://svn.lrde.epita.fr/svn/oln/trunk/milena
It's cool, because I'm doing two tasks in one time:
1. adding things to support my research work (at the moment, some
watershed/morphological experiments); and
2. reviewing the contents of mln/morpho/, which was one of my assignments
about two or three months ago. :-P
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Add an area closing filter.
* mln/morpho/closing_attribute.hh: New.
Dual of mln/morpho/opening_attribute.hh
* mln/morpho/closing_area.hh: New.
Dual of mln/morpho/opening_area.hh
* tests/morpho/closing_area.cc: New test.
* tests/morpho/Makefile.am (check_PROGRAMS): Add closing_area.
(closing_area_SOURCES): New.
mln/morpho/closing_area.hh | 77 +++++++++++++++++++++
mln/morpho/closing_attribute.hh | 146 ++++++++++++++++++++++++++++++++++++++++
tests/morpho/Makefile.am | 2
tests/morpho/closing_area.cc | 57 +++++++++++++++
4 files changed, 282 insertions(+)
Index: mln/morpho/closing_attribute.hh
--- mln/morpho/closing_attribute.hh (revision 0)
+++ mln/morpho/closing_attribute.hh (revision 0)
@@ -0,0 +1,146 @@
+// Copyright (C) 2007, 2008 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_MORPHO_CLOSING_ATTRIBUTE_HH
+# define MLN_MORPHO_CLOSING_ATTRIBUTE_HH
+
+/*! \file mln/morpho/closing_attribute.hh
+ *
+ * \brief Morphological attribute closing.
+ */
+
+# include <mln/morpho/includes.hh>
+# include <mln/canvas/morpho/algebraic_union_find.hh>
+# include <mln/level/sort_points.hh>
+# include <mln/util/pix.hh>
+
+
+namespace mln
+{
+
+ namespace morpho
+ {
+
+ /* FIXME: The neighborhood shall not be passed as argument, but
+ bound to the input image. We can also optionnaly provide a
+ version of this function for regular-grid-based images where
+ the neighborhood is replaced by a (user-provided) window. */
+
+ /// Morphological attribute closing.
+ template <typename A,
+ typename I, typename N, typename O>
+ void closing_attribute(const Image<I>& input, const Neighborhood<N>& nbh,
+ mln_result(A) lambda, Image<O>& output);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ namespace impl
+ {
+
+ template <typename A_,
+ typename I_, typename N_, typename O_>
+ struct closing_attribute_t
+ {
+ typedef mln_point(I_) P;
+
+ // requirements from mln::canvas::morpho::algebraic_union_find
+
+ typedef A_ A;
+ typedef I_ I;
+ typedef N_ N;
+ typedef O_ O;
+ typedef p_array<P> S;
+ typedef util::pix<I> pix_t;
+
+ const I& input;
+ const N& nbh;
+ mln_result(A) lambda;
+ O& output;
+
+ const S s;
+
+ inline
+ void init()
+ {
+ // FIXME: border::fill(input, mln_max(mln_value(I)));
+ }
+
+ inline
+ bool is_active(const A& attr) const
+ {
+ return attr.to_result() < lambda;
+ }
+
+ inline
+ void inactivate(A& attr)
+ {
+ attr.set_value(lambda);
+ }
+
+ // end of requirements
+
+ inline
+ closing_attribute_t(const I_& input, const N_& nbh,
+ mln_result(A) lambda, O_& output)
+ : input(input), nbh(nbh), lambda(lambda), output(output),
+ s(level::sort_points_increasing(input))
+ {
+ }
+
+ };
+
+ } // end of namespace mln::morpho::impl
+
+
+ template <typename A,
+ typename I, typename N, typename O>
+ inline
+ void closing_attribute(const Image<I>& input_,
+ const Neighborhood<N>& nbh_, mln_result(A) lambda,
+ Image<O>& output_)
+ {
+ const I& input = exact(input_);
+ const N& nbh = exact(nbh_);
+ O& output = exact(output_);
+ mln_precondition(output.domain() == input.domain());
+
+ typedef impl::closing_attribute_t<A,I,N,O> F;
+ F f(input, nbh, lambda, output);
+ canvas::morpho::algebraic_union_find<F> run(f);
+
+ mln_postcondition(output >= input);
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::morpho
+
+} // end of namespace mln
+
+
+#endif // ! MLN_MORPHO_CLOSING_ATTRIBUTE_HH
Index: mln/morpho/closing_area.hh
--- mln/morpho/closing_area.hh (revision 0)
+++ mln/morpho/closing_area.hh (revision 0)
@@ -0,0 +1,77 @@
+// Copyright (C) 2007, 2008 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_MORPHO_CLOSING_AREA_HH
+# define MLN_MORPHO_CLOSING_AREA_HH
+
+/*! \file mln/morpho/closing_area.hh
+ *
+ * \brief Morphological area closing.
+ */
+
+# include <mln/morpho/closing_attribute.hh>
+# include <mln/accu/count.hh>
+
+
+namespace mln
+{
+
+ namespace morpho
+ {
+
+ /* FIXME: The neighborhood shall not be passed as argument, but
+ bound to the input image. We can also optionnaly provide a
+ version of this function for regular-grid-based images where
+ the neighborhood is replaced by a (user-provided) window. */
+
+ /// Morphological area closing.
+ template <typename I, typename N, typename O>
+ void closing_area(const Image<I>& input, const Neighborhood<N>& nbh,
+ std::size_t lambda, Image<O>& output);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename I, typename N, typename O>
+ inline
+ void closing_area(const Image<I>& input, const Neighborhood<N>& nbh,
+ std::size_t lambda, Image<O>& output)
+ {
+ mln_precondition(exact(output).domain() == exact(input).domain());
+ typedef util::pix<I> pix_t;
+ // FIXME: Change sig of closing_attribute!
+ closing_attribute< accu::count_<pix_t> >(input, nbh, lambda, output);
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::morpho
+
+} // end of namespace mln
+
+
+#endif // ! MLN_MORPHO_CLOSING_AREA_HH
Index: tests/morpho/closing_area.cc
--- tests/morpho/closing_area.cc (revision 0)
+++ tests/morpho/closing_area.cc (revision 0)
@@ -0,0 +1,57 @@
+// Copyright (C) 2007, 2008 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/morpho/closing_area.cc
+ *
+ * \brief Test on mln::morpho::closing_area.
+ */
+
+#include <mln/core/image2d.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/core/neighb2d.hh>
+
+#include <mln/io/pgm/load.hh>
+#include <mln/io/pgm/save.hh>
+
+#include <mln/morpho/closing_area.hh>
+
+#include "tests/data.hh"
+
+
+
+int main()
+{
+ using namespace mln;
+ using value::int_u8;
+
+ image2d<int_u8> lena;
+ io::pgm::load(lena, MLN_IMG_DIR "/lena.pgm");
+ image2d<int_u8> out(lena.domain());
+
+ morpho::closing_area(lena, c4(), 510, out);
+ io::pgm::save(out, "out.pgm");
+}
Index: tests/morpho/Makefile.am
--- tests/morpho/Makefile.am (revision 1695)
+++ tests/morpho/Makefile.am (working copy)
@@ -3,6 +3,7 @@
include $(top_srcdir)/milena/tests/tests.mk
check_PROGRAMS = \
+ closing_area \
contrast \
dilation \
dilation_max_h \
@@ -16,6 +17,7 @@
opening_area \
thinning
+closing_area_SOURCES = closing_area.cc
contrast_SOURCES = contrast.cc
dilation_SOURCES = dilation.cc
dilation_max_h_SOURCES = dilation_max_h.cc