* milena/doc/Doxyfile.in: fix missing backspace.
* milena/doc/examples/extend.cc: add missing include.
* milena/doc/ref_guide/ref_guide.tex: fix typo.
* milena/doc/tools/clearbanner.sh: new tool to remove hevea banner.
* milena/doc/tutorial/tutorial.tex: add navigation links.
* milena/doc/white_paper/white_paper.tex: do not use pgf.
* milena/tests/unit_test/unit-tests.mk,
* milena/headers.mk: update.
* milena/mln/metal/equal.hh,
* milena/mln/metal/is.hh,
* milena/mln/metal/is_a.hh: add comments.
* milena/mln/transform/influence_zone_geodesic.hh,
* milena/mln/transform/internal/influence_zone_functor.hh: allow to
set a different value for the background.
* milena/mln/value/shell.hh: temporary re-enable the commented
overload of set_ and comment the other one.
* milena/tests/Makefile.am: fix pretty-check rule.
* milena/tests/extract/blue.cc,
* milena/tests/extract/green.cc,
* milena/tests/extract/red.cc: improve tests.
* milena/tests/extract/Makefile.am,
* milena/tests/extract/hue.cc,
* milena/tests/extract/lum.cc,
* milena/tests/extract/sat.cc: new tests.
---
milena/ChangeLog | 41 ++++++++
milena/doc/Doxyfile.in | 2 +-
milena/doc/examples/extend.cc | 1 +
milena/doc/ref_guide/ref_guide.tex | 2 +-
milena/doc/tools/clearbanner.sh | 5 +
milena/doc/tutorial/tutorial.tex | 5 +
milena/doc/white_paper/white_paper.tex | 12 +--
milena/headers.mk | 11 ++-
milena/mln/metal/equal.hh | 14 ++-
milena/mln/metal/is.hh | 23 ++---
milena/mln/metal/is_a.hh | 8 +-
milena/mln/transform/influence_zone_geodesic.hh | 35 ++++++-
.../transform/internal/influence_zone_functor.hh | 97 +++++++++++++++++--
milena/mln/value/shell.hh | 26 +++---
milena/tests/Makefile.am | 4 +-
milena/tests/extract/Makefile.am | 14 ++-
milena/tests/extract/blue.cc | 4 +
milena/tests/extract/green.cc | 4 +
milena/tests/extract/{red.cc => hue.cc} | 18 ++--
milena/tests/extract/{red.cc => lum.cc} | 18 ++--
milena/tests/extract/red.cc | 4 +
milena/tests/extract/{red.cc => sat.cc} | 18 ++--
milena/tests/unit_test/unit-tests.mk | 22 ++++-
23 files changed, 299 insertions(+), 89 deletions(-)
create mode 100755 milena/doc/tools/clearbanner.sh
copy milena/tests/extract/{red.cc => hue.cc} (82%)
copy milena/tests/extract/{red.cc => lum.cc} (82%)
copy milena/tests/extract/{red.cc => sat.cc} (82%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 8d7d5a3..3b282d2 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,46 @@
2009-06-05 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+ Small fixes.
+
+ * milena/doc/Doxyfile.in: fix missing backspace.
+
+ * milena/doc/examples/extend.cc: add missing include.
+
+ * milena/doc/ref_guide/ref_guide.tex: fix typo.
+
+ * milena/doc/tools/clearbanner.sh: new tool to remove hevea banner.
+
+ * milena/doc/tutorial/tutorial.tex: add navigation links.
+
+ * milena/doc/white_paper/white_paper.tex: do not use pgf.
+
+ * milena/tests/unit_test/unit-tests.mk,
+ * milena/headers.mk: update.
+
+ * milena/mln/metal/equal.hh,
+ * milena/mln/metal/is.hh,
+ * milena/mln/metal/is_a.hh: add comments.
+
+ * milena/mln/transform/influence_zone_geodesic.hh,
+ * milena/mln/transform/internal/influence_zone_functor.hh: allow to
+ set a different value for the background.
+
+ * milena/mln/value/shell.hh: temporary re-enable the commented
+ overload of set_ and comment the other one.
+
+ * milena/tests/Makefile.am: fix pretty-check rule.
+
+ * milena/tests/extract/blue.cc,
+ * milena/tests/extract/green.cc,
+ * milena/tests/extract/red.cc: improve tests.
+
+ * milena/tests/extract/Makefile.am,
+ * milena/tests/extract/hue.cc,
+ * milena/tests/extract/lum.cc,
+ * milena/tests/extract/sat.cc: new tests.
+
+2009-06-05 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
Cleanup tests io::p*m tests and add new tests for io::p*ms.
* mln/io/pgms/load.hh,
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index 0abb0fc..1f2e17b 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -288,7 +288,7 @@ PREDEFINED = "mlc_unqualif(T)=typename
mln::metal::unqualif<T>::ret"
"mln_sum_product(T, U)=typename mln::trait::value_< mln_trait_op_times(T,U)
>::sum" \
"mln_deduce(T, A1, A2)=typename T::A1::A2" \
"mln_graph_element(T)=typename T::graph_element" \
- "mln_graph_element_(T)=T::graph_element"
+ "mln_graph_element_(T)=T::graph_element" \
"mln_fun_vv2v(F, L, R)=mln::fun::vv2v::F< mln_value(L), mln_value(R)
>" \
"mln_fun_vv2v_result(F, L, R)=typename mln_fun_vv2v(F, L, R)::result" \
"mln_ch_fun_vv2v(F, L, R)=typename mln::trait::ch_value< L, typename
mln_fun_vv2v(F, L, R)::result >::ret"
diff --git a/milena/doc/examples/extend.cc b/milena/doc/examples/extend.cc
index 4e8e1bb..bf4dbc7 100644
--- a/milena/doc/examples/extend.cc
+++ b/milena/doc/examples/extend.cc
@@ -4,6 +4,7 @@
#include <mln/core/var.hh>
#include <mln/data/transform.hh>
+#include <mln/data/paste.hh>
#include <mln/fun/p2b/big_chess.hh>
diff --git a/milena/doc/ref_guide/ref_guide.tex b/milena/doc/ref_guide/ref_guide.tex
index efe7f2e..578e22d 100644
--- a/milena/doc/ref_guide/ref_guide.tex
+++ b/milena/doc/ref_guide/ref_guide.tex
@@ -1833,7 +1833,7 @@ util::vec, dpoint\dots & n.a.\\
& & \\
literal::origin & Generic value for the origin point on a grid.& n.a.\\
& & \\
-border::thickness & Set the default border thickness of images &
$[0-UINT_MAX]$\\
+border::thickness & Set the default border thickness of images &
$[0-UINT\_MAX]$\\
& & \\
trace::quiet & Enable trace printing & true/false \\
\end{tabular}
diff --git a/milena/doc/tools/clearbanner.sh b/milena/doc/tools/clearbanner.sh
new file mode 100755
index 0000000..3095457
--- /dev/null
+++ b/milena/doc/tools/clearbanner.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+sed -i -e 's,<HR SIZE=2><BLOCKQUOTE
CLASS="quote"><EM>This document was translated from
L<sup>A</sup>T<sub>E</sub>X by,,g' $1
+sed -i -e 's,<A HREF="http://hevea.inria.fr/index.html">H<FONT
SIZE=2><sup>E</sup></FONT>V<FONT
SIZE=2><sup>E</sup></FONT>A</A>.</EM></BLOCKQUOTE></BODY>,,g'
$1
+
diff --git a/milena/doc/tutorial/tutorial.tex b/milena/doc/tutorial/tutorial.tex
index e36fce7..e9b0062 100644
--- a/milena/doc/tutorial/tutorial.tex
+++ b/milena/doc/tutorial/tutorial.tex
@@ -66,6 +66,7 @@
- \backslash subpage tuto5
- \backslash subpage tuto6
- \backslash subpage tuto7
+- \backslash subpage tuto8
\backslash htmlonly
\end{htmlonly}
@@ -1194,6 +1195,10 @@ In this section, we will detail how to create common images.
%--------------------------
\doxysubsection{tuto4accessdata}{Accessing data}
+\vspace{2cm}
+\begin{center}
+ \tutotoc{tuto3}{tuto5}
+\end{center}
diff --git a/milena/doc/white_paper/white_paper.tex
b/milena/doc/white_paper/white_paper.tex
index 2f48a9b..02467ca 100644
--- a/milena/doc/white_paper/white_paper.tex
+++ b/milena/doc/white_paper/white_paper.tex
@@ -8,10 +8,6 @@
\usepackage{makeidx}
\usepackage{xcolor}
\usepackage{color}
-\usepackage{pgf}
-\usepackage{doxyfuns}
-\usepackage{milena}
-
\title{Milena\\
\large{Generic image processing library} }
@@ -118,10 +114,10 @@ images, that can be used as
\end{itemize}
\begin{center}
- \doxyimg{house}{2.5cm}
- \doxyimg{house_wshed}{2.5cm}
- \doxyimg{house_wshed_mean_colors}{2.5cm}
- \doxyimg{house_rag}{2.5cm}
+ \includegraphics[width=2.5cm]{house}%
+ \includegraphics[width=2.5cm]{house_wshed}%
+ \includegraphics[width=2.5cm]{house_wshed_mean_colors}%
+ \includegraphics[width=2.5cm]{house_rag}%
\end{center}
%=================================================================
diff --git a/milena/headers.mk b/milena/headers.mk
index 161b4d1..334cf50 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -679,12 +679,16 @@ mln/io/off/save.hh \
mln/io/pbm/all.hh \
mln/io/pbm/load.hh \
mln/io/pbm/save.hh \
+mln/io/pbms/all.hh \
+mln/io/pbms/load.hh \
mln/io/pfm/all.hh \
mln/io/pfm/load.hh \
mln/io/pfm/save.hh \
mln/io/pgm/all.hh \
mln/io/pgm/load.hh \
mln/io/pgm/save.hh \
+mln/io/pgms/all.hh \
+mln/io/pgms/load.hh \
mln/io/plot/all.hh \
mln/io/plot/load.hh \
mln/io/plot/save.hh \
@@ -695,11 +699,16 @@ mln/io/pnm/macros.hh \
mln/io/pnm/max_component.hh \
mln/io/pnm/save.hh \
mln/io/pnm/save_header.hh \
+mln/io/pnms/all.hh \
+mln/io/pnms/load.hh \
mln/io/ppm/all.hh \
mln/io/ppm/load.hh \
mln/io/ppm/save.hh \
+mln/io/ppms/all.hh \
+mln/io/ppms/load.hh \
mln/io/tiff/all.hh \
mln/io/tiff/load.hh \
+mln/io/tiff/save.hh \
mln/io/txt/all.hh \
mln/io/txt/save.hh \
mln/labeling/all.hh \
@@ -1248,7 +1257,6 @@ mln/value/sign.hh \
mln/value/stack.hh \
mln/value/super_value.hh \
mln/value/viter.hh \
-mln/version.hh \
mln/win/all.hh \
mln/win/backdiag2d.hh \
mln/win/ball.hh \
@@ -1273,6 +1281,7 @@ mln/win/vline2d.hh \
mln/world/all.hh \
mln/world/binary_2d/all.hh \
mln/world/binary_2d/enlarge.hh \
+mln/world/binary_2d/enlarge_hq2x.hh \
mln/world/binary_2d/projected_histo.hh \
mln/world/binary_2d/subsample.hh \
mln/world/inter_pixel/all.hh \
diff --git a/milena/mln/metal/equal.hh b/milena/mln/metal/equal.hh
index d206897..06030bc 100644
--- a/milena/mln/metal/equal.hh
+++ b/milena/mln/metal/equal.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,11 +29,9 @@
#ifndef MLN_METAL_EQUAL_HH
# define MLN_METAL_EQUAL_HH
-/*!
- * \file mln/metal/equal.hh
- *
- * \brief FIXME.
- */
+/// \file mln/metal/equal.hh
+///
+/// Definition of a static 'equal' test.
# include <mln/metal/bool.hh>
@@ -46,6 +45,9 @@ namespace mln
namespace metal
{
+ /// Definition of a static 'equal' test.
+ /// Check whether type T1 is exactly type T2.
+ //
template <typename T1, typename T2>
struct equal : false_
{};
diff --git a/milena/mln/metal/is.hh b/milena/mln/metal/is.hh
index 917f222..079638e 100644
--- a/milena/mln/metal/is.hh
+++ b/milena/mln/metal/is.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +29,9 @@
#ifndef MLN_METAL_IS_HH
# define MLN_METAL_IS_HH
-/*! \file mln/metal/is.hh
- *
- * \brief Definition of a type that means "is".
- */
+/// \file mln/metal/is.hh
+///
+/// \brief Definition of a type that means "is".
# include <mln/metal/is_a.hh>
@@ -60,10 +60,9 @@ namespace mln
- /*! \brief "is" check.
- *
- * FIXME: Doc!
- */
+ /// \brief "is" check.
+ /// Check whether T inherits from U.
+ //
template <typename T, typename U>
struct is : bool_<( sizeof(internal::helper_is_<T,
U>::selector(internal::make_<T>::ptr()))
==
@@ -74,15 +73,15 @@ namespace mln
template <typename T, typename U>
struct is< const T, const U > : is<T, U>::eval
{};
-
+
template <typename T, typename U>
struct is< T*, U* > : is<T, U>::eval
{};
-
+
template <typename T, typename U>
struct is< T&, U& > : is<T, U>::eval
{};
-
+
template <typename T, typename U>
struct is< T**, U** > : false_
{};
diff --git a/milena/mln/metal/is_a.hh b/milena/mln/metal/is_a.hh
index 395fde9..9faad2d 100644
--- a/milena/mln/metal/is_a.hh
+++ b/milena/mln/metal/is_a.hh
@@ -90,10 +90,10 @@ namespace mln
- /*! \brief "is_a" check.
- *
- * FIXME: Doc!
- */
+ /// \brief "is_a" check.
+ ///
+ /// Check whether T inherits from _CONCEPT_ M.
+ //
template <typename T, template <class> class M>
struct is_a : bool_<( sizeof( internal::helper_is_a_< T, M
>::selector(internal::make_< T >::ptr()) )
==
diff --git a/milena/mln/transform/influence_zone_geodesic.hh
b/milena/mln/transform/influence_zone_geodesic.hh
index fee1d7f..31b4417 100644
--- a/milena/mln/transform/influence_zone_geodesic.hh
+++ b/milena/mln/transform/influence_zone_geodesic.hh
@@ -43,13 +43,29 @@ namespace mln
{
/// Geodesic influence zone transform.
+ ///
+ /// \param[in] input An image.
+ /// \param[in] nbh A neighborhood.
+ /// \param[in] max The maximum influence zone distance.
+ /// \param[in] background_value The value used as background (i.e.
+ /// not propagated).
+ ///
+ /// \return An image of influence zone.
+ //
template <typename I, typename N, typename D>
mln_concrete(I)
influence_zone_geodesic(const Image<I>& input,
- const Neighborhood<N>& nbh, D max);
+ const Neighborhood<N>& nbh,
+ const D& max, const mln_value(I)& background_value);
+ /// \overload
+ template <typename I, typename N, typename D>
+ mln_concrete(I)
+ influence_zone_geodesic(const Image<I>& input,
+ const Neighborhood<N>& nbh, const D& max);
- /// Geodesic influence zone transform.
+
+ /// \overload
template <typename I, typename N>
mln_concrete(I)
influence_zone_geodesic(const Image<I>& input, const
Neighborhood<N>& nbh);
@@ -58,23 +74,34 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+
template <typename I, typename N, typename D>
mln_concrete(I)
influence_zone_geodesic(const Image<I>& input, const
Neighborhood<N>& nbh,
- D max)
+ const D& max, const mln_value(I)& background_value)
{
trace::entering("transform::influence_zone_geodesic");
mln_precondition(exact(input).is_valid());
mln_precondition(exact(nbh).is_valid());
- internal::influence_zone_functor<I> f;
+ internal::influence_zone_functor<I> f(background_value);
(void) mln::canvas::distance_geodesic(input, nbh, max, f);
trace::exiting("transform::influence_zone_geodesic");
return f.output;
}
+
+ template <typename I, typename N, typename D>
+ mln_concrete(I)
+ influence_zone_geodesic(const Image<I>& input, const
Neighborhood<N>& nbh,
+ const D& max)
+ {
+ return influence_zone_geodesic(input, nbh, max, literal::zero);
+ }
+
+
template <typename I, typename N>
mln_concrete(I)
influence_zone_geodesic(const Image<I>& input, const
Neighborhood<N>& nbh)
diff --git a/milena/mln/transform/internal/influence_zone_functor.hh
b/milena/mln/transform/internal/influence_zone_functor.hh
index 7d8f846..414418b 100644
--- a/milena/mln/transform/internal/influence_zone_functor.hh
+++ b/milena/mln/transform/internal/influence_zone_functor.hh
@@ -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 Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -30,7 +31,7 @@
/// \file mln/transform/internal/influence_zone_functor.hh
///
-/// Influence zone functor.
+/// \brief Influence zone functor.
# include <mln/core/routine/duplicate.hh>
@@ -41,7 +42,7 @@ namespace mln
namespace transform
{
-
+
namespace internal
{
@@ -51,24 +52,48 @@ namespace mln
typedef mln_value(I) V;
typedef mln_psite(I) P;
+ influence_zone_functor();
+ influence_zone_functor(const V& background_value);
+
mln_concrete(I) output;
void init(const I& input);
bool inqueue_p_wrt_input_p(const V& input_p);
bool inqueue_p_wrt_input_n(const V& input_n);
- void init_p(const P&) {} // FIXME: move def below.
+ void init_p(const P&);
void process(const P& p, const P& n);
- void init_(const I& input) { output = duplicate(input); }
- bool inqueue_p_wrt_input_p_(const V& input_p) { return input_p != 0u; }
- bool inqueue_p_wrt_input_n_(const V& input_n) { return input_n == 0u; }
- void init_p_(unsigned) {}
- void process_(unsigned p, unsigned n) { output.element(n) = output.element(p); }
+ void init_(const I& input);
+ bool inqueue_p_wrt_input_p_(const V& input_p);
+ bool inqueue_p_wrt_input_n_(const V& input_n);
+ void init_p_(unsigned);
+ void process_(unsigned p, unsigned n);
+
+ V background_value_;
};
# ifndef MLN_INCLUDE_ONLY
+
+ template <typename I>
+ inline
+ influence_zone_functor<I>::influence_zone_functor()
+ {
+ background_value_ = literal::zero;
+ }
+
+
+ template <typename I>
+ inline
+ influence_zone_functor<I>::influence_zone_functor(const V&
background_value)
+ {
+ background_value_ = background_value;
+ }
+
+
+ // Generic implementation.
+
template <typename I>
inline
void
@@ -82,7 +107,7 @@ namespace mln
bool
influence_zone_functor<I>::inqueue_p_wrt_input_p(const V& input_p)
{
- return input_p != 0u;
+ return input_p != background_value_;
}
template <typename I>
@@ -90,7 +115,14 @@ namespace mln
bool
influence_zone_functor<I>::inqueue_p_wrt_input_n(const V& input_n)
{
- return input_n == 0u;
+ return input_n == background_value_;
+ }
+
+ template <typename I>
+ inline
+ void
+ influence_zone_functor<I>::init_p(const P&)
+ {
}
template <typename I>
@@ -100,6 +132,49 @@ namespace mln
output(n) = output(p);
}
+
+
+ // Fastest implementation.
+
+ template <typename I>
+ inline
+ void
+ influence_zone_functor<I>::init_(const I& input)
+ {
+ output = duplicate(input);
+ }
+
+ template <typename I>
+ inline
+ bool
+ influence_zone_functor<I>::inqueue_p_wrt_input_p_(const V& input_p)
+ {
+ return input_p != background_value_;
+ }
+
+ template <typename I>
+ inline
+ bool
+ influence_zone_functor<I>::inqueue_p_wrt_input_n_(const V& input_n)
+ {
+ return input_n == background_value_;
+ }
+
+ template <typename I>
+ inline
+ void
+ influence_zone_functor<I>::init_p_(unsigned)
+ {
+ }
+
+ template <typename I>
+ inline
+ void influence_zone_functor<I>::process_(unsigned p, unsigned n)
+ {
+ output.element(n) = output.element(p);
+ }
+
+
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::transform::internal
diff --git a/milena/mln/value/shell.hh b/milena/mln/value/shell.hh
index af04cf3..3d1306c 100644
--- a/milena/mln/value/shell.hh
+++ b/milena/mln/value/shell.hh
@@ -141,26 +141,26 @@ namespace mln
namespace impl
{
+// template <typename F, typename I>
+// const mln_value(I)&
+// shell_<F, I, Function_v2v<void> >::set_(I& ima,
+// const mln_site(I)& s,
+// mln_result(F) v)
+// {
+// ima(s) = F().f_1(v);
+// return ima(s);
+// }
+
template <typename F, typename I>
const mln_value(I)&
shell_<F, I, Function_v2v<void> >::set_(I& ima,
- const mln_site(I)& s,
- mln_result(F) v)
+ const mln_site(I)& s,
+ mln_result(F) v)
{
- ima(s) = F().f_1(v);
+ ima(s) = F().f_1(v, ima(s));
return ima(s);
}
-// template <typename F, typename I>
-// const mln_value(I)&
-// shell_<F, I, Function_v2v<void> >::set_(I& ima,
-// const mln_site(I)& s,
-// mln_result(F) v)
-// {
-// ima(s) = F().f_1(v, ima(s));
-// return ima(s);
-// }
-
} // end of namespace mln::value::impl
diff --git a/milena/tests/Makefile.am b/milena/tests/Makefile.am
index 540232b..19a9e31 100644
--- a/milena/tests/Makefile.am
+++ b/milena/tests/Makefile.am
@@ -2,6 +2,8 @@
include $(top_srcdir)/milena/tests/tests.mk
+.PHONY: pretty-check
+
SUBDIRS = \
accu \
algebra \
@@ -61,7 +63,7 @@ global_vars_SOURCES = global_vars1.cc global_vars2.cc
TESTS = $(check_PROGRAMS)
-pretty_check:
+pretty-check:
$(top_srcdir)/milena/tests/tools/pretty_check.sh
diff --git a/milena/tests/extract/Makefile.am b/milena/tests/extract/Makefile.am
index 62bbd0c..4f3146c 100644
--- a/milena/tests/extract/Makefile.am
+++ b/milena/tests/extract/Makefile.am
@@ -3,12 +3,18 @@
include $(top_srcdir)/milena/tests/tests.mk
check_PROGRAMS = \
- red \
+ blue \
green \
- blue
+ hue \
+ lum \
+ red \
+ sat
-red_SOURCES = red.cc
-green_SOURCES = green.cc
blue_SOURCES = blue.cc
+green_SOURCES = green.cc
+hue_SOURCES = hue.cc
+lum_SOURCES = lum.cc
+red_SOURCES = red.cc
+sat_SOURCES = sat.cc
TESTS = $(check_PROGRAMS)
diff --git a/milena/tests/extract/blue.cc b/milena/tests/extract/blue.cc
index 965954a..fe838ea 100644
--- a/milena/tests/extract/blue.cc
+++ b/milena/tests/extract/blue.cc
@@ -43,5 +43,9 @@ int main()
fun_image<meta::blue<rgb8>,I> ima_blue = extract::blue(ima);
mln_assertion(ima(p).blue() == ima_blue(p));
+
+ ima_blue(p) = 0;
+
+ mln_assertion(ima_blue(p) == 0u);
}
diff --git a/milena/tests/extract/green.cc b/milena/tests/extract/green.cc
index cf38302..c5052e4 100644
--- a/milena/tests/extract/green.cc
+++ b/milena/tests/extract/green.cc
@@ -43,5 +43,9 @@ int main()
fun_image<meta::green<rgb8>,I> ima_green = extract::green(ima);
mln_assertion(ima(p).green() == ima_green(p));
+
+ ima_green(p) = 0;
+
+ mln_assertion(ima_green(p) == 0u);
}
diff --git a/milena/tests/extract/red.cc b/milena/tests/extract/hue.cc
similarity index 82%
copy from milena/tests/extract/red.cc
copy to milena/tests/extract/hue.cc
index 7a87b42..8362793 100644
--- a/milena/tests/extract/red.cc
+++ b/milena/tests/extract/hue.cc
@@ -26,22 +26,26 @@
// Public License.
# include <mln/core/image/image2d.hh>
-# include <mln/extract/red.hh>
-# include <mln/value/rgb8.hh>
+# include <mln/extract/hue.hh>
+# include <mln/value/hsl.hh>
# include <mln/core/var.hh>
int main()
{
using namespace mln;
- using value::rgb8;
+ using value::hsl_f;
- typedef image2d<rgb8> I;
+ typedef image2d<hsl_f> I;
I ima(2,2);
point2d p(1,1);
- ima(p) = value::rgb8(200, 230, 240);
+ ima(p) = value::hsl_f(200, 230, 240);
- fun_image<meta::red<rgb8>,I> ima_red = extract::red(ima);
+ fun_image< meta::hue<hsl_f>, I > ima_hue = extract::hue(ima);
- mln_assertion(ima(p).red() == ima_red(p));
+ mln_assertion(ima(p).hue() == ima_hue(p));
+
+ ima_hue(p) = 0;
+
+ mln_assertion(ima_hue(p) == 0u);
}
diff --git a/milena/tests/extract/red.cc b/milena/tests/extract/lum.cc
similarity index 82%
copy from milena/tests/extract/red.cc
copy to milena/tests/extract/lum.cc
index 7a87b42..6fc3e4c 100644
--- a/milena/tests/extract/red.cc
+++ b/milena/tests/extract/lum.cc
@@ -26,22 +26,26 @@
// Public License.
# include <mln/core/image/image2d.hh>
-# include <mln/extract/red.hh>
-# include <mln/value/rgb8.hh>
+# include <mln/extract/lum.hh>
+# include <mln/value/hsl.hh>
# include <mln/core/var.hh>
int main()
{
using namespace mln;
- using value::rgb8;
+ using value::hsl_f;
- typedef image2d<rgb8> I;
+ typedef image2d<hsl_f> I;
I ima(2,2);
point2d p(1,1);
- ima(p) = value::rgb8(200, 230, 240);
+ ima(p) = value::hsl_f(200, 230, 240);
- fun_image<meta::red<rgb8>,I> ima_red = extract::red(ima);
+ fun_image< meta::lum<hsl_f>, I > ima_lum = extract::lum(ima);
- mln_assertion(ima(p).red() == ima_red(p));
+ mln_assertion(ima(p).lum() == ima_lum(p));
+
+ ima_lum(p) = 0;
+
+ mln_assertion(ima_lum(p) == 0u);
}
diff --git a/milena/tests/extract/red.cc b/milena/tests/extract/red.cc
index 7a87b42..e730986 100644
--- a/milena/tests/extract/red.cc
+++ b/milena/tests/extract/red.cc
@@ -43,5 +43,9 @@ int main()
fun_image<meta::red<rgb8>,I> ima_red = extract::red(ima);
mln_assertion(ima(p).red() == ima_red(p));
+
+ ima_red(p) = 0;
+
+ mln_assertion(ima_red(p) == 0u);
}
diff --git a/milena/tests/extract/red.cc b/milena/tests/extract/sat.cc
similarity index 82%
copy from milena/tests/extract/red.cc
copy to milena/tests/extract/sat.cc
index 7a87b42..8d588da 100644
--- a/milena/tests/extract/red.cc
+++ b/milena/tests/extract/sat.cc
@@ -26,22 +26,26 @@
// Public License.
# include <mln/core/image/image2d.hh>
-# include <mln/extract/red.hh>
-# include <mln/value/rgb8.hh>
+# include <mln/extract/sat.hh>
+# include <mln/value/hsl.hh>
# include <mln/core/var.hh>
int main()
{
using namespace mln;
- using value::rgb8;
+ using value::hsl_f;
- typedef image2d<rgb8> I;
+ typedef image2d<hsl_f> I;
I ima(2,2);
point2d p(1,1);
- ima(p) = value::rgb8(200, 230, 240);
+ ima(p) = value::hsl_f(200, 230, 240);
- fun_image<meta::red<rgb8>,I> ima_red = extract::red(ima);
+ fun_image< meta::sat<hsl_f>, I > ima_sat = extract::sat(ima);
- mln_assertion(ima(p).red() == ima_red(p));
+ mln_assertion(ima(p).sat() == ima_sat(p));
+
+ ima_sat(p) = 0;
+
+ mln_assertion(ima_sat(p) == 0u);
}
diff --git a/milena/tests/unit_test/unit-tests.mk b/milena/tests/unit_test/unit-tests.mk
index 290b74b..c7ae9a1 100644
--- a/milena/tests/unit_test/unit-tests.mk
+++ b/milena/tests/unit_test/unit-tests.mk
@@ -648,12 +648,16 @@ mln_io_off_save \
mln_io_pbm_all \
mln_io_pbm_load \
mln_io_pbm_save \
+mln_io_pbms_all \
+mln_io_pbms_load \
mln_io_pfm_all \
mln_io_pfm_load \
mln_io_pfm_save \
mln_io_pgm_all \
mln_io_pgm_load \
mln_io_pgm_save \
+mln_io_pgms_all \
+mln_io_pgms_load \
mln_io_plot_all \
mln_io_plot_load \
mln_io_plot_save \
@@ -664,11 +668,16 @@ mln_io_pnm_macros \
mln_io_pnm_max_component \
mln_io_pnm_save \
mln_io_pnm_save_header \
+mln_io_pnms_all \
+mln_io_pnms_load \
mln_io_ppm_all \
mln_io_ppm_load \
mln_io_ppm_save \
+mln_io_ppms_all \
+mln_io_ppms_load \
mln_io_tiff_all \
mln_io_tiff_load \
+mln_io_tiff_save \
mln_io_txt_all \
mln_io_txt_save \
mln_labeling_all \
@@ -1214,7 +1223,6 @@ mln_value_sign \
mln_value_stack \
mln_value_super_value \
mln_value_viter \
-mln_version \
mln_win_all \
mln_win_backdiag2d \
mln_win_ball \
@@ -1239,6 +1247,7 @@ mln_win_vline2d \
mln_world_all \
mln_world_binary_2d_all \
mln_world_binary_2d_enlarge \
+mln_world_binary_2d_enlarge_hq2x \
mln_world_binary_2d_projected_histo \
mln_world_binary_2d_subsample \
mln_world_inter_pixel_all \
@@ -1904,12 +1913,16 @@ mln_io_off_save_SOURCES = mln_io_off_save.cc
mln_io_pbm_all_SOURCES = mln_io_pbm_all.cc
mln_io_pbm_load_SOURCES = mln_io_pbm_load.cc
mln_io_pbm_save_SOURCES = mln_io_pbm_save.cc
+mln_io_pbms_all_SOURCES = mln_io_pbms_all.cc
+mln_io_pbms_load_SOURCES = mln_io_pbms_load.cc
mln_io_pfm_all_SOURCES = mln_io_pfm_all.cc
mln_io_pfm_load_SOURCES = mln_io_pfm_load.cc
mln_io_pfm_save_SOURCES = mln_io_pfm_save.cc
mln_io_pgm_all_SOURCES = mln_io_pgm_all.cc
mln_io_pgm_load_SOURCES = mln_io_pgm_load.cc
mln_io_pgm_save_SOURCES = mln_io_pgm_save.cc
+mln_io_pgms_all_SOURCES = mln_io_pgms_all.cc
+mln_io_pgms_load_SOURCES = mln_io_pgms_load.cc
mln_io_plot_all_SOURCES = mln_io_plot_all.cc
mln_io_plot_load_SOURCES = mln_io_plot_load.cc
mln_io_plot_save_SOURCES = mln_io_plot_save.cc
@@ -1920,11 +1933,16 @@ mln_io_pnm_macros_SOURCES = mln_io_pnm_macros.cc
mln_io_pnm_max_component_SOURCES = mln_io_pnm_max_component.cc
mln_io_pnm_save_SOURCES = mln_io_pnm_save.cc
mln_io_pnm_save_header_SOURCES = mln_io_pnm_save_header.cc
+mln_io_pnms_all_SOURCES = mln_io_pnms_all.cc
+mln_io_pnms_load_SOURCES = mln_io_pnms_load.cc
mln_io_ppm_all_SOURCES = mln_io_ppm_all.cc
mln_io_ppm_load_SOURCES = mln_io_ppm_load.cc
mln_io_ppm_save_SOURCES = mln_io_ppm_save.cc
+mln_io_ppms_all_SOURCES = mln_io_ppms_all.cc
+mln_io_ppms_load_SOURCES = mln_io_ppms_load.cc
mln_io_tiff_all_SOURCES = mln_io_tiff_all.cc
mln_io_tiff_load_SOURCES = mln_io_tiff_load.cc
+mln_io_tiff_save_SOURCES = mln_io_tiff_save.cc
mln_io_txt_all_SOURCES = mln_io_txt_all.cc
mln_io_txt_save_SOURCES = mln_io_txt_save.cc
mln_labeling_all_SOURCES = mln_labeling_all.cc
@@ -2470,7 +2488,6 @@ mln_value_sign_SOURCES = mln_value_sign.cc
mln_value_stack_SOURCES = mln_value_stack.cc
mln_value_super_value_SOURCES = mln_value_super_value.cc
mln_value_viter_SOURCES = mln_value_viter.cc
-mln_version_SOURCES = mln_version.cc
mln_win_all_SOURCES = mln_win_all.cc
mln_win_backdiag2d_SOURCES = mln_win_backdiag2d.cc
mln_win_ball_SOURCES = mln_win_ball.cc
@@ -2495,6 +2512,7 @@ mln_win_vline2d_SOURCES = mln_win_vline2d.cc
mln_world_all_SOURCES = mln_world_all.cc
mln_world_binary_2d_all_SOURCES = mln_world_binary_2d_all.cc
mln_world_binary_2d_enlarge_SOURCES = mln_world_binary_2d_enlarge.cc
+mln_world_binary_2d_enlarge_hq2x_SOURCES = mln_world_binary_2d_enlarge_hq2x.cc
mln_world_binary_2d_projected_histo_SOURCES = mln_world_binary_2d_projected_histo.cc
mln_world_binary_2d_subsample_SOURCES = mln_world_binary_2d_subsample.cc
mln_world_inter_pixel_all_SOURCES = mln_world_inter_pixel_all.cc
--
1.5.6.5