Olena-patches
Threads by month
- ----- 2025 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 9625 discussions
Index: olena/ChangeLog
from Damien Thivolle <damien(a)lrde.epita.fr>
* olena/oln/core/abstract/image.hh: Correct macros.
* olena/oln/core/abstract/image_with_impl.hh: Change the return type
of `at' method to const value_type.
* olena/oln/morpher/generic_morpher.hh: Correct comments.
Change parameter names. Fix coding style.
+2004-03-25 Damien Thivolle <damien(a)lrde.epita.fr>
+
+ * olena/oln/core/abstract/image.hh: Change the return type of
+ `operator[]' method to const value_type.
+ Add macros for retrieving types associated to an image.
* olena/oln/morpher/generic_morpher.hh: generic_morpher implementation.
2004-03-25 Giovanni Palma <giovanni(a)lrde.epita.fr>
Index: olena/oln/core/abstract/image.hh
--- olena/oln/core/abstract/image.hh Thu, 25 Mar 2004 20:12:45 +0100 thivol_d (oln/t/25_image.hh 1.28 600)
+++ olena/oln/core/abstract/image.hh Fri, 26 Mar 2004 12:06:45 +0100 thivol_d (oln/t/25_image.hh 1.28 600)
@@ -344,9 +344,9 @@
typename mute<ImgType>::ret
# define oln_exact_type(ImgType) \
-mlc_exact_type(ImgType)::exact_type
+mlc_exact_type(ImgType)
# define oln_exact_type_(ImgType) \
-mlc_exact_type_(ImgType)::exact_type
+mlc_exact_type_(ImgType)
# define oln_iter_type(Iterable) \
mlc_exact_type(Iterable)::iter_type
Index: olena/oln/core/abstract/image_with_impl.hh
--- olena/oln/core/abstract/image_with_impl.hh Thu, 11 Mar 2004 17:12:19 +0100 thivol_d (oln/t/27_image_with 1.14.1.9 600)
+++ olena/oln/core/abstract/image_with_impl.hh Fri, 26 Mar 2004 12:00:57 +0100 thivol_d (oln/t/27_image_with 1.14.1.9 600)
@@ -196,7 +196,7 @@
** \see image::operator[]()
*/
- const value_type&
+ const value_type
at(const point_type& p) const
{
return impl_->at(p);
Index: olena/oln/morpher/generic_morpher.hh
--- olena/oln/morpher/generic_morpher.hh Thu, 25 Mar 2004 20:12:45 +0100 thivol_d (oln/m/18_generic_mo 1.1 600)
+++ olena/oln/morpher/generic_morpher.hh Fri, 26 Mar 2004 12:51:44 +0100 thivol_d (oln/m/18_generic_mo 1.1 600)
@@ -1,4 +1,4 @@
-// Copyright (C) 2001, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2004 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -32,76 +32,66 @@
# include <string>
-
# include <oln/basics1d.hh>
# include <oln/basics2d.hh>
# include <oln/basics3d.hh>
-# include <ntg/all.hh>
namespace oln {
- /*! \namespace morpher
- **
- ** Contain all the morpher relative declarations and functions.
- */
+ /// Contain all the morpher relative declarations and functions.
namespace morpher {
- /*! \namespace abstract
- **
- ** generic_morpher implementation.
- */
+ ///Implementation of oln::abstract::generic_morpher.
namespace abstract {
- /*! \class gm_inherit
+ /*! Traits for conditionnal inheritance used by the \a generic_morpher
+ **
+ ** It changes the exact type of the image in the input (the exact
+ ** type becomes the concrete morpher).
**
- ** Perform a conditionnal inheritance for the \a generic_morpher
- ** class regarding its template parameters.
+ ** \see oln::morpher::generic_morpher
*/
template <class T, class Exact>
struct gm_inherit;
- /*! \class gm_inherit<oln::image1d<T>, Exact >
- **
- ** Return \a image1d with an \a exact_type of \a Exact.
- */
+ /// Return \a image1d with an \a exact_type of \a Exact.
template <class T, class Exact>
struct gm_inherit<oln::image1d<T>, Exact >
{
typedef oln::image1d<T, Exact> ret;
};
- /*! \class gm_inherit<oln::image1d<T>, Exact >
- **
- ** Return \a image2d with an \a exact_type of \a Exact.
- */
+ /// Return \a image2d with an \a exact_type of \a Exact.
template <class T, class Exact>
struct gm_inherit<oln::image2d<T>, Exact >
{
typedef oln::image2d<T, Exact> ret;
};
- /*! \class gm_inherit<oln::image1d<T>, Exact >
- **
- ** Return \a image3d with an \a exact_type of \a Exact.
- */
+ /// Return \a image3d with an \a exact_type of \a Exact.
template <class T, class Exact>
struct gm_inherit<oln::image3d<T>, Exact >
{
typedef oln::image3d<T, Exact> ret;
};
- /*! \class generic_morpher
+ /*! The Abstract morpher class.
+ **
+ ** Define a default implementation for all the
+ ** dispatched methods of the image hierarchy.
+ **
+ ** \param DestType Output type of the morpher.
+ **
+ ** \param SrcType Input type decorated.
**
- ** An abstract class from whom derive all other
- ** concrete morphers. Define a default implementation
- ** for all the dispatched methods of the image hierarchy.
+ ** \param Exact Exact type
*/
- template <class Inherit, class Deco, class Exact>
+ template <class DestType, class SrcType, class Exact>
class generic_morpher : public gm_inherit<
- Inherit,
+ DestType,
Exact>::ret
{
protected:
@@ -109,109 +99,132 @@
/*! \brief Construct an instance of generic_morpher by assigning
** \a Ima to Ima_.
*/
- generic_morpher(const Deco &Ima) : super_type(), Ima_(Ima) {}
+ generic_morpher(const SrcType &Ima) : super_type(), ima_(Ima) {}
- /// Default Constructor.
- generic_morpher(): Ima(Deco()) {}
+ /// Empty Constructor.
+ generic_morpher(): ima_(SrcType()) {}
/// The decorated image.
- const Deco &Ima_;
+ const SrcType &ima_;
public:
/// Type of the decorated image.
- typedef Deco deco_type;
- typedef oln_point_type(Deco) point_type;
- typedef oln_dpoint_type(Deco) dpoint_type;
- typedef oln_iter_type(Deco) iter_type;
- typedef oln_fwd_iter_type(Deco) fwd_iter_type;
- typedef oln_bkd_iter_type(Deco) bkd_iter_type;
- typedef oln_value_type(Deco) value_type;
- typedef oln_size_type(Deco) size_type;
+ typedef SrcType deco_type;
+ typedef oln_point_type(SrcType) point_type;
+ typedef oln_dpoint_type(SrcType) dpoint_type;
+ typedef oln_iter_type(SrcType) iter_type;
+ typedef oln_fwd_iter_type(SrcType) fwd_iter_type;
+ typedef oln_bkd_iter_type(SrcType) bkd_iter_type;
+ typedef oln_value_type(SrcType) value_type;
+ typedef oln_size_type(SrcType) size_type;
/// Underlying implementation of the decorated image.
- typedef oln_impl_type(Deco) impl_type;
+ typedef oln_impl_type(SrcType) impl_type;
/// Exact type of the decorated image.
- typedef oln_exact_type(Deco) image_type;
+ typedef SrcType image_type;
- typedef typename gm_inherit<Inherit, Exact>::ret super_type;
+ typedef typename gm_inherit<DestType, Exact>::ret super_type;
/// Return the decorated image.
- const Deco&
+ const SrcType&
get_ima() const
{
- return this->Ima_;
+ return ima_;
}
- /// Return the value stored at \a p in the decorated image.
+ /*! Default implementation of at.
+ **
+ ** Return the value stored at \a p in the decorated image.
+ */
const value_type
at(const point_type& p) const
{
- return this->Ima_.exact().at(p);
+ return to_exact(ima_).at(p);
}
- /// Return a reference to the value stored at \a p in the decorated image.
+ /*! Defaults implementation of at.
+ **
+ ** Return a reference to the value stored at \a p in the decorated image.
+ */
value_type&
at(const point_type& p)
{
- return this->Ima_.exact().at(p);
+ return to_exact(ima_).at(p);
}
- /// Return a pointer to the value container of the decorated image.
+ /// Default implementation of impl.
const impl_type*
impl() const
{
- return this->Ima_.exact().impl();
+ return to_exact(ima_).impl();
}
- /// Return a pointer to the value container of the decorated image.
+ /// Default implementation of impl.
impl_type*
impl()
{
- return this->Ima_.exact().impl();
+ return to_exact(ima_).impl();
}
- /// Return a copy of the decorated image.
+ /*! Default implementation of clone_.
+ **
+ ** Return a copy of the decorated image.
+ */
image_type
clone_() const
{
- return this->Ima_.exact().clone_();
+ return to_exact(ima_).clone_();
}
- /// Return the size of the decorated image.
+ /*! Default implementation of npoints_.
+ **
+ ** Return the size of the decorated image.
+ */
size_t
npoints_()
{
- return this->Ima_.exact().npoints_();
+ return to_exact(ima_).npoints_();
}
- /// Assign \a rhs to the decorated image.
+ /*! Default implementation of assign.
+ **
+ ** Assign \a rhs to the decorated image.
+ */
image_type&
assign(deco_type& rhs)
{
- return this->Ima_.exact().assign(rhs);
+ return to_exact(ima_).assign(rhs);
}
- /// Assign the decorated image to \a r
+ /*! Default implementation of operator=.
+ **
+ ** Assign the decorated image to \a r.
+ */
deco_type&
operator=(const oln::io::internal::anything& r)
{
- return r.assign(this->Ima_);
+ return r.assign(ima_);
}
- /*! \brief Set the border width of the decorated image to
+ /*! Default implementation of border_set_width.
+ **
+ ** Set the border width of the decorated image to
** \a min_border.
*/
void
border_set_width(oln::coord min_border,
bool copy_border = false) const
{
- return this->Ima_.exact().border_set_width(min_border, copy_border);
+ return to_exact(ima_).border_set_width(min_border, copy_border);
}
- static std::string name()
- { return "generic_morpher<" + super_type::name() + ">"; }
+ static std::string
+ name()
+ {
+ return "generic_morpher<" + super_type::name() + ">";
+ }
};
--
Damien Thivolle
damien.thivolle(a)lrde.epita.fr
3
3
Index: olena/ChangeLog
from Damien Thivolle <damien(a)lrde.epita.fr>
* olena/oln/core/abstract/image.hh: Add macros.
* olena/oln/morpher/generic_morpher.hh: generic_morpher implementation.
Index: olena/oln/core/abstract/image.hh
--- olena/oln/core/abstract/image.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/t/25_image.hh 1.27 640)
+++ olena/oln/core/abstract/image.hh Thu, 25 Mar 2004 20:08:16 +0100 thivol_d (oln/t/25_image.hh 1.27 640)
@@ -125,7 +125,7 @@
** at \a p in the current image.
*/
- const value_type&
+ const value_type
operator[](const abstract::point<point_type>& p) const
{
return this->exact().at(p.exact());
@@ -343,11 +343,36 @@
# define oln_concrete_type(ImgType) \
typename mute<ImgType>::ret
+# define oln_exact_type(ImgType) \
+mlc_exact_type(ImgType)::exact_type
+# define oln_exact_type_(ImgType) \
+mlc_exact_type_(ImgType)::exact_type
+
# define oln_iter_type(Iterable) \
mlc_exact_type(Iterable)::iter_type
# define oln_iter_type_(Iterable) \
mlc_exact_type_(Iterable)::iter_type
+# define oln_fwd_iter_type(Fwd_Iterable) \
+mlc_exact_type(Fwd_Iterable)::fwd_iter_type
+# define oln_fwd_iter_type_(Fwd_Iterable) \
+mlc_exact_type_(Fwd_Iterable)
+
+# define oln_bkd_iter_type(Bkd_Iterable) \
+mlc_exact_type(Bkd_Iterable)::bkd_iter_type
+# define oln_bkd_iter_type_(Bkd_Iterable) \
+mlc_exact_type_(Bkd_Iterable)::bkd_iter_type
+
+# define oln_size_type(ImgType) \
+mlc_exact_type(ImgType)::size_type
+# define oln_size_type_(ImgType) \
+mlc_exact_type_(ImgType)::size_type
+
+# define oln_impl_type(ImgType) \
+mlc_exact_type(ImgType)::impl_type
+# define oln_impl_type_(ImgType) \
+mlc_exact_type_(ImgType)::impl_type
+
# define oln_point_type(Pointable) \
mlc_exact_type(Pointable)::point_type
# define oln_point_type_(Pointable) \
Index: olena/oln/morpher/generic_morpher.hh
--- olena/oln/morpher/generic_morpher.hh Thu, 25 Mar 2004 20:12:11 +0100 thivol_d ()
+++ olena/oln/morpher/generic_morpher.hh Thu, 25 Mar 2004 20:09:08 +0100 thivol_d (oln/m/18_generic_mo 644)
@@ -0,0 +1,226 @@
+// Copyright (C) 2001, 2003, 2004 EPITA Research and Development Laboratory
+//
+// 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, 59 Temple Place - Suite 330, 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 GENERIC_MORPHER_HH
+# define GENERIC_MORPHER_HH
+
+# include <string>
+
+
+# include <oln/basics1d.hh>
+# include <oln/basics2d.hh>
+# include <oln/basics3d.hh>
+# include <ntg/all.hh>
+
+namespace oln {
+
+ /*! \namespace morpher
+ **
+ ** Contain all the morpher relative declarations and functions.
+ */
+
+ namespace morpher {
+
+ /*! \namespace abstract
+ **
+ ** generic_morpher implementation.
+ */
+
+ namespace abstract {
+
+ /*! \class gm_inherit
+ **
+ ** Perform a conditionnal inheritance for the \a generic_morpher
+ ** class regarding its template parameters.
+ */
+ template <class T, class Exact>
+ struct gm_inherit;
+
+ /*! \class gm_inherit<oln::image1d<T>, Exact >
+ **
+ ** Return \a image1d with an \a exact_type of \a Exact.
+ */
+ template <class T, class Exact>
+ struct gm_inherit<oln::image1d<T>, Exact >
+ {
+ typedef oln::image1d<T, Exact> ret;
+ };
+
+ /*! \class gm_inherit<oln::image1d<T>, Exact >
+ **
+ ** Return \a image2d with an \a exact_type of \a Exact.
+ */
+ template <class T, class Exact>
+ struct gm_inherit<oln::image2d<T>, Exact >
+ {
+ typedef oln::image2d<T, Exact> ret;
+ };
+
+ /*! \class gm_inherit<oln::image1d<T>, Exact >
+ **
+ ** Return \a image3d with an \a exact_type of \a Exact.
+ */
+ template <class T, class Exact>
+ struct gm_inherit<oln::image3d<T>, Exact >
+ {
+ typedef oln::image3d<T, Exact> ret;
+ };
+
+ /*! \class generic_morpher
+ **
+ ** An abstract class from whom derive all other
+ ** concrete morphers. Define a default implementation
+ ** for all the dispatched methods of the image hierarchy.
+ */
+
+ template <class Inherit, class Deco, class Exact>
+ class generic_morpher : public gm_inherit<
+ Inherit,
+ Exact>::ret
+ {
+ protected:
+
+ /*! \brief Construct an instance of generic_morpher by assigning
+ ** \a Ima to Ima_.
+ */
+ generic_morpher(const Deco &Ima) : super_type(), Ima_(Ima) {}
+
+ /// Default Constructor.
+ generic_morpher(): Ima(Deco()) {}
+
+ /// The decorated image.
+ const Deco &Ima_;
+
+ public:
+
+ /// Type of the decorated image.
+ typedef Deco deco_type;
+ typedef oln_point_type(Deco) point_type;
+ typedef oln_dpoint_type(Deco) dpoint_type;
+ typedef oln_iter_type(Deco) iter_type;
+ typedef oln_fwd_iter_type(Deco) fwd_iter_type;
+ typedef oln_bkd_iter_type(Deco) bkd_iter_type;
+ typedef oln_value_type(Deco) value_type;
+ typedef oln_size_type(Deco) size_type;
+
+ /// Underlying implementation of the decorated image.
+ typedef oln_impl_type(Deco) impl_type;
+
+ /// Exact type of the decorated image.
+ typedef oln_exact_type(Deco) image_type;
+
+ typedef typename gm_inherit<Inherit, Exact>::ret super_type;
+
+ /// Return the decorated image.
+ const Deco&
+ get_ima() const
+ {
+ return this->Ima_;
+ }
+
+ /// Return the value stored at \a p in the decorated image.
+ const value_type
+ at(const point_type& p) const
+ {
+ return this->Ima_.exact().at(p);
+ }
+
+ /// Return a reference to the value stored at \a p in the decorated image.
+ value_type&
+ at(const point_type& p)
+ {
+ return this->Ima_.exact().at(p);
+ }
+
+ /// Return a pointer to the value container of the decorated image.
+ const impl_type*
+ impl() const
+ {
+ return this->Ima_.exact().impl();
+ }
+
+ /// Return a pointer to the value container of the decorated image.
+ impl_type*
+ impl()
+ {
+ return this->Ima_.exact().impl();
+ }
+
+ /// Return a copy of the decorated image.
+ image_type
+ clone_() const
+ {
+ return this->Ima_.exact().clone_();
+ }
+
+ /// Return the size of the decorated image.
+ size_t
+ npoints_()
+ {
+ return this->Ima_.exact().npoints_();
+ }
+
+ /// Assign \a rhs to the decorated image.
+ image_type&
+ assign(deco_type& rhs)
+ {
+ return this->Ima_.exact().assign(rhs);
+ }
+
+ /// Assign the decorated image to \a r
+ deco_type&
+ operator=(const oln::io::internal::anything& r)
+ {
+ return r.assign(this->Ima_);
+ }
+
+ /*! \brief Set the border width of the decorated image to
+ ** \a min_border.
+ */
+ void
+ border_set_width(oln::coord min_border,
+ bool copy_border = false) const
+ {
+ return this->Ima_.exact().border_set_width(min_border, copy_border);
+ }
+
+ static std::string name()
+ { return "generic_morpher<" + super_type::name() + ">"; }
+
+
+ };
+
+ } // end of namespace abstract
+
+ } // end of namespace morpher
+
+} // end of namespace oln
+
+
+#endif // !GENERIC_MORPHER_HH
--
Damien Thivolle
damien.thivolle(a)lrde.epita.fr
4
5
Index: doc/ChangeLog
from Giovanni Palma <giovanni(a)lrde.epita.fr>
* ref/doxygen.config.in: Remove deprecated entries.
Index: olena/ChangeLog
from Giovanni Palma <giovanni(a)lrde.epita.fr>
* oln/morpho/dilation.hh: Correct comments.
* oln/morpho/attribute_closing_opening.hh: Correct namespaces.
* oln/morpho/attribute_closing_opening_map.hh: Likewise.
* tests/morpho/tests/attribute: Likewise.
* oln/morpho/attributes.hh: Add attr namespace.
* oln/morpho/environments.hh: Add file.
Index: olena/oln/morpho/dilation.hh
--- olena/oln/morpho/dilation.hh Thu, 18 Mar 2004 18:24:14 +0100 van-vl_n (oln/b/5_dilation.h 1.19 640)
+++ olena/oln/morpho/dilation.hh Wed, 24 Mar 2004 16:06:41 +0100 palma_g (oln/b/5_dilation.h 1.19 640)
@@ -41,11 +41,11 @@
** \brief Processing dilation.
**
** Compute the morphological dilation of input using se
- ** as structural element.
+ ** as structural element.\n
**
** On grey-scale images, each point is replaced by the maximum value
** of its neighbors, as indicated by se. On binary images,
- ** a logical or is performed between neighbors.
+ ** a logical or is performed between neighbors.\n
**
** The morpho::fast version of this function use a different
** algorithm: This algorithm is described in
@@ -53,12 +53,12 @@
** M. Van Droogenbroeck and H. Talbot.
** "Fast computation of morphological operations with arbitrary
** structuring elements". Pattern Recognition Letters,
- ** 17(14):1451-1460, 1996.
+ ** 17(14):1451-1460, 1996.\n
**
** An histogram of the value of the neighborhood indicated by
** se is updated while iterating over all point of the
** image. Doing so is more efficient when the
- ** structural element is large.
+ ** structural element is large.\n
**
** \param I Exact type of the input image.
** \param E Exact type of the neighborhood.
Index: olena/oln/morpho/attribute_closing_opening.hh
--- olena/oln/morpho/attribute_closing_opening.hh Mon, 15 Mar 2004 17:40:54 +0100 van-vl_n (oln/q/49_attribute_ 1.22 640)
+++ olena/oln/morpho/attribute_closing_opening.hh Wed, 24 Mar 2004 11:41:41 +0100 palma_g (oln/q/49_attribute_ 1.22 640)
@@ -101,9 +101,9 @@
oln_concrete_type(I) \
T##_opening(const abstract::non_vectorial_image<I>& input, \
const abstract::neighborhood<N>& Ng, \
- const attr_lambda_type(T##_type<unsigned>) &lambda) \
+ const attr_lambda_type(attr::T##_type<unsigned>) &lambda) \
{ \
- return tarjan::internal::attr_opening_<I, N, T##_type<unsigned> >(input, Ng, lambda); \
+ return tarjan::internal::attr_opening_<I, N, attr::T##_type<unsigned> >(input, Ng, lambda); \
}
# define xxx_closing_decl(T) \
@@ -111,9 +111,9 @@
oln_concrete_type(I) \
T##_closing(const abstract::non_vectorial_image<I>& input, \
const abstract::neighborhood<N>& Ng, \
- const attr_lambda_type(T##_type<unsigned>) &lambda) \
+ const attr_lambda_type(attr::T##_type<unsigned>) &lambda) \
{ \
- return tarjan::internal::attr_closing_<I, N, T##_type<unsigned> >(input, Ng, lambda); \
+ return tarjan::internal::attr_closing_<I, N, attr::T##_type<unsigned> >(input, Ng, lambda); \
}
@@ -123,9 +123,9 @@
oln_concrete_type(I) \
T##_opening(const abstract::non_vectorial_image<I>& input, \
const abstract::neighborhood<N>& Ng, \
- const attr_lambda_type(T##_type<I>) &lambda) \
+ const attr_lambda_type(attr::T##_type<I>) &lambda) \
{ \
- return tarjan::internal::attr_opening_<I, N, T##_type<I> >(input, Ng, lambda); \
+ return tarjan::internal::attr_opening_<I, N, attr::T##_type<I> >(input, Ng, lambda); \
}
# define xxx_closing_im_decl(T) \
@@ -133,9 +133,9 @@
oln_concrete_type(I) \
T##_closing(const abstract::non_vectorial_image<I>& input, \
const abstract::neighborhood<N>& Ng, \
- const attr_lambda_type(T##_type<I>) &lambda) \
+ const attr_lambda_type(attr::T##_type<I>) &lambda) \
{ \
- return tarjan::internal::attr_closing_<I, N, T##_type<I> >(input, Ng, lambda); \
+ return tarjan::internal::attr_closing_<I, N, attr::T##_type<I> >(input, Ng, lambda); \
}
/*!
Index: olena/oln/morpho/attributes.hh
--- olena/oln/morpho/attributes.hh Mon, 15 Mar 2004 17:40:54 +0100 van-vl_n (oln/j/45_attributes 1.9 644)
+++ olena/oln/morpho/attributes.hh Wed, 24 Mar 2004 19:01:19 +0100 palma_g (oln/j/45_attributes 1.9 644)
@@ -27,17 +27,19 @@
#ifndef OLN_MORPHO_ATTRIBUTES_HH
# define OLN_MORPHO_ATTRIBUTES_HH
+# include <oln/basics.hh>
# include <mlc/type.hh>
# include <vector>
+# include <oln/morpho/environments.hh>
// attribute dedicated macros
-# define attr_lambda_type(T) typename oln::morpho::attr_traits<T>::lambda_type
-# define attr_env_type(T) typename oln::morpho::attr_traits<T>::env_type
-# define attr_value_type(T) typename oln::morpho::attr_traits<T>::value_type
-
-# define attr_lambda_type_(T) oln::morpho::attr_traits<T>::lambda_type
-# define attr_env_type_(T) oln::morpho::attr_traits<T>::env_type
-# define attr_value_type_(T) oln::morpho::attr_traits<T>::value_type
+# define attr_lambda_type(T) typename oln::morpho::attr::attr_traits<T>::lambda_type
+# define attr_env_type(T) typename oln::morpho::attr::attr_traits<T>::env_type
+# define attr_value_type(T) typename oln::morpho::attr::attr_traits<T>::value_type
+
+# define attr_lambda_type_(T) oln::morpho::attr::attr_traits<T>::lambda_type
+# define attr_env_type_(T) oln::morpho::attr::attr_traits<T>::env_type
+# define attr_value_type_(T) oln::morpho::attr::attr_traits<T>::value_type
# define attr_type_decl(self_type) \
@@ -48,6 +50,9 @@
namespace oln {
namespace morpho {
+ /*! \brief Implementation of attributes.
+ */
+ namespace attr {
/*! \brief Useful tools for morphological math.
*/
namespace tools {
@@ -63,66 +68,6 @@
}
} // !tools
- /*!
- ** \brief Top of environment hierarchy.
- */
- template <class Exact>
- struct env: public mlc_hierarchy::any<Exact>
- {
- };
-
- /*!
- ** \brief Useless environment.
- **
- ** This environment is an empty one.
- */
- struct NullEnv: public env<NullEnv>
- {
- };
-
- /*!
- ** \brief Environment containing image.
- **
- ** Used for image substitution in other_image attribute.
- */
- template <class I>
- struct OtherImageEnv: public env<OtherImageEnv<I> >
- {
- typedef abstract::image<I> im_type;
-
- OtherImageEnv(const abstract::image<I> &im): im_(im)
- {};
-
- const im_type &getImage() const
- {
- return im_;
- }
-
- protected:
- const im_type &im_;
- };
-
- /*!
- ** \brief Environment containing point.
- **
- ** Used for point substitution in other_point attribute.
- */
- template <class I>
- struct OtherPointEnv: public env<OtherPointEnv<I> >
- {
- typedef abstract::image<I> im_type;
-
-// OtherImageEnv(const abstract::image<I> &im): im_(im)
-// {};
-
- const oln_point_type(I) &getPoint(const oln_point_type(I) &p) const
- {
- return p;
- }
-
-// protected:
-// const im_type &im_;
- };
// the traits fwd declaration
/*!
@@ -526,60 +471,177 @@
};
};
- /*--------------*
- | other_point |
- *------------*/
-// /*!
-// ** \class other_point
-// **
-// ** \brief Metaclass used to change attribute behavior.
-// **
-// ** This class do the same job that its Dad parameter, but force it
-// ** to work on other data.
-// */
-// template <class Dad, class I, class Exact = mlc::final>
-// class other_point:
-// public change_exact<Dad, typename mlc::exact_vt<other_point<Dad, I, Exact>, Exact>::ret >::ret
-// {
-// public:
-// typedef other_image<Dad, I, Exact> self_type; /*< Self type of the class.*/
-// typedef typename abstract::image<mlc_exact_type(I)> im_type; /*< Type of substituted image.*/
-// attr_type_decl(self_type);
-// typedef typename change_exact<Dad,
-// typename mlc::exact_vt<other_point<Dad, I, Exact>,
-// Exact>::ret >::ret super_type; /*< Mother class type.*/
-
-// /*!
-// ** \brief Constructor.
-// **
-// ** Dispatch to Dad constructor.
-// */
-// other_point(): super_type()
-// {
-// };
-
-// /*!
-// ** \brief lambda_type Constructor.
-// **
-// ** Dispatch to Dad constructor.
-// */
-// other_point(const lambda_type &lambda): super_type(lambda)
-// {
-// };
-
-// /*!
-// ** \brief Image Constructor.
-// **
-// ** Dispatch to Dad constructor but substitute image argument with
-// ** the image contained in the environment.
-// */
-// template <typename IM>
-// other_point(const abstract::image<IM> &im,
-// const oln_point_type(I) &p,
-// const env_type &e): super_type(im, e.getPoint(p), e)
-// {
-// };
-// };
+ /*----------------------*
+ | ball_parent_change |
+ *--------------------*/
+ /*!
+ ** \class other_point
+ **
+ ** \brief Metaclass used to change attribute behavior.
+ **
+ ** This class do the same job that its Dad parameter, but force it
+ ** to work on other data.
+ */
+ template <class I, class Exact = mlc::final>
+ class ball_parent_change:
+ public attribute<mlc_2_exact_vt_type(ball_parent_change, I, Exact)>
+ {
+ public:
+ typedef ball_parent_change<I, Exact> self_type; /*< Self type of the class.*/
+ typedef typename abstract::image<mlc_exact_type(I)> im_type; /*< Type of substituted image.*/
+ attr_type_decl(self_type);
+ typedef oln_value_type(I) pts_type; ///< should be list <?>
+ typedef typename pts_type::const_iterator cst_iter_type; ///< const iterator on Point vector.
+ typedef typename pts_type::value_type point_type; ///< Point type associated to im_type.
+ typedef oln_dpoint_type(point_type) dpoint_type; ///< Dpoint type associated to im_type.
+
+ /*!
+ ** \brief Constructor.
+ **
+ ** Dispatch to Dad constructor.
+ */
+ ball_parent_change(): value_(ntg_zero_val(value_type)), points_()
+ {
+ };
+
+ /*!
+ ** \brief lambda_type Constructor.
+ **
+ ** Dispatch to Dad constructor.
+ */
+ ball_parent_change(const lambda_type &lambda): value_(lambda), points_()
+ {
+ };
+
+ /*!
+ ** \brief Image Constructor.
+ **
+ ** Dispatch to Dad constructor but substitute image argument with
+ ** the image contained in the environment.
+ */
+ template <typename IM>
+ ball_parent_change(const abstract::image<IM> &,
+ const oln_point_type(IM) &p,
+ const env_type &e): points_()//: super_type(/*e.getImage(), */e.getPoint(p), e)
+ {
+ std::copy(e.getParent()[p].begin(),
+ e.getParent()[p].end(),
+ std::back_inserter(points_));
+ };
+
+ /*!
+ ** \brief Accessor to value_.
+ **
+ ** Virtual method.
+ ** \see getValue_impl()
+ */
+ const value_type &getValue() const
+ {
+ mlc_dispatch(getValue)();
+ };
+
+
+ /*!
+ ** \brief Accessor to pts_.
+ **
+ ** Virtual method.
+ ** \see getPts_impl()
+ */
+ const pts_type &getPts() const
+ {
+ mlc_dispatch(getPts)();
+ };
+
+ // impl
+ /*!
+ ** \brief Implementation of getValue().
+ **
+ ** Override this method in order to provide a new version of
+ ** getValue().
+ **
+ ** \warning Do not call this method, use getValue() instead.
+ */
+ const value_type &getValue_impl() const
+ {
+ return value_;
+ };
+
+ /*!
+ ** \brief Implementation of getValue().
+ **
+ ** Override this method in order to provide a new version of
+ ** getPts().
+ **
+ ** \warning Do not call this method, use getPts() instead.
+ */
+ const pts_type &getPts_impl() const
+ {
+ return points_;
+ };
+
+ /*!
+ ** \brief += operator implementation.
+ **
+ ** This is an implementation of the += operator. Override this
+ ** method to provide a new implementation of this operator.
+ ** \warning This method SHOULDN'T directly be called.
+ */
+ void pe_impl(const self_type &rhs)
+ {
+ precondition(points_.size() < (128 * 128 * 128 + 1));
+ std::copy(rhs.getPts().begin(),
+ rhs.getPts().end(),
+ std::back_inserter(points_));
+ compute_value();
+ value_ = ntg::max(value_, rhs.getValue());
+ };
+
+ /*!
+ ** \brief "<" operator implementation.
+ **
+ ** This is an implementation of the += operator. Override this
+ ** method to provide a new implementation of this operator.
+ ** \warning This method SHOULDN'T directly be called.
+ */
+ bool less_impl(const lambda_type &lambda) const
+ {
+ return value_ < lambda;
+ };
+
+ /*!
+ ** \brief != operator implementation.
+ **
+ ** This is an implementation of the += operator. Override this
+ ** method to provide a new implementation of this operator.
+ ** \warning This method SHOULDN'T directly be called.
+ */
+ bool ne_impl(const lambda_type &lambda) const
+ {
+ return lambda != value_;
+ };
+
+ protected:
+ void compute_value()
+ {
+ value_type last = value_;
+ value_ = ntg_zero_val(value_type);
+ for (cst_iter_type p1 = points_.begin(); p1 != points_.end(); ++p1)
+ for (cst_iter_type p2 = points_.begin(); p2 != points_.end(); ++p2)
+ {
+ unsigned d = 0;
+ dpoint_type p = *p1 - *p2;
+ for (int i = 0; i < point_traits<point_type>::dim; ++i)
+ d += p.nth(i) * p.nth(i);
+ if (d > value_)
+ value_ = d;
+ }
+ value_ /= 2;
+ value_ = ntg::max(value_, last);
+ }
+
+ value_type value_;
+ pts_type points_;
+ };
/*-----------*
| height |
@@ -1151,11 +1213,11 @@
**
** \arg p Point to consider in the image.
*/
- dist_type(const im_type&,
+ dist_type(//const im_type&,
const point_type &p,
- const env_type &) :
- value_(ntg_zero_val(value_type)),
- center_(p)
+ const env_type &) //:
+ // value_(ntg_zero_val(value_type)),
+ //center_(p)
{
};
@@ -1605,112 +1667,130 @@
\------------------------*/
- // integral traits
+ /*!
+ ** \brief Trait specialization for the integral attribute.
+ */
template <class T, class Exact>
struct attr_traits<integral_type<T, Exact> >
{
- typedef T value_type;
- typedef value_type lambda_type;
- typedef NullEnv env_type;
+ typedef T value_type; ///< Type of data.
+ typedef value_type lambda_type; ///< Type of lambda.
+ typedef env::NullEnv env_type; ///< Type of environment.
};
- // height traits
+ /*!
+ ** \brief Trait specialization for the height attribute.
+ */
template <class T, class Exact>
struct attr_traits<height_type<T, Exact> >
{
- typedef T value_type;
- typedef value_type lambda_type;
- typedef NullEnv env_type;
+ typedef T value_type; ///< Type of data.
+ typedef value_type lambda_type; ///< Type of lambda.
+ typedef env::NullEnv env_type; ///< Type of environment.
};
- // card traits
+ /*!
+ ** \brief Trait specialization for card attribute.
+ */
template <class T, class Exact>
struct attr_traits<card_type<T, Exact> >
{
- typedef T value_type;
- typedef value_type lambda_type;
- typedef NullEnv env_type;
+ typedef T value_type; ///< Type of data.
+ typedef value_type lambda_type; ///< Type of lambda.
+ typedef env::NullEnv env_type; ///< Type of environment.
};
- // maxvalue traits
+ /*!
+ ** \brief Trait specialization for the maxvalue attribute.
+ */
template <class T, class Exact>
struct attr_traits<maxvalue_type<T, Exact> >
{
- typedef T value_type;
- typedef value_type lambda_type;
- typedef NullEnv env_type;
+ typedef T value_type; ///< Type of data.
+ typedef value_type lambda_type; ///< Type of lambda.
+ typedef env::NullEnv env_type; ///< Type of environment.
};
- // minvalue traits
+ /*!
+ ** \brief Trait specialization for the minvalue attribute.
+ */
template <class T, class Exact>
struct attr_traits<minvalue_type<T, Exact> >
{
- typedef T value_type;
- typedef value_type lambda_type;
- typedef NullEnv env_type;
+ typedef T value_type; ///< Type of data.
+ typedef value_type lambda_type; ///< Type of lambda.
+ typedef env::NullEnv env_type; ///< Type of environment.
};
- // ball traits
+ /*!
+ ** \brief Trait specialization for the ball attribute.
+ */
template <class I, class Exact>
struct attr_traits<ball_type<I, Exact> >
{
- typedef unsigned value_type;
- typedef value_type lambda_type;
- typedef NullEnv env_type;
+ typedef unsigned value_type; ///< Type of data.
+ typedef value_type lambda_type; ///< Type of lambda.
+ typedef oln::morpho::env::NullEnv env_type; ///< Type of environment.
};
- // dist traits
+ /*!
+ ** \brief Trait specialization for the dist attribute.
+ */
template <class I, class Exact>
struct attr_traits<dist_type<I, Exact> >
{
- typedef float value_type;
- typedef value_type lambda_type;
- typedef NullEnv env_type;
+ typedef float value_type; ///< Type of data.
+ typedef value_type lambda_type; ///< Type of lambda.
+ typedef oln::morpho::env::NullEnv env_type; ///< Type of environment.
};
- // cube traits
+ /*!
+ ** \brief Trait specialization for the cube attribute.
+ */
template <class I, class Exact>
struct attr_traits<cube_type<I, Exact> >
{
- typedef unsigned value_type;
- typedef value_type lambda_type;
- typedef NullEnv env_type;
+ typedef unsigned value_type; ///< Type of data.
+ typedef value_type lambda_type; ///< Type of lambda.
+ typedef oln::morpho::env::NullEnv env_type; ///< Type of environment.
};
- // box traits
+ /*!
+ ** \brief Trait specialization for the box attribute.
+ */
template <class I, class Exact>
struct attr_traits<box_type<I, Exact> >
{
- typedef unsigned value_type;
- typedef ntg::vec<I::dim, value_type, mlc::final> lambda_type;
- typedef NullEnv env_type;
+ typedef unsigned value_type; ///< Type of data.
+ typedef ntg::vec<I::dim, value_type, mlc::final> lambda_type; ///< Type of lambda.
+ typedef oln::morpho::env::NullEnv env_type; ///< Type of environment.
};
- // other_image traits
+ /*!
+ ** \brief Trait specialization for the other_image attribute.
+ */
template <class Dad, class I, class Exact>
struct attr_traits<other_image<Dad, I, Exact> >
{
//typedef typename change_exact<Dad, other_image<Dad, I, Exact> >::ret super_type;
typedef typename change_exact<Dad,
typename mlc::exact_vt<other_image<Dad, I, Exact>,
- Exact>::ret>::ret super_type;
- typedef attr_value_type(super_type) value_type;
- typedef attr_lambda_type(super_type) lambda_type;
- typedef OtherImageEnv<I> env_type;
- };
-
-// // other_point traits
-// template <class Dad, class I, class Exact>
-// struct attr_traits<other_point<Dad, I, Exact> >
-// {
-// //typedef typename change_exact<Dad, other_image<Dad, I, Exact> >::ret super_type;
-// typedef typename change_exact<Dad,
-// typename mlc::exact_vt<other_point<Dad, I, Exact>,
-// Exact>::ret>::ret super_type;
-// typedef attr_value_type(super_type) value_type;
-// typedef attr_lambda_tye(super_type) lambda_type;
-// typedef OtherPointEnv<I> env_type;
-// };
+ Exact>::ret>::ret super_type; ///< Parent class type.
+ typedef attr_value_type(super_type) value_type; ///< Type of data.
+ typedef attr_lambda_type(super_type) lambda_type; ///< Type of lambda.
+ typedef oln::morpho::env::OtherImageEnv<I> env_type; ///< Type of environment.
+ };
+
+ /*!
+ ** \brief Trait specialization for the ball_parent_change attribute.
+ */
+ template <class I, class Exact>
+ struct attr_traits<ball_parent_change<I, Exact> >
+ {
+ typedef unsigned value_type; ///< Type of data.
+ typedef value_type lambda_type; ///< Type of lambda.
+ typedef env::ParentEnv<I> env_type; ///< Type of environment.
+ };
// traits for other_image derivation
@@ -1725,17 +1805,7 @@
typedef integral_type<T, NewExact> ret;
};
-// /*!
-// ** \brief Change the exact type of an attribute.
-// **
-// ** Traits to change dist_type exact type.
-// */
-// template <class NewExact, class OldExact, class T>
-// struct change_exact<dist_type<T, OldExact>, NewExact>
-// {
-// typedef dist_type<T, NewExact> ret;
-// };
-
+ }// !attr
} // !morpho
} //!oln
@@ -1748,3 +1818,4 @@
#endif // !OLN_MORPHO_ATTRIBUTES
+
Index: olena/oln/morpho/attribute_closing_opening_map.hh
--- olena/oln/morpho/attribute_closing_opening_map.hh Tue, 23 Mar 2004 13:37:46 +0100 van-vl_n (oln/j/49_attribute_ 1.10 600)
+++ olena/oln/morpho/attribute_closing_opening_map.hh Wed, 24 Mar 2004 12:01:08 +0100 palma_g (oln/j/49_attribute_ 1.10 600)
@@ -61,7 +61,7 @@
** \param D Attribute exact type.
** \param Env Type of environment.
*/
- template <class I, class D, class Env = morpho::NullEnv>
+ template <class I, class D, class Env = morpho::env::NullEnv>
struct f_tarjan_map
{
public:
@@ -213,10 +213,10 @@
oln_concrete_type(I) \
T##_opening(const abstract::non_vectorial_image<I>& input, \
const abstract::neighborhood<N>& ng, \
- const attr_lambda_type(T##_type<>)& lambda) \
+ const attr_lambda_type(attr::T##_type<>)& lambda) \
{ \
- return tarjan_map<T##_type<>, I, N>(false, input, ng, lambda, \
- attr_env_type(T##_type<>)()); \
+ return tarjan_map<attr::T##_type<>, I, N>(false, input, ng, lambda, \
+ attr_env_type(attr::T##_type<>)()); \
}
// same but attribute take care of the image type
@@ -225,10 +225,10 @@
oln_concrete_type(I) \
T##_opening(const abstract::non_vectorial_image<I>& input, \
const abstract::neighborhood<N>& ng, \
- const attr_lambda_type(T##_type<I>)& lambda) \
+ const attr_lambda_type(attr::T##_type<I>)& lambda) \
{ \
- return tarjan_map<T##_type<I>, I, N>(false, input, ng, lambda, \
- attr_env_type(T##_type<I>)()); \
+ return tarjan_map<attr::T##_type<I>, I, N>(false, input, ng, lambda, \
+ attr_env_type(attr::T##_type<I>)()); \
}
//return input;
@@ -239,10 +239,10 @@
oln_concrete_type(I) \
T##_closing(const abstract::non_vectorial_image<I>& input, \
const abstract::neighborhood<N>& ng, \
- const attr_lambda_type(T##_type<>)& lambda) \
+ const attr_lambda_type(attr::T##_type<>)& lambda) \
{ \
- return tarjan_map<T##_type<>, I, N>(true, input, ng, lambda, \
- attr_env_type(T##_type<>)()); \
+ return tarjan_map<attr::T##_type<>, I, N>(true, input, ng, lambda, \
+ attr_env_type(attr::T##_type<>)()); \
}
// same but attribute take care of the image type
@@ -251,10 +251,10 @@
oln_concrete_type(I) \
T##_closing(const abstract::non_vectorial_image<I>& input, \
const abstract::neighborhood<N>& ng, \
- const attr_lambda_type(T##_type<I>)& lambda) \
+ const attr_lambda_type(attr::T##_type<I>)& lambda) \
{ \
- return tarjan_map<T##_type<I>, I, N>(true, input, ng, lambda, \
- attr_env_type(T##_type<I>)());\
+ return tarjan_map<attr::T##_type<I>, I, N>(true, input, ng, lambda, \
+ attr_env_type(attr::T##_type<I>)());\
}
/*!
Index: olena/tests/morpho/tests/attribute
--- olena/tests/morpho/tests/attribute Mon, 15 Mar 2004 17:17:49 +0100 palma_g (oln/j/51_attribute 1.4 644)
+++ olena/tests/morpho/tests/attribute Wed, 24 Mar 2004 12:07:10 +0100 palma_g (oln/j/51_attribute 1.4 644)
@@ -28,7 +28,7 @@
bool fail(false);
typedef image2d<int_u8> img_type;
- typedef oln::morpho::card_type<unsigned> area_type;
+ typedef oln::morpho::attr::card_type<unsigned> area_type;
const area_type::lambda_type area = 100;
const neighborhood2d nb = neighb_c8();
// const oln::morpho::NullEnv env;
Index: doc/ref/doxygen.config.in
--- doc/ref/doxygen.config.in Mon, 15 Mar 2004 16:47:03 +0100 palma_g (oln/v/29_doxygen.co 1.3 644)
+++ doc/ref/doxygen.config.in Wed, 24 Mar 2004 12:03:43 +0100 palma_g (oln/v/29_doxygen.co 1.3 644)
@@ -206,8 +206,3 @@
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = YES
-CGI_NAME = search.cgi
-CGI_URL =
-DOC_URL =
-DOC_ABSPATH =
-BIN_ABSPATH = /usr/local/bin/
Index: olena/oln/morpho/environments.hh
--- olena/oln/morpho/environments.hh Thu, 25 Mar 2004 14:59:49 +0100 palma_g ()
+++ olena/oln/morpho/environments.hh Wed, 24 Mar 2004 17:53:34 +0100 palma_g (oln/m/17_environmen 644)
@@ -0,0 +1,110 @@
+// Copyright (C) 2004 EPITA Research and Development Laboratory
+//
+// 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, 59 Temple Place - Suite 330, 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 OLN_MORPHO_ENVIRONMENTS_HH
+# define OLN_MORPHO_ENVIRONMENTS_HH
+# include <oln/basics.hh>
+# include <mlc/type.hh>
+
+namespace oln
+{
+ namespace morpho
+ {
+ /*! \brief Implementation of environments used by attributes.
+ */
+ namespace env
+ {
+ /*! brief Abstract stuff for environments.
+ */
+ namespace abstract
+ {
+ /*!
+ ** \brief Top of environment hierarchy.
+ */
+ template <class Exact>
+ struct env: public mlc_hierarchy::any<Exact>
+ {
+ };
+ } // !abstract
+
+ /*!
+ ** \brief Useless environment.
+ **
+ ** This environment is an empty one.
+ */
+ struct NullEnv: public abstract::env<NullEnv>
+ {
+ };
+
+ /*!
+ ** \brief Environment containing image.
+ **
+ ** Used for image substitution in other_image attribute.
+ */
+ template <class I>
+ struct OtherImageEnv: public abstract::env<OtherImageEnv<I> >
+ {
+ typedef oln::abstract::image<I> im_type;
+
+ OtherImageEnv(const oln::abstract::image<I> &im): im_(im)
+ {};
+
+ const im_type &getImage() const
+ {
+ return im_;
+ }
+
+ protected:
+ const im_type &im_;
+ };
+
+ /*!
+ ** \brief Environment containing point.
+ **
+ ** Used for point substitution in other_point attribute.
+ */
+ template <class I>
+ struct ParentEnv: public abstract::env<ParentEnv<I> >
+ {
+ typedef oln::abstract::image<I> im_type;
+
+ ParentEnv(const oln::abstract::image<I> &im): im_(im)
+ {};
+
+ const im_type &getParent() const
+ {
+ return im_;
+ }
+
+ protected:
+ const im_type &im_;
+ };
+
+ }
+ }
+}
+#endif // !OLN_MORPHO_ENVIRONMENTS_HH
--
Giovanni Palma
EPITA - promo 2005 - membre d'EpX - LRDE
Mob. : +33 (0)6 60 97 31 74
2
2
Index: olena/ChangeLog
from Giovanni Palma <giovanni(a)lrde.epita.fr>
* tests/topo/tests/md5_topo_dmap_hh0: Add file.
* tests/topo/tests/md5_topo_tarjan_flat-zone_hh0: Likewise.
+2004-03-23 Giovanni Palma <giovanni(a)lrde.epita.fr>
+
* tests/morpho/tests/md5_morpho_attribute_closing_opening_hh2: Add file.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_hh3: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_hh4: Likewise.
Index: olena/tests/topo/tests/md5_topo_tarjan_flat-zone_hh0
--- olena/tests/topo/tests/md5_topo_tarjan_flat-zone_hh0 Tue, 23 Mar 2004 15:47:49 +0100 palma_g ()
+++ olena/tests/topo/tests/md5_topo_tarjan_flat-zone_hh0 Tue, 23 Mar 2004 12:29:52 +0100 palma_g (oln/m/12_md5_topo_t 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/topo/tarjan/flat-zone.hh>
+#include <oln/convert/stretch.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x23, 0x57, 0x37, 0xc5, 0xf5, 0xd1, 0x56, 0x6b, 0x6a, 0x2b, 0x6b, 0xe6, 0x59, 0x5b, 0xbb, 0x57};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> img_type;
+ img_type in = oln::load(rdata("test-cmap.pgm"));
+ oln::topo::tarjan::flat_zone<img_type> z(in);
+ if (oln::utils::md5(oln::convert::stretch_balance<ntg::
+int_u8>(z.label, 0, 255)) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/topo/tests/md5_topo_dmap_hh0
--- olena/tests/topo/tests/md5_topo_dmap_hh0 Tue, 23 Mar 2004 15:47:49 +0100 palma_g ()
+++ olena/tests/topo/tests/md5_topo_dmap_hh0 Tue, 23 Mar 2004 12:29:37 +0100 palma_g (oln/m/13_md5_topo_d 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/topo/dmap.hh>
+#include <oln/convert/stretch.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xd8, 0x5e, 0x6b, 0xc7, 0x80, 0xa6, 0xf5, 0xa2, 0x98, 0x76, 0xb2, 0x90, 0x7c, 0x45, 0x83, 0x57};
+
+oln::utils::key key(data_key);
+
+ oln::image2d<ntg::bin> in = oln::load(rdata("face_se.pbm"));
+ oln::topo::dmap<ntg::
+int_u<16>,
+int> m(in.size(), oln::topo::chessboard());
+ m.compute(in);
+ if (oln::utils::md5(oln::convert::stretch_balance<ntg::
+int_u8>(m.imap())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
--
Giovanni Palma
EPITA - promo 2005 - membre d'EpX - LRDE
Mob. : +33 (0)6 60 97 31 74
2
1
Index: olena/ChangeLog
from Giovanni Palma <giovanni(a)lrde.epita.fr>
* olena/tests/level/tests/md5_level_set_level_hh0: Add file.
* olena/tests/level/tests/md5_level_threshold_hh0: Likewise.
+2004-03-23 Giovanni Palma <giovanni(a)lrde.epita.fr>
+
* tests/topo/tests/md5_topo_dmap_hh0: Add file.
* tests/topo/tests/md5_topo_tarjan_flat-zone_hh0: Likewise.
Index: olena/tests/level/tests/md5_level_threshold_hh0
--- olena/tests/level/tests/md5_level_threshold_hh0 Tue, 23 Mar 2004 15:57:58 +0100 palma_g ()
+++ olena/tests/level/tests/md5_level_threshold_hh0 Tue, 23 Mar 2004 12:08:28 +0100 palma_g (oln/m/14_md5_level_ 644)
@@ -0,0 +1,33 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/level/threshold.hh>
+#include <ntg/all.hh>
+using namespace ntg;
+
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x98, 0xf0, 0x2f, 0x75, 0x92, 0x22, 0xbe, 0x3f, 0x36, 0x10, 0x44, 0x1e, 0x53, 0xf3, 0xb9, 0xce};
+
+oln::utils::key key(data_key);
+
+ oln::image2d<
+int_u8> in = oln::load(rdata("lena256.pgm"));
+
+int_u8 th = 127;
+ rgb_8 low = rgb_8(100, 0, 0);
+ rgb_8 height = rgb_8(0, 200, 255);
+ oln::image2d<rgb_8> out = apply(oln::level::threshold<
+int_u8, rgb_8 >(th, low, height), in);
+ if (oln::utils::md5(out) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/level/tests/md5_level_set_level_hh0
--- olena/tests/level/tests/md5_level_set_level_hh0 Tue, 23 Mar 2004 15:57:58 +0100 palma_g ()
+++ olena/tests/level/tests/md5_level_set_level_hh0 Tue, 23 Mar 2004 15:52:08 +0100 palma_g (oln/m/15_md5_level_ 644)
@@ -0,0 +1,37 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/level/set_level.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+ oln::utils::key::value_type data_key[16] = {0xdd, 0x90, 0x28, 0xf1, 0xd2,
+ 0x6f, 0xd3, 0xfb, 0x64, 0x60,
+ 0x80, 0xaa, 0x11, 0xbc, 0x3e,
+ 0xd6};
+
+ oln::utils::key key(data_key);
+
+ oln::image2d<ntg::int_u8> in = oln::load(rdata("lena256.pgm"));
+ oln::coord R = in.nrows();
+ oln::coord C = in.ncols();
+ oln::level::set_level(in,
+ oln::point2d(R * 1/4, C* 1/2),
+ oln::point2d(R * 4/5, C* 7/8),
+ 0);
+ oln::box<oln::point2d> b;
+ b.add(oln::point2d(R * 1/6, C * 1/6));
+ b.add(oln::point2d(R * 4/5, C * 1/3));
+ oln::level::set_level(in, b, 255);
+ if (oln::utils::md5(in) == key)
+ std::cout << "OK" << std::endl;
+ else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+}
--
Giovanni Palma
EPITA - promo 2005 - membre d'EpX - LRDE
Mob. : +33 (0)6 60 97 31 74
2
1
Index: olena/ChangeLog
from Giovanni Palma <giovanni(a)lrde.epita.fr>
* olena/tests/level/tests/md5_level_hh0: Add file.
+2004-03-23 Giovanni Palma <giovanni(a)lrde.epita.fr>
+
* olena/tests/level/tests/md5_level_set_level_hh0: Add file.
* olena/tests/level/tests/md5_level_threshold_hh0: Likewise.
Index: olena/tests/level/tests/md5_level_hh0
--- olena/tests/level/tests/md5_level_hh0 Tue, 23 Mar 2004 16:05:35 +0100 palma_g ()
+++ olena/tests/level/tests/md5_level_hh0 Tue, 23 Mar 2004 16:03:28 +0100 palma_g (oln/m/16_md5_level_ 644)
@@ -0,0 +1,32 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/level/cc.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+ oln::utils::key::value_type data_key[16] = {0x50, 0x24, 0x28, 0x80, 0x6e,
+ 0x54, 0x9b, 0x5a, 0xff, 0x19,
+ 0xf, 0xcd, 0x4b, 0xe0, 0x38,
+ 0x3d};
+ oln::utils::key key(data_key);
+
+ unsigned card;
+ oln::image2d<ntg::bin> light = oln::load(rdata("face_se.pbm"));
+ if (oln::utils::md5(oln::level::frontp_connected_component<ntg::int_u8>
+ (light,
+ oln::neighb_c8(),
+ card)) == key)
+ std::cout << "OK" << std::endl;
+ else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ std::cout << card << " connected components" << std::endl;
+}
--
Giovanni Palma
EPITA - promo 2005 - membre d'EpX - LRDE
Mob. : +33 (0)6 60 97 31 74
2
1
Index: integre/ChangeLog
from Giovanni Palma <giovanni(a)lrde.epita.fr>
* ntg/core/macros.hh: Add ntg_nbits macro.
Index: olena/ChangeLog
from Giovanni Palma <giovanni(a)lrde.epita.fr>
* oln/utils/buffer.hxx: Add file.
* oln/utils/buffer.hh: Likewise.
* oln/utils/key.hh: Likewise.
* oln/utils/key.hxx: Likewise.
* oln/utils/md5.hh: Likewise.
* oln/utils/md5.hxx: Likewise.
+2004-03-19 Giovanni Palma <giovanni(a)lrde.epita.fr>
+
* oln/convol/fast_gaussian.hh: Correct comments.
* oln/io/se_window.hh: Likewise.
* oln/transforms/dwt.hh: Likewise.
Index: integre/ntg/core/macros.hh
--- integre/ntg/core/macros.hh Sat, 03 Jan 2004 17:25:53 +0100 burrus_n (oln/s/19_macros.hh 1.9 640)
+++ integre/ntg/core/macros.hh Fri, 19 Mar 2004 15:03:05 +0100 palma_g (oln/s/19_macros.hh 1.9 640)
@@ -154,4 +154,10 @@
// FIXME: reimplement when variadic macros will be allowed.
# define ntg_get_value_type(T, E) ntg::type_traits<T>::build_value_type<E>
+
+/* ----.
+| Misc |
+`-----*/
+#define ntg_nbits(T) ntg::internal::typetraits<T>::size
+
#endif // !NTG_CORE_MACROS_HH
Index: olena/oln/utils/buffer.hxx
--- olena/oln/utils/buffer.hxx Fri, 19 Mar 2004 15:52:00 +0100 palma_g ()
+++ olena/oln/utils/buffer.hxx Fri, 19 Mar 2004 15:48:04 +0100 palma_g (oln/k/9_buffer.hxx 644)
@@ -0,0 +1,167 @@
+// Copyright (C) 2004 EPITA Research and Development Laboratory
+//
+// 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, 59 Temple Place - Suite 330, 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 OLENA_OLN_UTILS_BUFFER_HXX
+# define OLENA_OLN_UTILS_BUFFER_HXX
+
+// Ctor implementation
+inline
+buffer::buffer(): current_bit_(0),
+ data_(),
+ len1_(ntg_zero_val(value_type)),
+ len2_(ntg_zero_val(value_type)),
+ padding_appended_(false),
+ length_appended_(false)
+{
+ data_.reserve(length_);
+ data_.push_back(ntg_zero_val(value_type));
+};
+
+// add implementation
+template <class E>
+inline
+void buffer::add(const E &e, bool count)
+{
+ ntg_storage_type(E) mask = 1 << (ntg_nbits(E) - 1);
+ ntg_storage_type(E) e_cast = e;
+
+ while (mask)
+ {
+ push_back(e_cast & mask, !count);
+ mask >>= 1;
+ }
+};
+
+// push_back implementation
+inline
+void buffer::push_back(bool bit, bool is_padding)
+{
+ precondition(current_bit_ < 32);
+
+ current_bit_ += 1;
+ data_.back() *= 2;
+ if (bit)
+ data_.back() += ntg_unit_val(value_type);
+ if (current_bit_ == 32)
+ {
+ if (data_.size() == data_.capacity())
+ data_.reserve(data_.capacity() + length_);
+ current_bit_ = 0;
+ data_.push_back(ntg_zero_val(value_type));
+ }
+ if (!is_padding)
+ {
+ if (len1_ == ntg_max_val(value_type))
+ {
+ if (len2_ == ntg_max_val(value_type))
+ len2_ = ntg_unit_val(value_type);
+ else
+ len2_ += ntg_unit_val(value_type);
+ }
+ len1_ += ntg_unit_val(value_type);
+ }
+}
+
+// reorder implementation
+inline
+buffer::value_type buffer::reorder(value_type x) const
+{
+ ntg_storage_type_(value_type) r = 0;
+ ntg_storage_type_(value_type) mask = 0xFF;
+
+ for (unsigned i = 0; i < (sizeof(ntg_storage_type_(value_type))); ++i)
+ {
+ r <<= 8;
+ r |= (mask & ntg_storage_type_(value_type)(x)) >> (i * 8);
+ mask <<= 8;
+ }
+ return r;
+}
+
+// [] operator implementation
+inline
+ntg::int_u32 buffer::operator[] (unsigned n) const
+{
+ precondition(n < data_.size());
+
+ return reorder(data_[n]);
+};
+
+// append padding implementation
+inline
+void buffer::append_padding()
+{
+ push_back(true, true);
+ while (((data_.size() * 32) % 512) != 448)
+ push_back(false, true);
+ padding_appended_ = true;
+};
+
+// append_length implementation
+inline
+void buffer::append_length()
+{
+ precondition(padding_appended_);
+
+ add(reorder(len2_), false);
+ add(reorder(len1_), false);
+ std::cout << len2_ << len1_<< std::endl;
+ std::cout << (*this)[data_.size()-2] << (*this)[data_.size()-1] << std::endl;
+ std::cout << data_.size() - 1<< std::endl;
+ std::cout << (*this)[14]<< std::endl;
+ length_appended_ = true;
+};
+
+// size implementation.
+inline
+unsigned buffer::size() const
+{
+ return data_.size();
+};
+
+// bit len implementation.
+inline
+unsigned buffer::bit_len() const
+{
+ return data_.size() * 32;
+}
+
+// is_append_padding implementation.
+inline
+bool buffer::is_append_padding() const
+{
+ return padding_appended_;
+}
+
+// is append_length implementation.
+inline
+bool buffer::is_append_length() const
+{
+ return length_appended_;
+}
+
+#endif // !OLENA_OLN_UTILS_BUFFER_HXX
Index: olena/oln/utils/buffer.hh
--- olena/oln/utils/buffer.hh Fri, 19 Mar 2004 15:52:00 +0100 palma_g ()
+++ olena/oln/utils/buffer.hh Fri, 19 Mar 2004 15:47:36 +0100 palma_g (oln/k/10_buffer.hh 644)
@@ -0,0 +1,125 @@
+// Copyright (C) 2004 EPITA Research and Development Laboratory
+//
+// 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, 59 Temple Place - Suite 330, 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 OLENA_OLN_UTILS_BUFFER_HH
+# define OLENA_OLN_UTILS_BUFFER_HH
+
+
+namespace oln {
+ namespace utils {
+ /*!
+ ** \brief Buffer used for MD5 data type abstraction.
+ */
+ class buffer
+ {
+ public:
+ typedef ntg::int_u32 value_type; ///< Used data type.
+
+ /*!
+ ** \brief Initialization of data.
+ */
+ buffer();
+
+ /*!
+ ** \brief Add every bits of e in data.
+ **
+ ** \arg e Element to work on.
+ ** \arg count Tell if you want to count e size in the buffer size.
+ */
+ template <class E>
+ void add(const E &e, bool count = true);
+
+ /*!
+ ** \brief Push back a bit at the end of the buffer.
+ **
+ ** true -> push back a 1\n
+ ** false -> push back a 0\n
+ **
+ ** \arg bit Bit to push.
+ ** \arg is_padding Are you adding padding bytes ?
+ */
+ void push_back(bool bit, bool is_padding = false);
+
+ /*!
+ ** \brief Return the nth word.
+ */
+ ntg::int_u32 operator[] (unsigned n) const;
+
+ /*!
+ ** \brief Append padding bits.
+ */
+ void append_padding();
+
+ /*!
+ ** \brief Append length.
+ */
+ void append_length();
+
+ /*!
+ ** \brief Return the number of words.
+ */
+ unsigned size() const;
+
+ /*!
+ ** \brief Return the length in bits.
+ */
+ unsigned bit_len() const;
+
+ /*!
+ ** \brief Tell if the buffer has already been padded.
+ */
+ bool is_append_padding() const;
+
+ /*!
+ ** \brief Tell if the length has already been appended.
+ */
+ bool is_append_length() const;
+
+ protected:
+ /*!
+ ** \brief Change order of data in a word.
+ **
+ ** \arg x Data to reorder.
+ */
+ value_type reorder(value_type x) const;
+
+ static const unsigned length_ = 100; ///< Capacity chunk.
+ /// Number of the current bit in the current word.
+ unsigned char current_bit_;
+ std::vector<value_type> data_; ///< The buffer data.
+ value_type len1_; ///< first word length
+ value_type len2_; ///< second word length
+ bool padding_appended_; ///< Status of padding.
+ bool length_appended_; ///< Status of length appending.
+ };
+
+# include <oln/utils/buffer.hxx>
+
+ } // !utils
+} // !oln
+#endif // !OLENA_OLN_UTILS_BUFFER_HH
Index: olena/oln/utils/key.hxx
--- olena/oln/utils/key.hxx Fri, 19 Mar 2004 15:52:00 +0100 palma_g ()
+++ olena/oln/utils/key.hxx Fri, 19 Mar 2004 15:45:46 +0100 palma_g (oln/k/11_key.hxx 644)
@@ -0,0 +1,72 @@
+// Copyright (C) 2004 EPITA Research and Development Laboratory
+//
+// 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, 59 Temple Place - Suite 330, 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 OLENA_OLN_UTILS_KEY_HXX
+# define OLENA_OLN_UTILS_KEY_HXX
+
+// Ctor implementation.
+inline
+key::key(const std::vector<value_type> &data)
+{
+ for (unsigned i = 0; i < 16; ++i)
+ data_[i] = data[i];
+}
+
+// [] operator implementation
+inline
+key::value_type &key::operator[](unsigned i)
+{
+ precondition(i < 16);
+ return data_[i];
+};
+
+// [] operator
+inline
+const key::value_type &key::operator[](unsigned i) const
+{
+ precondition(i < 16);
+ return data_[i];
+};
+
+// == operator
+inline
+bool key::operator ==(const key &k)
+{
+ for (unsigned i = 0; i < 16; ++i)
+ if (data_[i] != k[i])
+ return false;
+ return true;
+}
+
+// != operator
+inline
+bool key::operator !=(const key &k)
+{
+ return !(*this == k);
+}
+
+#endif // !OLENA_OLN_UTILS_KEY_HXX
Index: olena/oln/utils/key.hh
--- olena/oln/utils/key.hh Fri, 19 Mar 2004 15:52:00 +0100 palma_g ()
+++ olena/oln/utils/key.hh Fri, 19 Mar 2004 15:35:37 +0100 palma_g (oln/k/12_key.hh 644)
@@ -0,0 +1,112 @@
+// Copyright (C) 2004 EPITA Research and Development Laboratory
+//
+// 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, 59 Temple Place - Suite 330, 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 OLENA_OLN_UTILS_KEY_HH
+# define OLENA_OLN_UTILS_KEY_HH
+# include <ntg/all.hh>
+# include <vector>
+# include <iostream>
+
+namespace oln {
+ namespace utils {
+ /*!
+ ** \brief 16 bytes key
+ **
+ ** Object to have a nice representation of a MD5 result.
+ */
+ class key
+ {
+ public:
+ typedef ntg::int_u8 value_type; ///< Used data type.
+
+ /*!
+ ** \brief Constructor used to initialize the key.
+ **
+ ** \pre There must at least 16 elements in data.
+ ** \arg data Inuput data.
+ */
+ explicit key(const std::vector<value_type> &data);
+
+ /*!
+ ** \brief [] operator.
+ **
+ ** \return the ith byte of the key.
+ **
+ ** \arg i Index of the byte wanted.
+ **
+ ** This is the non const version of the operator.
+ */
+ value_type &operator[](unsigned i);
+
+ /*!
+ ** \brief [] operator.
+ **
+ ** \return the ith byte of the key.
+ **
+ ** \arg i Index of the byte wanted.
+ **
+ ** This is the const version of the operator.
+ */
+ const value_type &operator[](unsigned i) const;
+
+ /*!
+ ** \brief Check equality between two keys.
+ **
+ ** \arg k Key to be compared with.
+ */
+ bool operator ==(const key &k);
+
+ /*!
+ ** \brief Check whether two key are different.
+ **
+ ** \arg k Key to be compared with.
+ */
+ bool operator !=(const key &k);
+
+ /*!
+ ** \brief Write of representation of the key on a stream.
+ **
+ ** stream Stream to put the key on.
+ ** k Key to represent.
+ */
+ friend std::ostream &operator<<(std::ostream &stream, const key &k)
+ {
+ for (unsigned i = 0; i < 16; ++i)
+ stream << std::hex << k[i];
+ return stream;
+ }
+
+
+ protected:
+ value_type data_[16]; ///< Internal data.
+ };
+
+# include <oln/utils/key.hxx>
+
+ } // !utils
+} // !oln
+#endif // !OLENA_OLN_UTILS_KEY_HH
Index: olena/oln/utils/md5.hxx
--- olena/oln/utils/md5.hxx Fri, 19 Mar 2004 15:52:00 +0100 palma_g ()
+++ olena/oln/utils/md5.hxx Fri, 19 Mar 2004 15:35:26 +0100 palma_g (oln/k/13_md5.hxx 644)
@@ -0,0 +1,284 @@
+// Copyright (C) 2004 EPITA Research and Development Laboratory
+//
+// 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, 59 Temple Place - Suite 330, 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 OLENA_OLN_UTILS_MD5_HXX
+# define OLENA_OLN_UTILS_MD5_HXX
+
+// Ctor.
+inline
+MD5::MD5(buffer b): buffer_(b),
+ X(16),
+ T(),
+ current_(0),
+ a(0x67452301),
+ b(0xefcdab89),
+ c(0x98badcfe),
+ d(0x10325476)
+ // a(0x01234567),
+ // b(0x89abcdef),
+ // c(0xfedcba98),
+ // d(0x76543210)
+{
+ precondition(buffer_.is_append_padding());
+ precondition(buffer_.is_append_length());
+ T.reserve(64);
+ T.push_back(0xd76aa478); /* 1 */
+ T.push_back(0xe8c7b756); /* 2 */
+ T.push_back(0x242070db); /* 3 */
+ T.push_back(0xc1bdceee); /* 4 */
+ T.push_back(0xf57c0faf); /* 5 */
+ T.push_back(0x4787c62a); /* 6 */
+ T.push_back(0xa8304613); /* 7 */
+ T.push_back(0xfd469501); /* 8 */
+ T.push_back(0x698098d8); /* 9 */
+ T.push_back(0x8b44f7af); /* 10 */
+ T.push_back(0xffff5bb1); /* 11 */
+ T.push_back(0x895cd7be); /* 12 */
+ T.push_back(0x6b901122); /* 13 */
+ T.push_back(0xfd987193); /* 14 */
+ T.push_back(0xa679438e); /* 15 */
+ T.push_back(0x49b40821); /* 16 */
+ T.push_back(0xf61e2562); /* 17 */
+ T.push_back(0xc040b340); /* 18 */
+ T.push_back(0x265e5a51); /* 19 */
+ T.push_back(0xe9b6c7aa); /* 20 */
+ T.push_back(0xd62f105d); /* 21 */
+ T.push_back(0x2441453); /* 22 */
+ T.push_back(0xd8a1e681); /* 23 */
+ T.push_back(0xe7d3fbc8); /* 24 */
+ T.push_back(0x21e1cde6); /* 25 */
+ T.push_back(0xc33707d6); /* 26 */
+ T.push_back(0xf4d50d87); /* 27 */
+ T.push_back(0x455a14ed); /* 28 */
+ T.push_back(0xa9e3e905); /* 29 */
+ T.push_back(0xfcefa3f8); /* 30 */
+ T.push_back(0x676f02d9); /* 31 */
+ T.push_back(0x8d2a4c8a); /* 32 */
+ T.push_back(0xfffa3942); /* 33 */
+ T.push_back(0x8771f681); /* 34 */
+ T.push_back(0x6d9d6122); /* 35 */
+ T.push_back(0xfde5380c); /* 36 */
+ T.push_back(0xa4beea44); /* 37 */
+ T.push_back(0x4bdecfa9); /* 38 */
+ T.push_back(0xf6bb4b60); /* 39 */
+ T.push_back(0xbebfbc70); /* 40 */
+ T.push_back(0x289b7ec6); /* 41 */
+ T.push_back(0xeaa127fa); /* 42 */
+ T.push_back(0xd4ef3085); /* 43 */
+ T.push_back(0x4881d05); /* 44 */
+ T.push_back(0xd9d4d039); /* 45 */
+ T.push_back(0xe6db99e5); /* 46 */
+ T.push_back(0x1fa27cf8); /* 47 */
+ T.push_back(0xc4ac5665); /* 48 */
+ T.push_back(0xf4292244); /* 49 */
+ T.push_back(0x432aff97); /* 50 */
+ T.push_back(0xab9423a7); /* 51 */
+ T.push_back(0xfc93a039); /* 52 */
+ T.push_back(0x655b59c3); /* 53 */
+ T.push_back(0x8f0ccc92); /* 54 */
+ T.push_back(0xffeff47d); /* 55 */
+ T.push_back(0x85845dd1); /* 56 */
+ T.push_back(0x6fa87e4f); /* 57 */
+ T.push_back(0xfe2ce6e0); /* 58 */
+ T.push_back(0xa3014314); /* 59 */
+ T.push_back(0x4e0811a1); /* 60 */
+ T.push_back(0xf7537e82); /* 61 */
+ T.push_back(0xbd3af235); /* 62 */
+ T.push_back(0x2ad7d2bb); /* 63 */
+ T.push_back(0xeb86d391); /* 64 */
+};
+
+// sav() implementation.
+inline
+void MD5::sav()
+{
+ for (unsigned i = 0; i < 16; ++i)
+ X[i] = buffer_[current_ + i];
+ current_ += 16;
+ aa = a;
+ bb = b;
+ cc = c;
+ dd = d;
+}
+
+// round1() implementation.
+inline
+void MD5::round1()
+{
+ sub_step(F, a, b, c, d, 0, 7, 1);
+ sub_step(F, d, a, b, c, 1, 12, 2);
+ sub_step(F, c, d, a, b, 2, 17, 3);
+ sub_step(F, b, c, d, a, 3, 22, 4);
+ sub_step(F, a, b, c, d, 4, 7, 5);
+ sub_step(F, d, a, b, c, 5, 12, 6);
+ sub_step(F, c, d, a, b, 6, 17, 7);
+ sub_step(F, b, c, d, a, 7, 22, 8);
+ sub_step(F, a, b, c, d, 8, 7, 9);
+ sub_step(F, d, a, b, c, 9, 12, 10);
+ sub_step(F, c, d, a, b, 10, 17, 11);
+ sub_step(F, b, c, d, a, 11, 22, 12);
+ sub_step(F, a, b, c, d, 12, 7, 13);
+ sub_step(F, d, a, b, c, 13, 12, 14);
+ sub_step(F, c, d, a, b, 14, 17, 15);
+ sub_step(F, b, c, d, a, 15, 22, 16);
+}
+
+// round2() implementation.
+inline
+void MD5::round2()
+{
+ sub_step(G, a, b, c, d, 1, 5, 17);
+ sub_step(G, d, a, b, c, 6, 9, 18);
+ sub_step(G, c, d, a, b, 11, 14, 19);
+ sub_step(G, b, c, d, a, 0, 20, 20);
+ sub_step(G, a, b, c, d, 5, 5, 21);
+ sub_step(G, d, a, b, c, 10, 9, 22);
+ sub_step(G, c, d, a, b, 15, 14, 23);
+ sub_step(G, b, c, d, a, 4, 20, 24);
+ sub_step(G, a, b, c, d, 9, 5, 25);
+ sub_step(G, d, a, b, c, 14, 9, 26);
+ sub_step(G, c, d, a, b, 3, 14, 27);
+ sub_step(G, b, c, d, a, 8, 20, 28);
+ sub_step(G, a, b, c, d, 13, 5, 29);
+ sub_step(G, d, a, b, c, 2, 9, 30);
+ sub_step(G, c, d, a, b, 7, 14, 31);
+ sub_step(G, b, c, d, a, 12, 20, 32);
+}
+
+// round3() implementation.
+inline
+void MD5::round3()
+{
+ sub_step(H, a, b, c, d, 5, 4, 33);
+ sub_step(H, d, a, b, c, 8, 11, 34);
+ sub_step(H, c, d, a, b, 11, 16, 35);
+ sub_step(H, b, c, d, a, 14, 23, 36);
+ sub_step(H, a, b, c, d, 1, 4, 37);
+ sub_step(H, d, a, b, c, 4, 11, 38);
+ sub_step(H, c, d, a, b, 7, 16, 39);
+ sub_step(H, b, c, d, a, 10, 23, 40);
+ sub_step(H, a, b, c, d, 13, 4, 41);
+ sub_step(H, d, a, b, c, 0, 11, 42);
+ sub_step(H, c, d, a, b, 3, 16, 43);
+ sub_step(H, b, c, d, a, 6, 23, 44);
+ sub_step(H, a, b, c, d, 9, 4, 45);
+ sub_step(H, d, a, b, c, 12, 11, 46);
+ sub_step(H, c, d, a, b, 15, 16, 47);
+ sub_step(H, b, c, d, a, 2, 23, 48);
+}
+
+// round 4() implementation.
+inline
+void MD5::round4()
+{
+ sub_step(I, a, b, c, d, 0, 6, 49);
+ sub_step(I, d, a, b, c, 7, 10, 50);
+ sub_step(I, c, d, a, b, 14, 15, 51);
+ sub_step(I, b, c, d, a, 5, 21, 52);
+ sub_step(I, a, b, c, d, 12, 6, 53);
+ sub_step(I, d, a, b, c, 3, 10, 54);
+ sub_step(I, c, d, a, b, 10, 15, 55);
+ sub_step(I, b, c, d, a, 1, 21, 56);
+ sub_step(I, a, b, c, d, 8, 6, 57);
+ sub_step(I, d, a, b, c, 15, 10, 58);
+ sub_step(I, c, d, a, b, 6, 15, 59);
+ sub_step(I, b, c, d, a, 13, 21, 60);
+ sub_step(I, a, b, c, d, 4, 6, 61);
+ sub_step(I, d, a, b, c, 11, 10, 62);
+ sub_step(I, c, d, a, b, 2, 15, 63);
+ sub_step(I, b, c, d, a, 9, 21, 64);
+}
+
+// step implementation.
+inline
+void MD5::step()
+{
+ sav();
+ round1();
+ round2();
+ round3();
+ round4();
+ a += aa;
+ b += bb;
+ c += cc;
+ d += dd;
+};
+
+// sub step implementation.
+template <class Fun>
+inline
+void MD5::sub_step(const Fun &fun,
+ storage_type &a,
+ const storage_type &b,
+ const storage_type &c,
+ const storage_type &d,
+ unsigned k,
+ unsigned s,
+ unsigned i)
+{
+ a += fun(b, c, d) + (X[k] + T[i - 1]);
+ a = a<<s | a>>(32-s);
+ a += b;
+ //a = b + ((a + fun(b, c, d) + X[k] + T[i - 1]) << s);
+}
+
+// gen_sub_key implementation.
+inline
+void MD5::gen_sub_key(std::vector<key::value_type> &v,
+ storage_type x,
+ unsigned base)
+{
+ base *= sizeof(value_type);
+
+ for (unsigned i = 0; i < sizeof(value_type); ++i)
+ v[base + i] = (x & (0xFF << (i * 8))) >> (i * 8);
+}
+
+// gen_key implementation.
+
+inline
+key MD5::gen_key()
+{
+ std::vector<key::value_type> k;
+
+ k.reserve(16);
+ gen_sub_key(k, a, 0);
+ gen_sub_key(k, b, 1);
+ gen_sub_key(k, c, 2);
+ gen_sub_key(k, d, 3);
+ return key(k);
+}
+
+// execute implementation.
+inline
+key MD5::execute()
+{
+ while (buffer_.size() > current_)
+ step();
+ return gen_key();
+}
+#endif // !OLENA_OLN_UTILS_MD5_HXX
Index: olena/oln/utils/md5.hh
--- olena/oln/utils/md5.hh Fri, 19 Mar 2004 15:52:00 +0100 palma_g ()
+++ olena/oln/utils/md5.hh Fri, 19 Mar 2004 15:35:12 +0100 palma_g (oln/k/14_md5.hh 644)
@@ -0,0 +1,204 @@
+// Copyright (C) 2004 EPITA Research and Development Laboratory
+//
+// 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, 59 Temple Place - Suite 330, 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 OLENA_OLN_UTILS_MD5_HH
+# define OLENA_OLN_UTILS_MD5_HH
+
+# include <ntg/all.hh>
+# include <vector>
+
+# include <oln/utils/key.hh>
+# include <oln/utils/buffer.hh>
+
+namespace oln {
+ namespace utils {
+ /*!
+ ** \brief Class used to compute a MD5 digest.
+ */
+ class MD5
+ {
+ public:
+ typedef ntg::int_u32 value_type; ///< Value to work on.
+ typedef ntg_storage_type_(value_type) storage_type; ///< Representation type of value type.
+
+ /*!
+ ** \brief Constructor.
+ **
+ ** Initialization from a buffer.
+ **
+ ** \arg The buffer to use.
+ */
+ explicit MD5(buffer b);
+
+ /*!
+ ** \brief Compute the digest.
+ */
+ key execute();
+
+ /*!
+ ** \brief Generate the key.
+ **
+ ** \pre To avoid meaningless result, you should call execute before.
+ */
+ key gen_key();
+
+ protected:
+ /*!
+ ** \brief initialization of a MD5 algorithm step.
+ */
+ void sav();
+
+ /*!
+ ** \brief Round 1 of the algorithm.
+ */
+ void round1();
+
+ /*!
+ ** \brief Round 2 of the algorithm.
+ */
+ void round2();
+
+ /*!
+ ** \brief Round 3 of the algorithm.
+ */
+ void round3();
+
+ /*!
+ ** \brief Round 4 of the algorithm.
+ */
+ void round4();
+
+ /*!
+ ** \brief A step of the algorithm.
+ */
+ void step();
+
+ /*!
+ ** \brief Sub step to update a register value.
+ */
+ template <class Fun>
+ void sub_step(const Fun &fun,
+ storage_type &a,
+ const storage_type &b,
+ const storage_type &c,
+ const storage_type &d,
+ unsigned k,
+ unsigned s,
+ unsigned i);
+
+ /*!
+ ** \brief Generate a sub part of the key.
+ **
+ ** \arg v Vector of values (output).
+ ** \arg x Data to put in v.
+ ** \arg base Where to put x in v.
+ */
+ void gen_sub_key(std::vector<key::value_type> &v,
+ storage_type x,
+ unsigned base);
+
+
+ buffer buffer_; ///< The buffer to process.
+ std::vector<storage_type> X; ///< Vector of 16 words.
+ std::vector<storage_type> T; ///< Vector of 64 words.
+ unsigned current_; ///< Current position in the buffer.
+ storage_type aa; ///< Save of a.
+ storage_type bb; ///< Save of b.
+ storage_type cc; ///< Save of c.
+ storage_type dd; ///< Save of d.
+ storage_type a; ///< A register.
+ storage_type b; ///< B register.
+ storage_type c; ///< C register.
+ storage_type d; ///< D register.
+
+ /*!
+ ** \brief Functor for bit operations.
+ **
+ ** F(X,Y,Z) = XY v not(X) Z
+ */
+ struct
+ {
+ storage_type operator()(const storage_type &x,
+ const storage_type &y,
+ const storage_type &z) const
+ {
+ // return z ^ (x & (y ^ z));
+ return x & y | ~x & z;
+ }
+ } F;
+
+ /*!
+ ** \brief Functor for bit operations.
+ **
+ ** G(X,Y,Z) = XZ v Y not(Z)
+ */
+ struct
+ {
+ storage_type operator()(const storage_type &x,
+ const storage_type &y,
+ const storage_type &z) const
+ {
+ return x & z | y & ~z;
+ }
+ } G;
+
+ /*!
+ ** \brief Functor for bit operations.
+ **
+ ** H(X,Y,Z) = X xor Y xor Z
+ */
+ struct
+ {
+ storage_type operator()(const storage_type &x,
+ const storage_type &y,
+ const storage_type &z) const
+ {
+ return x ^ y ^ z;
+ }
+ } H;
+
+ /*!
+ ** \brief Functor for bit operations.
+ **
+ ** I(X,Y,Z) = Y xor (X v not(Z))
+ */
+ struct
+ {
+ storage_type operator()(const storage_type &x,
+ const storage_type &y,
+ const storage_type &z) const
+ {
+ return y ^ (x | ~z);
+ }
+ } I;
+ };
+
+#include <oln/utils/md5.hxx>
+
+ } // !utils
+} // !oln
+#endif // !OLENA_OLN_UTILS_MD5_HH
--
Giovanni Palma
EPITA - promo 2005 - membre d'EpX - LRDE
Mob. : +33 (0)6 60 97 31 74
2
3
Index: olena/ChangeLog
from Giovanni Palma <giovanni(a)lrde.epita.fr>
* tests/morpho/tests/md5_morpho_attribute_closing_opening_hh2: Add file.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_hh3: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_hh4: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_hh5: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_hh6: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_hh7: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_hh8: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_hh9: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh0: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh1: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh2: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh3: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh4: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh5: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh0: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh1: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh10: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh11: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh12: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh13: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh14: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh15: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh16: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh17: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh2: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh3: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh4: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh5: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh6: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh7: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh8: Likewise.
* tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh9: Likewise.
* tests/morpho/tests/md5_morpho_closing_inc0: Likewise.
* tests/morpho/tests/md5_morpho_dilation_hh0: Likewise.
* tests/morpho/tests/md5_morpho_dilation_hh1: Likewise.
* tests/morpho/tests/md5_morpho_erosion_hh0: Likewise.
* tests/morpho/tests/md5_morpho_erosion_hh1: Likewise.
* tests/morpho/tests/md5_morpho_erosion_hh2: Likewise.
* tests/morpho/tests/md5_morpho_extrema_hxx0: Likewise.
* tests/morpho/tests/md5_morpho_extrema_hxx1: Likewise.
* tests/morpho/tests/md5_morpho_extrema_killer_hh0: Likewise.
* tests/morpho/tests/md5_morpho_extrema_killer_hh1: Likewise.
* tests/morpho/tests/md5_morpho_extrema_killer_hh2: Likewise.
* tests/morpho/tests/md5_morpho_extrema_killer_hh3: Likewise.
* tests/morpho/tests/md5_morpho_fast_morpho_hxx0: Likewise.
* tests/morpho/tests/md5_morpho_geodesic_dilation_hh0: Likewise.
* tests/morpho/tests/md5_morpho_geodesic_dilation_hh1: Likewise.
* tests/morpho/tests/md5_morpho_geodesic_erosion_hh0: Likewise.
* tests/morpho/tests/md5_morpho_geodesic_erosion_hh1: Likewise.
* tests/morpho/tests/md5_morpho_gradient_inc0: Likewise.
* tests/morpho/tests/md5_morpho_hit_or_miss_inc0: Likewise.
* tests/morpho/tests/md5_morpho_hit_or_miss_inc1: Likewise.
* tests/morpho/tests/md5_morpho_hit_or_miss_inc2: Likewise.
* tests/morpho/tests/md5_morpho_hit_or_miss_inc3: Likewise.
* tests/morpho/tests/md5_morpho_hit_or_miss_inc4: Likewise.
* tests/morpho/tests/md5_morpho_hit_or_miss_inc5: Likewise.
* tests/morpho/tests/md5_morpho_laplacian_inc0: Likewise.
* tests/morpho/tests/md5_morpho_laplacian_inc1: Likewise.
* tests/morpho/tests/md5_morpho_opening_inc0: Likewise.
* tests/morpho/tests/md5_morpho_reconstruction_hh0: Likewise.
* tests/morpho/tests/md5_morpho_reconstruction_hh1: Likewise.
* tests/morpho/tests/md5_morpho_reconstruction_hh2: Likewise.
* tests/morpho/tests/md5_morpho_reconstruction_hh3: Likewise.
* tests/morpho/tests/md5_morpho_reconstruction_hh4: Likewise.
* tests/morpho/tests/md5_morpho_reconstruction_hh5: Likewise.
* tests/morpho/tests/md5_morpho_thickening_inc0: Likewise.
* tests/morpho/tests/md5_morpho_thinning_inc0: Likewise.
* tests/morpho/tests/md5_morpho_top_hat_inc0: Likewise.
* tests/morpho/tests/md5_morpho_top_hat_inc1: Likewise.
* tests/morpho/tests/md5_morpho_top_hat_inc2: Likewise.
* tests/morpho/tests/md5_morpho_top_hat_inc3: Likewise.
* tests/morpho/tests/md5_morpho_top_hat_inc4: Likewise.
* tests/morpho/tests/md5_morpho_top_hat_inc5: Likewise.
* tests/morpho/tests/md5_morpho_top_hat_inc6: Likewise.
* tests/morpho/tests/md5_morpho_top_hat_inc7: Likewise.
* tests/morpho/tests/md5_morpho_watershed_hh0: Likewise.
* tests/morpho/tests/md5_morpho_watershed_hh1: Likewise.
+2004-03-23 Giovanni Palma <giovanni(a)lrde.epita.fr>
+
* tests/convol/tests/md5_convol_fast_gaussian_hh0: Add file.
* tests/convol/tests/md5_convol_fast_gaussian_hh1: Add file.
* tests/convol/tests/md5_convol_fast_gaussian_hh2: Add file.
Index: olena/tests/morpho/tests/md5_morpho_watershed_hh1
--- olena/tests/morpho/tests/md5_morpho_watershed_hh1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_watershed_hh1 Tue, 23 Mar 2004 12:29:22 +0100 palma_g (oln/k/29_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/watershed.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xdd, 0x59, 0x5a, 0x51, 0x68, 0xc5, 0xfc, 0xb7, 0x79, 0x67, 0x33, 0xa8, 0xd8, 0x40, 0x95, 0xd};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::watershed_con<ntg::
+int_u16>(im1, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_watershed_hh0
--- olena/tests/morpho/tests/md5_morpho_watershed_hh0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_watershed_hh0 Tue, 23 Mar 2004 12:29:08 +0100 palma_g (oln/k/30_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/watershed.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xc4, 0x69, 0x68, 0x78, 0xd6, 0x80, 0x46, 0x20, 0x3f, 0x93, 0x93, 0x46, 0x9c, 0x90, 0x8d, 0x5b};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::watershed_seg<ntg::
+int_u16>(im1, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_top_hat_inc7
--- olena/tests/morpho/tests/md5_morpho_top_hat_inc7 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_top_hat_inc7 Tue, 23 Mar 2004 12:28:54 +0100 palma_g (oln/k/31_md5_morpho 644)
@@ -0,0 +1,27 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/top_hat.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xaf, 0x25, 0x10, 0x99, 0x34, 0x55, 0xe, 0x76, 0xcc, 0x17, 0x67, 0xc2, 0xa1, 0xcf, 0x30, 0x39};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::fast::top_hat_contrast_op(im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_top_hat_inc6
--- olena/tests/morpho/tests/md5_morpho_top_hat_inc6 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_top_hat_inc6 Tue, 23 Mar 2004 12:28:37 +0100 palma_g (oln/k/32_md5_morpho 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/top_hat.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x17, 0x88, 0x32, 0xa0, 0x1, 0x54, 0x59, 0x87, 0x6b, 0x3d, 0x16, 0x3b, 0xb, 0x9, 0x2b, 0x33};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::fast::top_hat_contrast_op (oln::convert::bound<ntg::
+int_u8>(), im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_top_hat_inc5
--- olena/tests/morpho/tests/md5_morpho_top_hat_inc5 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_top_hat_inc5 Tue, 23 Mar 2004 12:28:21 +0100 palma_g (oln/k/33_md5_morpho 644)
@@ -0,0 +1,27 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/top_hat.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xe0, 0xe, 0x6, 0x89, 0x76, 0x32, 0x47, 0xe3, 0xe0, 0x75, 0xb1, 0x9d, 0xe0, 0xb5, 0xeb, 0x71};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::fast::self_complementary_top_hat(im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_top_hat_inc4
--- olena/tests/morpho/tests/md5_morpho_top_hat_inc4 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_top_hat_inc4 Tue, 23 Mar 2004 12:28:07 +0100 palma_g (oln/k/34_md5_morpho 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/top_hat.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xe0, 0xe, 0x6, 0x89, 0x76, 0x32, 0x47, 0xe3, 0xe0, 0x75, 0xb1, 0x9d, 0xe0, 0xb5, 0xeb, 0x71};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::fast::self_complementary_top_hat (oln::convert::bound<ntg::
+int_u8>(), im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_top_hat_inc3
--- olena/tests/morpho/tests/md5_morpho_top_hat_inc3 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_top_hat_inc3 Tue, 23 Mar 2004 12:27:52 +0100 palma_g (oln/k/35_md5_morpho 644)
@@ -0,0 +1,27 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/top_hat.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x32, 0x3f, 0x5, 0x6a, 0xde, 0xfb, 0x8, 0x59, 0x3e, 0x5f, 0xce, 0x48, 0xe3, 0xc3, 0x67, 0x76};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::fast::black_top_hat(im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_top_hat_inc2
--- olena/tests/morpho/tests/md5_morpho_top_hat_inc2 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_top_hat_inc2 Tue, 23 Mar 2004 12:27:39 +0100 palma_g (oln/k/36_md5_morpho 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/top_hat.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x32, 0x3f, 0x5, 0x6a, 0xde, 0xfb, 0x8, 0x59, 0x3e, 0x5f, 0xce, 0x48, 0xe3, 0xc3, 0x67, 0x76};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::fast::black_top_hat (oln::convert::bound<ntg::
+int_u8>(), im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_top_hat_inc1
--- olena/tests/morpho/tests/md5_morpho_top_hat_inc1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_top_hat_inc1 Tue, 23 Mar 2004 12:27:26 +0100 palma_g (oln/k/37_md5_morpho 644)
@@ -0,0 +1,27 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/top_hat.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x4c, 0xdb, 0xc2, 0x14, 0x4f, 0x96, 0xaa, 0x59, 0x3, 0x4b, 0x76, 0x3c, 0xb8, 0x3, 0x34, 0x5f};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::fast::white_top_hat(im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_top_hat_inc0
--- olena/tests/morpho/tests/md5_morpho_top_hat_inc0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_top_hat_inc0 Tue, 23 Mar 2004 12:27:14 +0100 palma_g (oln/k/38_md5_morpho 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/top_hat.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x4c, 0xdb, 0xc2, 0x14, 0x4f, 0x96, 0xaa, 0x59, 0x3, 0x4b, 0x76, 0x3c, 0xb8, 0x3, 0x34, 0x5f};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::fast::white_top_hat (oln::convert::bound<ntg::
+int_u8>(), im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_thinning_inc0
--- olena/tests/morpho/tests/md5_morpho_thinning_inc0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_thinning_inc0 Tue, 23 Mar 2004 12:27:01 +0100 palma_g (oln/k/39_md5_morpho 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/thinning.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x46, 0x11, 0x5, 0x21, 0x93, 0x3a, 0xd6, 0x15, 0x1e, 0xf0, 0x8a, 0x1, 0xf0, 0x32, 0x27, 0x9e};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::fast::thinning(im1, oln::win_c8p(), oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_thickening_inc0
--- olena/tests/morpho/tests/md5_morpho_thickening_inc0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_thickening_inc0 Tue, 23 Mar 2004 12:26:48 +0100 palma_g (oln/k/40_md5_morpho 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/thickening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x46, 0x11, 0x5, 0x21, 0x93, 0x3a, 0xd6, 0x15, 0x1e, 0xf0, 0x8a, 0x1, 0xf0, 0x32, 0x27, 0x9e};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::fast::thickening(im1, oln::win_c8p(), oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_reconstruction_hh5
--- olena/tests/morpho/tests/md5_morpho_reconstruction_hh5 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_reconstruction_hh5 Tue, 23 Mar 2004 12:26:36 +0100 palma_g (oln/k/41_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/opening.hh>
+#include <oln/morpho/reconstruction.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf6, 0x53, 0x89, 0x3, 0x4f, 0x26, 0xf0, 0xf4, 0x5b, 0xd7, 0xf1, 0x69, 0xc9, 0x8a, 0x55, 0x6a};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im_type im2(oln::morpho::opening(im1, oln::win_c4p()));
+ if (oln::utils::md5(oln::morpho::hybrid::geodesic_reconstruction_erosion(im1, im2, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_reconstruction_hh4
--- olena/tests/morpho/tests/md5_morpho_reconstruction_hh4 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_reconstruction_hh4 Tue, 23 Mar 2004 12:26:25 +0100 palma_g (oln/k/42_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/opening.hh>
+#include <oln/morpho/reconstruction.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf6, 0x53, 0x89, 0x3, 0x4f, 0x26, 0xf0, 0xf4, 0x5b, 0xd7, 0xf1, 0x69, 0xc9, 0x8a, 0x55, 0x6a};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im_type im2(oln::morpho::opening(im1, oln::win_c4p()));
+ if (oln::utils::md5(oln::morpho::sequential::geodesic_reconstruction_erosion(im1, im2, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_reconstruction_hh3
--- olena/tests/morpho/tests/md5_morpho_reconstruction_hh3 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_reconstruction_hh3 Tue, 23 Mar 2004 12:26:15 +0100 palma_g (oln/k/43_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/opening.hh>
+#include <oln/morpho/reconstruction.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf6, 0x53, 0x89, 0x3, 0x4f, 0x26, 0xf0, 0xf4, 0x5b, 0xd7, 0xf1, 0x69, 0xc9, 0x8a, 0x55, 0x6a};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im_type im2(oln::morpho::opening(im1, oln::win_c4p()));
+ if (oln::utils::md5(oln::morpho::sure::geodesic_reconstruction_erosion(im1, im2, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_reconstruction_hh2
--- olena/tests/morpho/tests/md5_morpho_reconstruction_hh2 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_reconstruction_hh2 Tue, 23 Mar 2004 12:26:04 +0100 palma_g (oln/k/44_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/opening.hh>
+#include <oln/morpho/reconstruction.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x7e, 0x56, 0x6, 0xbe, 0xa1, 0xcd, 0x80, 0xf1, 0x4c, 0x9d, 0x63, 0x10, 0x4e, 0x3e, 0x9, 0x96};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im_type im2(oln::morpho::opening(im1, oln::win_c4p()));
+ if (oln::utils::md5(oln::morpho::hybrid::geodesic_reconstruction_dilation(im2, im1, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_reconstruction_hh1
--- olena/tests/morpho/tests/md5_morpho_reconstruction_hh1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_reconstruction_hh1 Tue, 23 Mar 2004 12:25:54 +0100 palma_g (oln/k/45_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/opening.hh>
+#include <oln/morpho/reconstruction.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x7e, 0x56, 0x6, 0xbe, 0xa1, 0xcd, 0x80, 0xf1, 0x4c, 0x9d, 0x63, 0x10, 0x4e, 0x3e, 0x9, 0x96};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im_type im2(oln::morpho::opening(im1, oln::win_c4p()));
+ if (oln::utils::md5(oln::morpho::sequential::geodesic_reconstruction_dilation(im2, im1, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_reconstruction_hh0
--- olena/tests/morpho/tests/md5_morpho_reconstruction_hh0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_reconstruction_hh0 Tue, 23 Mar 2004 12:25:43 +0100 palma_g (oln/k/46_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/opening.hh>
+#include <oln/morpho/reconstruction.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x7e, 0x56, 0x6, 0xbe, 0xa1, 0xcd, 0x80, 0xf1, 0x4c, 0x9d, 0x63, 0x10, 0x4e, 0x3e, 0x9, 0x96};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im_type im2(oln::morpho::opening(im1, oln::win_c4p()));
+ if (oln::utils::md5(oln::morpho::sure::geodesic_reconstruction_dilation(im2, im1, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_opening_inc0
--- olena/tests/morpho/tests/md5_morpho_opening_inc0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_opening_inc0 Tue, 23 Mar 2004 12:25:27 +0100 palma_g (oln/k/47_md5_morpho 644)
@@ -0,0 +1,26 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xe1, 0x9, 0xb5, 0xfb, 0x97, 0xa1, 0x11, 0xe, 0x3d, 0x5d, 0x40, 0x94, 0x40, 0x71, 0x46, 0xc};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im(oln::load(rdata("object.pbm")));
+ if (oln::utils::md5(oln::morpho::fast::opening(im, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_laplacian_inc1
--- olena/tests/morpho/tests/md5_morpho_laplacian_inc1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_laplacian_inc1 Tue, 23 Mar 2004 12:25:17 +0100 palma_g (oln/k/48_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/laplacian.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x1b, 0x83, 0x53, 0x90, 0xbf, 0xb6, 0x68, 0xad, 0xb3, 0xae, 0xfa, 0xfc, 0xfc, 0x6a, 0x1e, 0x27};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::fast::laplacian(oln::convert::bound<ntg::
+int_u8>(), im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_laplacian_inc0
--- olena/tests/morpho/tests/md5_morpho_laplacian_inc0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_laplacian_inc0 Tue, 23 Mar 2004 12:25:02 +0100 palma_g (oln/k/49_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/laplacian.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x1b, 0x83, 0x53, 0x90, 0xbf, 0xb6, 0x68, 0xad, 0xb3, 0xae, 0xfa, 0xfc, 0xfc, 0x6a, 0x1e, 0x27};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::fast::laplacian(oln::convert::bound<ntg::
+int_u8>(), im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc5
--- olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc5 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc5 Tue, 23 Mar 2004 12:24:48 +0100 palma_g (oln/k/50_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/hit_or_miss.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x6d, 0x9, 0x4c, 0xf1, 0x6c, 0x3a, 0xd5, 0xad, 0xe0, 0xbf, 0xfe, 0x4, 0x5d, 0x8, 0x5c, 0x8a};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im1(oln::load(rdata("object.pbm")));
+ oln::window2d mywin;
+ mywin .add(-3,-2).add(-3,-1).add(-3,0).add(-3,1).add(-3,2) .add(-2,-1).add(-2,0).add(-2,1) .add(-1,0);
+ oln::window2d mywin2 = - mywin;
+ if (oln::utils::md5(oln::morpho::fast::hit_or_miss_closing_bg(im1, mywin, mywin2)) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc4
--- olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc4 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc4 Tue, 23 Mar 2004 12:24:36 +0100 palma_g (oln/k/51_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/hit_or_miss.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xe9, 0x4e, 0x4f, 0x1, 0x4f, 0x53, 0x8a, 0xd0, 0xfc, 0xd9, 0xfa, 0x6c, 0xf7, 0x8a, 0x64, 0x5b};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im1(oln::load(rdata("object.pbm")));
+ oln::window2d mywin;
+ mywin .add(-3,-2).add(-3,-1).add(-3,0).add(-3,1).add(-3,2) .add(-2,-1).add(-2,0).add(-2,1) .add(-1,0);
+ oln::window2d mywin2 = - mywin;
+ if (oln::utils::md5(oln::morpho::fast::hit_or_miss_closing(im1, mywin, mywin2)) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc3
--- olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc3 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc3 Tue, 23 Mar 2004 12:24:24 +0100 palma_g (oln/l/0_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/hit_or_miss.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xfa, 0x7, 0x26, 0x34, 0x16, 0x36, 0xc, 0xf4, 0x5e, 0x19, 0x53, 0xa2, 0x89, 0x1e, 0xdb, 0xae};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im1(oln::load(rdata("object.pbm")));
+ oln::window2d mywin;
+ mywin .add(-3,-2).add(-3,-1).add(-3,0).add(-3,1).add(-3,2) .add(-2,-1).add(-2,0).add(-2,1) .add(-1,0);
+ oln::window2d mywin2 = - mywin;
+ if (oln::utils::md5(oln::morpho::fast::hit_or_miss_opening_bg(im1, mywin, mywin2)) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc2
--- olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc2 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc2 Tue, 23 Mar 2004 12:24:12 +0100 palma_g (oln/l/1_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/hit_or_miss.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x90, 0xda, 0x98, 0x5a, 0xef, 0x2e, 0x8d, 0x54, 0xa5, 0x6, 0xd, 0x7a, 0x6f, 0x63, 0x55, 0x7};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im1(oln::load(rdata("object.pbm")));
+ oln::window2d mywin;
+ mywin .add(-3,-2).add(-3,-1).add(-3,0).add(-3,1).add(-3,2) .add(-2,-1).add(-2,0).add(-2,1) .add(-1,0);
+ oln::window2d mywin2 = - mywin;
+ if (oln::utils::md5(oln::morpho::fast::hit_or_miss_opening(im1, mywin, mywin2)) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc1
--- olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc1 Tue, 23 Mar 2004 12:24:00 +0100 palma_g (oln/l/2_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/hit_or_miss.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xd3, 0xf4, 0x3, 0x73, 0x4d, 0xf1, 0x32, 0xc4, 0x94, 0x3f, 0x8f, 0x85, 0x53, 0x60, 0x20, 0x89};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im1(oln::load(rdata("object.pbm")));
+ oln::window2d mywin;
+ mywin .add(-3,-2).add(-3,-1).add(-3,0).add(-3,1).add(-3,2) .add(-2,-1).add(-2,0).add(-2,1) .add(-1,0);
+ oln::window2d mywin2 = - mywin;
+ if (oln::utils::md5(oln::morpho::fast::hit_or_miss(im1, mywin, mywin2)) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc0
--- olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_hit_or_miss_inc0 Tue, 23 Mar 2004 12:23:49 +0100 palma_g (oln/l/3_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/hit_or_miss.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xaa, 0xb9, 0xf0, 0x35, 0xa3, 0x70, 0xb3, 0xb5, 0x4a, 0x19, 0xb8, 0x8a, 0xc9, 0x25, 0xd1, 0xd};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im1(oln::load(rdata("object.pbm")));
+ oln::window2d mywin;
+ mywin .add(-3,-2).add(-3,-1).add(-3,0).add(-3,1).add(-3,2) .add(-2,-1).add(-2,0).add(-2,1) .add(-1,0);
+ oln::window2d mywin2 = - mywin;
+ if (oln::utils::md5(oln::morpho::fast::hit_or_miss (oln::convert::bound<ntg::
+int_u8>(), im1, mywin, mywin2)) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_gradient_inc0
--- olena/tests/morpho/tests/md5_morpho_gradient_inc0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_gradient_inc0 Tue, 23 Mar 2004 12:23:37 +0100 palma_g (oln/l/4_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/gradient.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x74, 0xdf, 0xbb, 0xfd, 0x1e, 0x6d, 0x24, 0x72, 0xf9, 0xf, 0x6c, 0xb7, 0x66, 0xf8, 0xf7, 0xe2};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::morpho::
+internal_gradient(im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_geodesic_erosion_hh1
--- olena/tests/morpho/tests/md5_morpho_geodesic_erosion_hh1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_geodesic_erosion_hh1 Tue, 23 Mar 2004 12:23:27 +0100 palma_g (oln/l/5_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/opening.hh>
+#include <oln/morpho/geodesic_erosion.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf6, 0x53, 0x89, 0x3, 0x4f, 0x26, 0xf0, 0xf4, 0x5b, 0xd7, 0xf1, 0x69, 0xc9, 0x8a, 0x55, 0x6a};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im_type im2(oln::morpho::opening(im1, oln::win_c4p()));
+ if (oln::utils::md5(oln::morpho::sure::geodesic_erosion(im1, im2, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_geodesic_erosion_hh0
--- olena/tests/morpho/tests/md5_morpho_geodesic_erosion_hh0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_geodesic_erosion_hh0 Tue, 23 Mar 2004 12:23:17 +0100 palma_g (oln/l/6_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/opening.hh>
+#include <oln/morpho/geodesic_erosion.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf6, 0x53, 0x89, 0x3, 0x4f, 0x26, 0xf0, 0xf4, 0x5b, 0xd7, 0xf1, 0x69, 0xc9, 0x8a, 0x55, 0x6a};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im_type im2(oln::morpho::opening(im1, oln::win_c4p()));
+ if (oln::utils::md5(oln::morpho::geodesic_erosion(im1, im2, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_geodesic_dilation_hh1
--- olena/tests/morpho/tests/md5_morpho_geodesic_dilation_hh1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_geodesic_dilation_hh1 Tue, 23 Mar 2004 12:23:07 +0100 palma_g (oln/l/7_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/opening.hh>
+#include <oln/morpho/geodesic_dilation.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x4, 0x86, 0xb0, 0xdd, 0x39, 0xba, 0x41, 0xd, 0x43, 0x74, 0x30, 0x1d, 0x22, 0x4e, 0xe, 0x55};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im_type im2(oln::morpho::opening(im1, oln::win_c4p()));
+ if (oln::utils::md5(oln::morpho::sure::geodesic_dilation(im2, im1, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_geodesic_dilation_hh0
--- olena/tests/morpho/tests/md5_morpho_geodesic_dilation_hh0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_geodesic_dilation_hh0 Tue, 23 Mar 2004 12:22:56 +0100 palma_g (oln/l/8_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/opening.hh>
+#include <oln/morpho/geodesic_dilation.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x4, 0x86, 0xb0, 0xdd, 0x39, 0xba, 0x41, 0xd, 0x43, 0x74, 0x30, 0x1d, 0x22, 0x4e, 0xe, 0x55};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im_type im2(oln::morpho::opening(im1, oln::win_c4p()));
+ if (oln::utils::md5(oln::morpho::geodesic_dilation(im2, im1, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_fast_morpho_hxx0
--- olena/tests/morpho/tests/md5_morpho_fast_morpho_hxx0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_fast_morpho_hxx0 Tue, 23 Mar 2004 12:22:47 +0100 palma_g (oln/l/9_md5_morpho 644)
@@ -0,0 +1,26 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/erosion.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x7c, 0x4f, 0xf, 0xc7, 0x27, 0x1, 0x98, 0x81, 0xfd, 0xb, 0x2e, 0xf6, 0x1c, 0x84, 0xc9, 0x1e};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im1(oln::load(rdata("object.pbm")));
+ if (oln::utils::md5(oln::morpho::fast_morpho<im_type, oln::window2d, oln::utils::histogram_min<ntg::bin> > (im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_extrema_killer_hh3
--- olena/tests/morpho/tests/md5_morpho_extrema_killer_hh3 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_extrema_killer_hh3 Tue, 23 Mar 2004 12:22:37 +0100 palma_g (oln/l/10_md5_morpho 644)
@@ -0,0 +1,27 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/extrema_killer.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x3d, 0xe, 0xc1, 0xf, 0x62, 0x52, 0xa4, 0xc6, 0xf, 0x3e, 0x62, 0x8a, 0x13, 0x63, 0x1b, 0xcf};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im(oln::load(rdata("lena128.pgm")));
+ if (oln::utils::md5(oln::morpho::fast_maxima_killer(im, 200, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_extrema_killer_hh2
--- olena/tests/morpho/tests/md5_morpho_extrema_killer_hh2 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_extrema_killer_hh2 Tue, 23 Mar 2004 12:22:14 +0100 palma_g (oln/l/11_md5_morpho 644)
@@ -0,0 +1,27 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/extrema_killer.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xed, 0xfb, 0x4, 0x8c, 0x53, 0x9e, 0x3d, 0x5d, 0xd3, 0xcd, 0xf7, 0xb, 0x35, 0xd5, 0xcf, 0x16};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im(oln::load(rdata("lena128.pgm")));
+ if (oln::utils::md5(oln::morpho::fast_minima_killer(im, 200, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_extrema_killer_hh1
--- olena/tests/morpho/tests/md5_morpho_extrema_killer_hh1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_extrema_killer_hh1 Tue, 23 Mar 2004 12:21:52 +0100 palma_g (oln/l/12_md5_morpho 644)
@@ -0,0 +1,27 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/extrema_killer.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xed, 0xfb, 0x4, 0x8c, 0x53, 0x9e, 0x3d, 0x5d, 0xd3, 0xcd, 0xf7, 0xb, 0x35, 0xd5, 0xcf, 0x16};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im(oln::load(rdata("lena128.pgm")));
+ if (oln::utils::md5(oln::morpho::sure_minima_killer(im, 200, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_extrema_killer_hh0
--- olena/tests/morpho/tests/md5_morpho_extrema_killer_hh0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_extrema_killer_hh0 Tue, 23 Mar 2004 12:20:29 +0100 palma_g (oln/l/13_md5_morpho 644)
@@ -0,0 +1,27 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/extrema_killer.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x3d, 0xe, 0xc1, 0xf, 0x62, 0x52, 0xa4, 0xc6, 0xf, 0x3e, 0x62, 0x8a, 0x13, 0x63, 0x1b, 0xcf};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im(oln::load(rdata("lena128.pgm")));
+ if (oln::utils::md5(oln::morpho::sure_maxima_killer(im, 200, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_extrema_hxx1
--- olena/tests/morpho/tests/md5_morpho_extrema_hxx1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_extrema_hxx1 Tue, 23 Mar 2004 12:19:08 +0100 palma_g (oln/l/14_md5_morpho 644)
@@ -0,0 +1,27 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/extrema.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x3e, 0x0, 0x9d, 0x21, 0x65, 0x71, 0xd1, 0x86, 0xaf, 0xc3, 0x3b, 0xc5, 0x59, 0xb5, 0xf7, 0x9};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im(oln::load(rdata("lena.pgm")));
+ if (oln::utils::md5(oln::morpho::sequential::regional_minima(im, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_extrema_hxx0
--- olena/tests/morpho/tests/md5_morpho_extrema_hxx0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_extrema_hxx0 Tue, 23 Mar 2004 12:18:47 +0100 palma_g (oln/l/15_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/extrema.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xfc, 0xf3, 0x53, 0xb7, 0xd, 0x4e, 0x9b, 0x67, 0x2f, 0xb7, 0xd, 0x66, 0x7, 0xc3, 0xea, 0x87};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ typedef oln::image2d<ntg::bin> bin_im_type;
+ im_type light(oln::load(rdata("lena.pgm")));
+ bin_im_type minima(oln::load(rdata("map.pbm")));
+ if (oln::utils::md5(oln::morpho::sequential::minima_imposition(light, minima, oln::neighb_c4())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_erosion_hh2
--- olena/tests/morpho/tests/md5_morpho_erosion_hh2 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_erosion_hh2 Tue, 23 Mar 2004 12:17:29 +0100 palma_g (oln/l/16_md5_morpho 644)
@@ -0,0 +1,26 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/erosion.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x7c, 0x4f, 0xf, 0xc7, 0x27, 0x1, 0x98, 0x81, 0xfd, 0xb, 0x2e, 0xf6, 0x1c, 0x84, 0xc9, 0x1e};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im1(oln::load(rdata("object.pbm")));
+ if (oln::utils::md5(oln::morpho::fast::erosion(im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_erosion_hh1
--- olena/tests/morpho/tests/md5_morpho_erosion_hh1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_erosion_hh1 Tue, 23 Mar 2004 12:17:19 +0100 palma_g (oln/l/17_md5_morpho 644)
@@ -0,0 +1,26 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/erosion.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x40, 0x8a, 0xcc, 0x33, 0xe3, 0xd, 0x52, 0x40, 0x86, 0x98, 0x79, 0x46, 0x76, 0x8, 0xd2, 0x68};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im1(oln::load(rdata("object.pbm")));
+ if (oln::utils::md5(oln::morpho::n_erosion(im1, oln::win_c8p(), 5)) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_erosion_hh0
--- olena/tests/morpho/tests/md5_morpho_erosion_hh0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_erosion_hh0 Tue, 23 Mar 2004 12:17:10 +0100 palma_g (oln/l/18_md5_morpho 644)
@@ -0,0 +1,26 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/erosion.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x7c, 0x4f, 0xf, 0xc7, 0x27, 0x1, 0x98, 0x81, 0xfd, 0xb, 0x2e, 0xf6, 0x1c, 0x84, 0xc9, 0x1e};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im1(oln::load(rdata("object.pbm")));
+ if (oln::utils::md5(oln::morpho::erosion(im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_dilation_hh1
--- olena/tests/morpho/tests/md5_morpho_dilation_hh1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_dilation_hh1 Tue, 23 Mar 2004 12:17:01 +0100 palma_g (oln/l/19_md5_morpho 644)
@@ -0,0 +1,26 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/dilation.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xa, 0x1e, 0xc8, 0x48, 0xdb, 0x54, 0x50, 0x6e, 0x24, 0xa9, 0xd6, 0x88, 0x4c, 0x8a, 0x4b, 0x7d};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im1(oln::load(rdata("object.pbm")));
+ if (oln::utils::md5(oln::morpho::n_dilation(im1, oln::win_c8p(), 5)) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_dilation_hh0
--- olena/tests/morpho/tests/md5_morpho_dilation_hh0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_dilation_hh0 Tue, 23 Mar 2004 12:16:50 +0100 palma_g (oln/l/20_md5_morpho 644)
@@ -0,0 +1,26 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/dilation.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xbf, 0x67, 0x3, 0xa1, 0x2d, 0x6c, 0xac, 0xe9, 0xf3, 0x7c, 0x19, 0x4c, 0x3a, 0x3b, 0x4d, 0xaa};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im1(oln::load(rdata("object.pbm")));
+ if (oln::utils::md5(oln::morpho::dilation(im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index: olena/tests/morpho/tests/md5_morpho_closing_inc0
--- olena/tests/morpho/tests/md5_morpho_closing_inc0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_closing_inc0 Tue, 23 Mar 2004 12:16:42 +0100 palma_g (oln/l/21_md5_morpho 644)
@@ -0,0 +1,27 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/closing.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x28, 0xc9, 0xb1, 0xab, 0x57, 0x92, 0xb0, 0x2f, 0xdb, 0xd5, 0xf2, 0x3e, 0xb4, 0x2f, 0x18, 0x8b};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::bin> im_type;
+ im_type im1(oln::load(rdata("object.pbm")));
+ if (oln::utils::md5(oln::morpho::closing(im1, oln::win_c8p())) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh9
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh9 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh9 Tue, 23 Mar 2004 12:16:32 +0100 palma_g (oln/l/22_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x47, 0x92, 0xeb, 0x94, 0x8f, 0xda, 0xe8, 0x1, 0x23, 0x62, 0xfa, 0x97, 0xd0, 0x78, 0xbf, 0x1e};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::minvalue_closing(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh8
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh8 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh8 Tue, 23 Mar 2004 12:16:18 +0100 palma_g (oln/l/23_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xcc, 0x47, 0xb9, 0x26, 0x66, 0xc5, 0x2a, 0x29, 0x58, 0xa5, 0x94, 0xec, 0xf3, 0x26, 0x44, 0xb3};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::minvalue_opening(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh7
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh7 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh7 Tue, 23 Mar 2004 12:16:05 +0100 palma_g (oln/l/24_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x5d, 0xf2, 0xf5, 0xd1, 0xc7, 0x72, 0x9a, 0x28, 0x92, 0x24, 0x30, 0x69, 0xf8, 0xe, 0xd1, 0xd9};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::maxvalue_opening(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh6
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh6 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh6 Tue, 23 Mar 2004 12:15:51 +0100 palma_g (oln/l/25_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x5d, 0xf2, 0xf5, 0xd1, 0xc7, 0x72, 0x9a, 0x28, 0x92, 0x24, 0x30, 0x69, 0xf8, 0xe, 0xd1, 0xd9};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::maxvalue_closing(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh5
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh5 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh5 Tue, 23 Mar 2004 12:15:38 +0100 palma_g (oln/l/26_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x96, 0xcf, 0xf6, 0xe2, 0x4a, 0xcb, 0x14, 0xaf, 0xec, 0x44, 0x57, 0x2e, 0xa7, 0xaa, 0xe8, 0xb3};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::height_closing(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh4
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh4 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh4 Tue, 23 Mar 2004 12:15:25 +0100 palma_g (oln/l/27_md5_morpho 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x7d, 0x44, 0x3f, 0x1b, 0x4e, 0xc9, 0x29, 0xe7, 0x20, 0x15, 0x43, 0x47, 0x8f, 0x3f, 0x7f, 0x23};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::height_opening(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh3
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh3 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh3 Tue, 23 Mar 2004 12:15:11 +0100 palma_g (oln/l/28_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x9d, 0xa, 0x87, 0x3b, 0x92, 0xde, 0x8a, 0xb0, 0x84, 0xf8, 0xe6, 0x5e, 0x6c, 0xdf, 0x5e, 0x76};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::
+integral_opening(im1, oln::neighb_c4(), 200);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh2
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh2 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh2 Tue, 23 Mar 2004 12:15:00 +0100 palma_g (oln/l/29_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf6, 0x87, 0xb9, 0xf, 0xde, 0x31, 0x62, 0xfd, 0xd7, 0xb, 0xa4, 0x19, 0x26, 0x3, 0x7, 0xa4};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::
+integral_closing(im1, oln::neighb_c4(), 200);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh17
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh17 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh17 Tue, 23 Mar 2004 12:14:37 +0100 palma_g (oln/l/30_md5_morpho 644)
@@ -0,0 +1,31 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf9, 0xf5, 0xb3, 0x74, 0xe6, 0x2a, 0x7e, 0xa0, 0xd, 0xeb, 0xfd, 0xd1, 0xd8, 0x95, 0x4d, 0xd6};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ ntg::vec<2, unsigned, mlc::final> lambda;
+ lambda[0] = lambda[1] = 50;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::box_opening(im1, oln::neighb_c4(), lambda);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh16
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh16 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh16 Tue, 23 Mar 2004 12:14:26 +0100 palma_g (oln/l/31_md5_morpho 644)
@@ -0,0 +1,31 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x7a, 0x83, 0xd8, 0xd4, 0xa9, 0x40, 0x24, 0x6c, 0xba, 0x19, 0x4, 0x9b, 0x1f, 0xb0, 0xa8, 0x95};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ ntg::vec<2, unsigned, mlc::final> lambda;
+ lambda[0] = lambda[1] = 50;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::box_closing(im1, oln::neighb_c4(), lambda);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh15
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh15 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh15 Tue, 23 Mar 2004 12:14:14 +0100 palma_g (oln/l/32_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x58, 0x58, 0xda, 0xf7, 0x7a, 0x1d, 0x8e, 0x4c, 0x92, 0xb9, 0xab, 0x4a, 0x4b, 0x7e, 0xcc, 0x35};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::cube_opening(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh14
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh14 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh14 Tue, 23 Mar 2004 12:14:02 +0100 palma_g (oln/l/33_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x8f, 0xbd, 0x54, 0x54, 0xa6, 0xf9, 0x42, 0x85, 0xaf, 0x76, 0x6d, 0xfa, 0xa6, 0xab, 0x56, 0x38};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::cube_closing(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh13
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh13 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh13 Tue, 23 Mar 2004 12:13:51 +0100 palma_g (oln/l/34_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf5, 0x8f, 0xe8, 0x56, 0x5d, 0xd6, 0xf1, 0x1b, 0xa0, 0x91, 0x6b, 0x22, 0x7a, 0x3a, 0x25, 0x90};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::dist_closing(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh12
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh12 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh12 Tue, 23 Mar 2004 12:13:40 +0100 palma_g (oln/l/35_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x8b, 0xd5, 0xbc, 0xc, 0x93, 0x3e, 0x16, 0xc3, 0xce, 0x63, 0xc1, 0x41, 0xf, 0x8f, 0xc2, 0x1a};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::dist_opening(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh11
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh11 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh11 Tue, 23 Mar 2004 12:13:29 +0100 palma_g (oln/l/36_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x8e, 0x3a, 0x61, 0x3f, 0x8e, 0x77, 0xa3, 0x90, 0xd3, 0xdc, 0x6, 0xe9, 0x0, 0x6a, 0xb4, 0x91};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::ball_closing(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh10
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh10 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh10 Tue, 23 Mar 2004 12:13:17 +0100 palma_g (oln/l/37_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf, 0x46, 0x3d, 0xbb, 0x72, 0x16, 0x2b, 0x3f, 0x5f, 0x32, 0x30, 0xde, 0x42, 0xdf, 0x49, 0x22};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::ball_opening(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh1
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh1 Tue, 23 Mar 2004 12:14:49 +0100 palma_g (oln/l/38_md5_morpho 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x3d, 0xe, 0xc1, 0xf, 0x62, 0x52, 0xa4, 0xc6, 0xf, 0x3e, 0x62, 0x8a, 0x13, 0x63, 0x1b, 0xcf};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::card_opening(im1, oln::neighb_c4(), 200);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh0
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_map_hh0 Tue, 23 Mar 2004 12:13:05 +0100 palma_g (oln/l/39_md5_morpho 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening_map.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xed, 0xfb, 0x4, 0x8c, 0x53, 0x9e, 0x3d, 0x5d, 0xd3, 0xcd, 0xf7, 0xb, 0x35, 0xd5, 0xcf, 0x16};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::slow::card_closing(im1, oln::neighb_c4(), 200);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh5
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh5 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh5 Tue, 23 Mar 2004 12:12:54 +0100 palma_g (oln/l/40_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x2a, 0x39, 0xf5, 0xfc, 0x95, 0xa0, 0x18, 0xc1, 0xac, 0xa, 0x5, 0xbf, 0xc4, 0xc2, 0xfd, 0xf8};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ im1 = oln::morpho::fast::height_closing(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh4
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh4 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh4 Tue, 23 Mar 2004 12:12:43 +0100 palma_g (oln/l/41_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x8a, 0x6f, 0x2a, 0xaa, 0x83, 0x5f, 0x92, 0xc, 0x10, 0x1f, 0x56, 0x6, 0xcc, 0xb8, 0x42, 0xd4};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ im1 = oln::morpho::fast::height_opening(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh3
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh3 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh3 Tue, 23 Mar 2004 12:12:31 +0100 palma_g (oln/l/42_md5_morpho 644)
@@ -0,0 +1,31 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x1a, 0xe0, 0x60, 0x8a, 0xd8, 0x2d, 0xbc, 0x11, 0x29, 0x0, 0xd0, 0x44, 0x53, 0xf9, 0xff, 0xec};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ im1 = oln::morpho::fast::
+integral_opening(im1, oln::neighb_c4(), 200);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh2
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh2 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh2 Tue, 23 Mar 2004 12:12:20 +0100 palma_g (oln/l/43_md5_morpho 644)
@@ -0,0 +1,31 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x39, 0x6e, 0x2, 0xfa, 0xec, 0x98, 0xa5, 0x3c, 0x10, 0x16, 0x82, 0xfd, 0x54, 0x48, 0x7d, 0xd3};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ im1 = oln::morpho::fast::
+integral_closing(im1, oln::neighb_c4(), 200);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh1
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh1 Tue, 23 Mar 2004 12:12:08 +0100 palma_g (oln/l/44_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x62, 0x60, 0xf, 0xd3, 0xdf, 0xd2, 0xaf, 0x5d, 0x71, 0xf3, 0xeb, 0xe9, 0x31, 0x34, 0x53, 0x75};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ im1 = oln::morpho::fast::card_opening(im1, oln::neighb_c4(), 200);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh0
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh0 Tue, 23 Mar 2004 12:11:57 +0100 palma_g (oln/l/45_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf, 0x6c, 0xa1, 0x5a, 0x98, 0x33, 0xeb, 0xbe, 0xb, 0x60, 0x7, 0xb3, 0xca, 0x5d, 0x44, 0xe};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ im1 = oln::morpho::fast::card_closing(im1, oln::neighb_c4(), 200);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh9
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh9 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh9 Tue, 23 Mar 2004 12:11:45 +0100 palma_g (oln/l/46_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x47, 0x92, 0xeb, 0x94, 0x8f, 0xda, 0xe8, 0x1, 0x23, 0x62, 0xfa, 0x97, 0xd0, 0x78, 0xbf, 0x1e};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::minvalue_closing(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh8
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh8 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh8 Tue, 23 Mar 2004 12:11:35 +0100 palma_g (oln/l/47_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xcc, 0x47, 0xb9, 0x26, 0x66, 0xc5, 0x2a, 0x29, 0x58, 0xa5, 0x94, 0xec, 0xf3, 0x26, 0x44, 0xb3};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::minvalue_opening(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh7
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh7 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh7 Tue, 23 Mar 2004 12:11:24 +0100 palma_g (oln/l/48_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x5d, 0xf2, 0xf5, 0xd1, 0xc7, 0x72, 0x9a, 0x28, 0x92, 0x24, 0x30, 0x69, 0xf8, 0xe, 0xd1, 0xd9};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::maxvalue_opening(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh6
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh6 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh6 Tue, 23 Mar 2004 12:11:13 +0100 palma_g (oln/l/49_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x5d, 0xf2, 0xf5, 0xd1, 0xc7, 0x72, 0x9a, 0x28, 0x92, 0x24, 0x30, 0x69, 0xf8, 0xe, 0xd1, 0xd9};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::maxvalue_closing(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh5
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh5 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh5 Tue, 23 Mar 2004 12:11:03 +0100 palma_g (oln/l/50_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x96, 0xcf, 0xf6, 0xe2, 0x4a, 0xcb, 0x14, 0xaf, 0xec, 0x44, 0x57, 0x2e, 0xa7, 0xaa, 0xe8, 0xb3};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::height_closing(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh4
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh4 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh4 Tue, 23 Mar 2004 12:10:52 +0100 palma_g (oln/l/51_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x7d, 0x44, 0x3f, 0x1b, 0x4e, 0xc9, 0x29, 0xe7, 0x20, 0x15, 0x43, 0x47, 0x8f, 0x3f, 0x7f, 0x23};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::height_opening(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh3
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh3 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh3 Tue, 23 Mar 2004 12:10:42 +0100 palma_g (oln/m/0_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x9d, 0xa, 0x87, 0x3b, 0x92, 0xde, 0x8a, 0xb0, 0x84, 0xf8, 0xe6, 0x5e, 0x6c, 0xdf, 0x5e, 0x76};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::
+integral_opening(im1, oln::neighb_c4(), 200);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh2
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh2 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh2 Tue, 23 Mar 2004 12:10:31 +0100 palma_g (oln/m/1_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf6, 0x87, 0xb9, 0xf, 0xde, 0x31, 0x62, 0xfd, 0xd7, 0xb, 0xa4, 0x19, 0x26, 0x3, 0x7, 0xa4};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::
+integral_closing(im1, oln::neighb_c4(), 200);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh17
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh17 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh17 Tue, 23 Mar 2004 12:10:10 +0100 palma_g (oln/m/2_md5_morpho 644)
@@ -0,0 +1,32 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf9, 0xf5, 0xb3, 0x74, 0xe6, 0x2a, 0x7e, 0xa0, 0xd, 0xeb, 0xfd, 0xd1, 0xd8, 0x95, 0x4d, 0xd6};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ ntg::vec<2, unsigned, mlc::final> lambda;
+ lambda[0] = lambda[1] = 50;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::box_opening(im1, oln::neighb_c4(), lambda);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh16
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh16 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh16 Tue, 23 Mar 2004 12:10:00 +0100 palma_g (oln/m/3_md5_morpho 644)
@@ -0,0 +1,32 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x7a, 0x83, 0xd8, 0xd4, 0xa9, 0x40, 0x24, 0x6c, 0xba, 0x19, 0x4, 0x9b, 0x1f, 0xb0, 0xa8, 0x95};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ ntg::vec<2, unsigned, mlc::final> lambda;
+ lambda[0] = lambda[1] = 50;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::box_closing(im1, oln::neighb_c4(), lambda);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh15
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh15 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh15 Tue, 23 Mar 2004 12:09:49 +0100 palma_g (oln/m/4_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x58, 0x58, 0xda, 0xf7, 0x7a, 0x1d, 0x8e, 0x4c, 0x92, 0xb9, 0xab, 0x4a, 0x4b, 0x7e, 0xcc, 0x35};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::cube_opening(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh14
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh14 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh14 Tue, 23 Mar 2004 12:09:38 +0100 palma_g (oln/m/5_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x8f, 0xbd, 0x54, 0x54, 0xa6, 0xf9, 0x42, 0x85, 0xaf, 0x76, 0x6d, 0xfa, 0xa6, 0xab, 0x56, 0x38};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::cube_closing(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh13
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh13 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh13 Tue, 23 Mar 2004 12:09:27 +0100 palma_g (oln/m/6_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf5, 0x8f, 0xe8, 0x56, 0x5d, 0xd6, 0xf1, 0x1b, 0xa0, 0x91, 0x6b, 0x22, 0x7a, 0x3a, 0x25, 0x90};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::dist_closing(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh12
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh12 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh12 Tue, 23 Mar 2004 12:09:16 +0100 palma_g (oln/m/7_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x8b, 0xd5, 0xbc, 0xc, 0x93, 0x3e, 0x16, 0xc3, 0xce, 0x63, 0xc1, 0x41, 0xf, 0x8f, 0xc2, 0x1a};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::dist_opening(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh11
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh11 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh11 Tue, 23 Mar 2004 12:09:04 +0100 palma_g (oln/m/8_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x8e, 0x3a, 0x61, 0x3f, 0x8e, 0x77, 0xa3, 0x90, 0xd3, 0xdc, 0x6, 0xe9, 0x0, 0x6a, 0xb4, 0x91};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::ball_closing(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh10
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh10 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh10 Tue, 23 Mar 2004 12:08:52 +0100 palma_g (oln/m/9_md5_morpho 644)
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xf, 0x46, 0x3d, 0xbb, 0x72, 0x16, 0x2b, 0x3f, 0x5f, 0x32, 0x30, 0xde, 0x42, 0xdf, 0x49, 0x22};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::ball_opening(im1, oln::neighb_c4(), 5);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh1
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh1 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh1 Tue, 23 Mar 2004 12:10:21 +0100 palma_g (oln/m/10_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x3d, 0xe, 0xc1, 0xf, 0x62, 0x52, 0xa4, 0xc6, 0xf, 0x3e, 0x62, 0x8a, 0x13, 0x63, 0x1b, 0xcf};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::card_opening(im1, oln::neighb_c4(), 200);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh0
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh0 Tue, 23 Mar 2004 14:35:13 +0100 palma_g ()
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_hh0 Tue, 23 Mar 2004 12:08:39 +0100 palma_g (oln/m/11_md5_morpho 644)
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/morpho/attribute_closing_opening.hh>
+#include <oln/level/compare.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xed, 0xfb, 0x4, 0x8c, 0x53, 0x9e, 0x3d, 0x5d, 0xd3, 0xcd, 0xf7, 0xb, 0x35, 0xd5, 0xcf, 0x16};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena128.pgm")));
+ im1 = oln::morpho::fast::card_closing(im1, oln::neighb_c4(), 200);
+ if (oln::utils::md5(im1) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
--
Giovanni Palma
EPITA - promo 2005 - membre d'EpX - LRDE
Mob. : +33 (0)6 60 97 31 74
2
1
Index: integre/ChangeLog
from Giovanni Palma <giovanni(a)lrde.epita.fr>
* ntg/enum/bin.hh: Add size.
Index: olena/ChangeLog
from Giovanni Palma <giovanni(a)lrde.epita.fr>
* tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh0: Add file.
* tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh1: Add file.
* tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh2: Add file.
* tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh3: Add file.
* tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh4: Add file.
* tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh5: Add file.
Index: integre/ntg/enum/bin.hh
--- integre/ntg/enum/bin.hh Thu, 27 Nov 2003 11:26:27 +0100 burrus_n (oln/t/21_bin.hh 1.5.1.1 640)
+++ integre/ntg/enum/bin.hh Tue, 23 Mar 2004 11:59:25 +0100 palma_g (oln/t/21_bin.hh 1.5.1.1 640)
@@ -1,4 +1,4 @@
-// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -70,6 +70,9 @@
typedef bin unsigned_largest_type;
typedef bin unsigned_cumul_type;
typedef unsigned int integer_type;
+
+ // Particular properties
+ enum { size = 1 };
};
} // end of internal.
Index: olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh5
--- olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh5 Tue, 23 Mar 2004 13:53:56 +0100 palma_g ()
+++ olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh5 Tue, 23 Mar 2004 13:46:52 +0100 palma_g (oln/k/16_out_olena_ 644)
@@ -0,0 +1,31 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/convol/fast_gaussian.hh>
+#include <oln/core/behavior.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+ oln::utils::key::value_type data_key[16] = {0x70, 0x53, 0xa8, 0x84, 0x81,
+ 0x4, 0xbc, 0x30, 0x71, 0x23,
+ 0x78, 0xba, 0xed, 0x6, 0xc6,
+ 0x9e};
+
+ oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+
+ if (oln::utils::md5(oln::convol::fast::gaussian(im1, 2)) == key)
+ std::cout << "OK" << std::endl;
+ else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh4
--- olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh4 Tue, 23 Mar 2004 13:53:56 +0100 palma_g ()
+++ olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh4 Tue, 23 Mar 2004 12:07:13 +0100 palma_g (oln/k/17_out_olena_ 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/convol/fast_gaussian.hh>
+#include <oln/core/behavior.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x56, 0x10, 0x9f, 0xa9, 0xec, 0x89, 0x99, 0x14, 0x42, 0x4a, 0xcf, 0x42, 0xa9, 0xa2, 0xe3, 0xf4};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::convol::fast::gaussian(im1, 2)) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh3
--- olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh3 Tue, 23 Mar 2004 13:53:56 +0100 palma_g ()
+++ olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh3 Tue, 23 Mar 2004 12:07:03 +0100 palma_g (oln/k/18_out_olena_ 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/convol/fast_gaussian.hh>
+#include <oln/core/behavior.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0x56, 0x10, 0x9f, 0xa9, 0xec, 0x89, 0x99, 0x14, 0x42, 0x4a, 0xcf, 0x42, 0xa9, 0xa2, 0xe3, 0xf4};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::convol::fast::gaussian(im1, 2)) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh2
--- olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh2 Tue, 23 Mar 2004 13:53:56 +0100 palma_g ()
+++ olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh2 Tue, 23 Mar 2004 12:06:52 +0100 palma_g (oln/k/19_out_olena_ 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/convol/fast_gaussian.hh>
+#include <oln/core/behavior.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xc, 0xec, 0xc0, 0x4c, 0xf4, 0xd1, 0xab, 0xef, 0x1c, 0xd3, 0x9c, 0xa7, 0x4d, 0xd7, 0x28, 0x92};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::convol::fast::gaussian(im1, 2, oln::value_behavior<oln_value_type_(im_type)>(0))) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh1
--- olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh1 Tue, 23 Mar 2004 13:53:56 +0100 palma_g ()
+++ olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh1 Tue, 23 Mar 2004 12:06:42 +0100 palma_g (oln/k/20_out_olena_ 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/convol/fast_gaussian.hh>
+#include <oln/core/behavior.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xc, 0xec, 0xc0, 0x4c, 0xf4, 0xd1, 0xab, 0xef, 0x1c, 0xd3, 0x9c, 0xa7, 0x4d, 0xd7, 0x28, 0x92};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::convol::fast::gaussian(im1, 2, oln::value_behavior<oln_value_type_(im_type)>(0))) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
Index: olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh0
--- olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh0 Tue, 23 Mar 2004 13:53:56 +0100 palma_g ()
+++ olena/tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh0 Tue, 23 Mar 2004 12:06:31 +0100 palma_g (oln/k/21_out_olena_ 644)
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/convol/fast_gaussian.hh>
+#include <oln/core/behavior.hh>
+#include <ntg/all.hh>
+
+int main()
+{
+oln::utils::key::value_type data_key[16] = {0xc, 0xec, 0xc0, 0x4c, 0xf4, 0xd1, 0xab, 0xef, 0x1c, 0xd3, 0x9c, 0xa7, 0x4d, 0xd7, 0x28, 0x92};
+
+oln::utils::key key(data_key);
+
+ typedef oln::image2d<ntg::
+int_u8> im_type;
+ im_type im1(oln::load(rdata("lena256.pgm")));
+ if (oln::utils::md5(oln::convol::fast::gaussian(im1, 2, oln::value_behavior<oln_value_type_(im_type)>(0))) == key)
+ std::cout << "OK" << std::endl;
+else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ return 0;
+ }
--
Giovanni Palma
EPITA - promo 2005 - membre d'EpX - LRDE
Mob. : +33 (0)6 60 97 31 74
2
1
Index: olena/ChangeLog
from Simon Odou <simon(a)lrde.epita.fr>
* olena/oln/core/bkd_iter1d.hh: Correct comments.
* olena/oln/core/bkd_iter2d.hh: Likewise.
* olena/oln/core/bkd_iter3d.hh: Likewise.
* olena/oln/core/fwd_iter1d.hh: Likewise.
* olena/oln/core/fwd_iter2d.hh: Likewise.
* olena/oln/core/fwd_iter3d.hh: Likewise.
* olena/oln/core/abstract/iter1d.hh: Likewise.
* olena/oln/core/abstract/iter2d.hh: Likewise.
* olena/oln/core/abstract/iter3d.hh: Likewise.
* olena/oln/core/abstract/iter.hh: Likewise.
* olena/oln/core/neighborhood1d.hh: Likewise.
* olena/oln/core/neighborhood2d.hh: Likewise.
* olena/oln/core/neighborhood3d.hh: Likewise.
* olena/oln/core/abstract/neighborhood.hh: Likewise.
* olena/oln/core/abstract/struct_elt.hh: Likewise.
* olena/oln/core/window1d.hh: Likewise.
* olena/oln/core/window2d.hh: Likewise.
* olena/oln/core/window3d.hh: Likewise.
* olena/oln/core/abstract/window.hh: Likewise.
* olena/oln/core/w_window1d.hh: Likewise.
* olena/oln/core/w_window2d.hh: Likewise.
* olena/oln/core/w_window3d.hh: Likewise.
* olena/oln/core/abstract/w_window.hh: Likewise.
* olena/oln/io/base.hh: Likewise.
* olena/oln/core/abstract/window_base.hh: Likewise.
* olena/oln/core/abstract/windownd.hh: Likewise.
* olena/oln/core/abstract/w_windownd.hh: Likewise.
* olena/oln/core/abstract/neighborhoodnd.hh: Likewise.
Index: olena/oln/core/bkd_iter1d.hh
--- olena/oln/core/bkd_iter1d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/d/38_bkd_iter1d 1.18 640)
+++ olena/oln/core/bkd_iter1d.hh Fri, 19 Mar 2004 13:41:07 +0100 odou_s (oln/d/38_bkd_iter1d 1.18 640)
@@ -99,12 +99,7 @@
return super_iter_type::operator=(u);
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/bkd_iter2d.hh
--- olena/oln/core/bkd_iter2d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/d/37_bkd_iter2d 1.18 640)
+++ olena/oln/core/bkd_iter2d.hh Fri, 19 Mar 2004 13:41:22 +0100 odou_s (oln/d/37_bkd_iter2d 1.18 640)
@@ -98,12 +98,7 @@
return super_iter_type::operator=(u);
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/bkd_iter3d.hh
--- olena/oln/core/bkd_iter3d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/d/36_bkd_iter3d 1.18 640)
+++ olena/oln/core/bkd_iter3d.hh Fri, 19 Mar 2004 13:41:45 +0100 odou_s (oln/d/36_bkd_iter3d 1.18 640)
@@ -95,12 +95,7 @@
return super_iter_type::operator=(u);
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string name()
{
return std::string("bkd_iter3d<") + Exact::name() + ">";
Index: olena/oln/core/fwd_iter1d.hh
--- olena/oln/core/fwd_iter1d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/d/21_fwd_iter1d 1.15 640)
+++ olena/oln/core/fwd_iter1d.hh Fri, 19 Mar 2004 13:42:07 +0100 odou_s (oln/d/21_fwd_iter1d 1.15 640)
@@ -97,12 +97,7 @@
return super_iter_type::operator=(u);
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/fwd_iter2d.hh
--- olena/oln/core/fwd_iter2d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/d/20_fwd_iter2d 1.15 640)
+++ olena/oln/core/fwd_iter2d.hh Fri, 19 Mar 2004 13:45:33 +0100 odou_s (oln/d/20_fwd_iter2d 1.15 640)
@@ -99,12 +99,7 @@
return super_iter_type::operator=(u);
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/fwd_iter3d.hh
--- olena/oln/core/fwd_iter3d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/d/19_fwd_iter3d 1.15 640)
+++ olena/oln/core/fwd_iter3d.hh Fri, 19 Mar 2004 13:45:32 +0100 odou_s (oln/d/19_fwd_iter3d 1.15 640)
@@ -96,12 +96,7 @@
return super_iter_type::operator=(u);
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/abstract/iter1d.hh
--- olena/oln/core/abstract/iter1d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/d/10_iter1d.hh 1.19 640)
+++ olena/oln/core/abstract/iter1d.hh Fri, 19 Mar 2004 13:45:36 +0100 odou_s (oln/d/10_iter1d.hh 1.19 640)
@@ -88,12 +88,7 @@
return this->p_.col();
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string name()
{
return std::string("_iter1d<") + Exact::name() + ">";
Index: olena/oln/core/abstract/iter2d.hh
--- olena/oln/core/abstract/iter2d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/d/9_iter2d.hh 1.19 640)
+++ olena/oln/core/abstract/iter2d.hh Fri, 19 Mar 2004 13:45:35 +0100 odou_s (oln/d/9_iter2d.hh 1.19 640)
@@ -101,12 +101,7 @@
return this->p_.col();
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string name()
{
return std::string("_iter2d<") + Exact::name() + ">";
Index: olena/oln/core/abstract/iter3d.hh
--- olena/oln/core/abstract/iter3d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/d/8_iter3d.hh 1.19 640)
+++ olena/oln/core/abstract/iter3d.hh Fri, 19 Mar 2004 13:45:35 +0100 odou_s (oln/d/8_iter3d.hh 1.19 640)
@@ -114,12 +114,7 @@
return this->p_.col();
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string name()
{
return std::string("_iter3d<") + Exact::name() + ">";
Index: olena/oln/core/abstract/iter.hh
--- olena/oln/core/abstract/iter.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/40_iter.hh 1.21 640)
+++ olena/oln/core/abstract/iter.hh Fri, 19 Mar 2004 13:45:36 +0100 odou_s (oln/c/40_iter.hh 1.21 640)
@@ -358,12 +358,7 @@
return ! this->operator==(e);
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/neighborhood1d.hh
--- olena/oln/core/neighborhood1d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/37_neighborho 1.17 640)
+++ olena/oln/core/neighborhood1d.hh Fri, 19 Mar 2004 13:46:58 +0100 odou_s (oln/c/37_neighborho 1.17 640)
@@ -58,7 +58,7 @@
**
** It looks like structuring elements but here, when
** you add an element, you add its opposite.
- ** Points have 1 dimensions.
+ ** Points (dpoint) have 1 dimension.
**
*/
class neighborhood1d :
@@ -139,12 +139,7 @@
add(dpoint_type(crd[i]));
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/neighborhood2d.hh
--- olena/oln/core/neighborhood2d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/36_neighborho 1.18 640)
+++ olena/oln/core/neighborhood2d.hh Fri, 19 Mar 2004 13:43:01 +0100 odou_s (oln/c/36_neighborho 1.18 640)
@@ -159,12 +159,7 @@
return r.assign(*this);
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/neighborhood3d.hh
--- olena/oln/core/neighborhood3d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/35_neighborho 1.17 640)
+++ olena/oln/core/neighborhood3d.hh Fri, 19 Mar 2004 13:43:18 +0100 odou_s (oln/c/35_neighborho 1.17 640)
@@ -140,12 +140,7 @@
add(dpoint_type(crd[i], crd[i+1], crd[i+2]));
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/abstract/neighborhood.hh
--- olena/oln/core/abstract/neighborhood.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/38_neighborho 1.21 640)
+++ olena/oln/core/abstract/neighborhood.hh Fri, 19 Mar 2004 16:01:20 +0100 odou_s (oln/c/38_neighborho 1.21 640)
@@ -56,8 +56,7 @@
** \brief Neighborhood.
**
** It looks like structuring elements but here, when
- ** you add an element, you add its opposite (cf mathematical
- ** definition to know more about).
+ ** you add an element, you add its opposite.
** This abstract class defines several virtual methods for his
** subclasses. Its goal is to deal with a set of deplacement points.
**
@@ -93,12 +92,7 @@
enum { dim = struct_elt_traits<Exact>::dim };
///< Set the dim of the points of the neighborhood.
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/abstract/struct_elt.hh
--- olena/oln/core/abstract/struct_elt.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/25_structelt. 1.22 640)
+++ olena/oln/core/abstract/struct_elt.hh Fri, 19 Mar 2004 16:01:45 +0100 odou_s (oln/c/25_structelt. 1.22 640)
@@ -56,7 +56,7 @@
namespace abstract {
/*!
- ** Structuring elements (set of points).
+ ** Structuring elements (set of dpoints).
**
** This abstract class defines several virtual methods for its
** subclasses. Its goal is to deal with a set of 'move' points.
@@ -72,12 +72,7 @@
typedef typename struct_elt_traits<Exact>::abstract_type abstract_type;
///< Set the abstract type of hisself.
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/window1d.hh
--- olena/oln/core/window1d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/15_window1d.h 1.17 640)
+++ olena/oln/core/window1d.hh Fri, 19 Mar 2004 13:45:31 +0100 odou_s (oln/c/15_window1d.h 1.17 640)
@@ -139,12 +139,7 @@
add(dpoint_type(crd[i]));
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/window2d.hh
--- olena/oln/core/window2d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/14_window2d.h 1.19 640)
+++ olena/oln/core/window2d.hh Fri, 19 Mar 2004 13:44:00 +0100 odou_s (oln/c/14_window2d.h 1.19 640)
@@ -160,12 +160,7 @@
return r.assign(*this);
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/window3d.hh
--- olena/oln/core/window3d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/13_window3d.h 1.18 640)
+++ olena/oln/core/window3d.hh Fri, 19 Mar 2004 13:44:21 +0100 odou_s (oln/c/13_window3d.h 1.18 640)
@@ -139,12 +139,7 @@
add(dpoint_type(crd[i], crd[i+1], crd[i+2]));
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/abstract/window.hh
--- olena/oln/core/abstract/window.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/16_window.hh 1.19 640)
+++ olena/oln/core/abstract/window.hh Fri, 19 Mar 2004 13:45:34 +0100 odou_s (oln/c/16_window.hh 1.19 640)
@@ -73,12 +73,7 @@
friend class struct_elt<exact_type>;
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/w_window1d.hh
--- olena/oln/core/w_window1d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/19_w_window1d 1.18 640)
+++ olena/oln/core/w_window1d.hh Fri, 19 Mar 2004 13:45:31 +0100 odou_s (oln/c/19_w_window1d 1.18 640)
@@ -163,12 +163,7 @@
return set(dpoint_type(col), weight);
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/w_window2d.hh
--- olena/oln/core/w_window2d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/18_w_window2d 1.6.1.13 640)
+++ olena/oln/core/w_window2d.hh Fri, 19 Mar 2004 13:45:31 +0100 odou_s (oln/c/18_w_window2d 1.6.1.13 640)
@@ -182,12 +182,7 @@
return set(dpoint_type(row, col), weight);
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/w_window3d.hh
--- olena/oln/core/w_window3d.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/17_w_window3d 1.18 640)
+++ olena/oln/core/w_window3d.hh Fri, 19 Mar 2004 13:45:16 +0100 odou_s (oln/c/17_w_window3d 1.18 640)
@@ -169,12 +169,7 @@
return set(dpoint_type(slice, row, col), weight);
}
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/abstract/w_window.hh
--- olena/oln/core/abstract/w_window.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/c/20_w_window.h 1.16 640)
+++ olena/oln/core/abstract/w_window.hh Fri, 19 Mar 2004 13:38:37 +0100 odou_s (oln/c/20_w_window.h 1.16 640)
@@ -75,12 +75,7 @@
///< Set the type of weight.
friend class struct_elt<exact_type>;
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/io/base.hh
--- olena/oln/io/base.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/b/20_base.hh 1.9 640)
+++ olena/oln/io/base.hh Fri, 19 Mar 2004 16:25:55 +0100 odou_s (oln/b/20_base.hh 1.9 640)
@@ -47,9 +47,9 @@
namespace internal {
/*!
- ** \brief Read anything from a file.
+ ** \brief Read from a file.
**
- ** The "good" read function is called by template specialization.
+ ** The specialized read function is called by template specialization.
*/
template<typename T>
bool
@@ -61,7 +61,7 @@
/*!
** \brief Write anything to a file.
**
- ** The "good" write function is called by template specialization.
+ ** The specialized write function is called by template specialization.
*/
template<typename T>
bool
@@ -79,10 +79,13 @@
** a window or a neighborhood.
** \arg name The name of the file.
** \return The new object.
+ ** \sa oln::abstract::iter
**
- ** Here is the external interface.
- ** If you would like some examples to know how to use that, go to
- ** oln::abstract::iter
+ ** Call abstract::image::has_impl to test that your image has been
+ ** successfully loaded.
+ ** See oln::io::internal::reader_id to know which file are supported.
+ ** \sa abstract::image::has_impl
+ ** \sa
*/
inline
internal::anything
@@ -92,13 +95,12 @@
}
/*
- ** \brief Load object from a file. This could be an image but also
- ** a window or a neighborhood.
+ ** \brief Load an image or a structuring element from a file.
** \arg output The object to write to a file.
** \arg name The name of the file.
** \return True if successful.
**
- ** Here is the external interface. Depending of T, work is dispatched.
+ ** Depending of T, work is dispatched.
*/
template<class T>
bool
@@ -108,15 +110,14 @@
}
/*
- ** \brief Writing object to a file. This could be an image but also
+ ** \brief Write an image or a structuring element to a file.
** a window or a neighborhood.
** \arg input The object to read.
** \arg name The name of the file.
** \return True if successful.
**
- ** Here is the external interface. Depending of T, work is dispatched.
- ** If you would like some examples to know how to use that, go to
- ** oln::abstract::iter
+ ** Depending of T, work is dispatched.
+ ** \sa oln::abstract::iter
*/
template< typename T >
bool
Index: olena/oln/core/abstract/window_base.hh
--- olena/oln/core/abstract/window_base.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/u/3_window_bas 1.11 640)
+++ olena/oln/core/abstract/window_base.hh Fri, 19 Mar 2004 13:45:34 +0100 odou_s (oln/u/3_window_bas 1.11 640)
@@ -134,12 +134,7 @@
friend class neighborhood<Exact>;
// friend class window_base_friend_traits<Sup>::ret;
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/abstract/windownd.hh
--- olena/oln/core/abstract/windownd.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/u/4_windownd.h 1.9 640)
+++ olena/oln/core/abstract/windownd.hh Fri, 19 Mar 2004 13:45:33 +0100 odou_s (oln/u/4_windownd.h 1.9 640)
@@ -72,12 +72,7 @@
friend class window<exact_type>;
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/abstract/w_windownd.hh
--- olena/oln/core/abstract/w_windownd.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/u/5_w_windownd 1.8 640)
+++ olena/oln/core/abstract/w_windownd.hh Fri, 19 Mar 2004 13:39:47 +0100 odou_s (oln/u/5_w_windownd 1.8 640)
@@ -74,12 +74,7 @@
friend class w_window<exact_type>;
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
Index: olena/oln/core/abstract/neighborhoodnd.hh
--- olena/oln/core/abstract/neighborhoodnd.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/u/6_neighborho 1.8 640)
+++ olena/oln/core/abstract/neighborhoodnd.hh Fri, 19 Mar 2004 17:35:10 +0100 odou_s (oln/u/6_neighborho 1.8 640)
@@ -53,7 +53,9 @@
** \brief Neighborhood N dimensions.
**
** It looks like structuring elements but here, when
- ** you add an element, you add its opposite.
+ ** you add an element, you add its opposite:
+ ** \f$$\forall d \in N, -d \in N$\f$
+ **
** Points have N dimensions.
**
*/
@@ -74,12 +76,7 @@
friend class neighborhood<exact_type>;
- /*!
- ** \brief Return its type in a string.
- ** \return The type in a string.
- **
- ** Very useful to debug.
- */
+ ///< Return the name of the type.
static std::string
name()
{
--
Simon Odou
simon(a)lrde.epita.fr
2
1