Index: olena/ChangeLog
from Giovanni Palma <giovanni(a)lrde.epita.fr>
* oln/makefile.src: Add morpho/abstract/attribute references.
* oln/morpho/attributes.hh: Remove comments.
* oln/morpho/abstract/attribute.hh: Real add the file.
* oln/morpho/abstract/attribute.hxx: Likewise.
Index: olena/oln/morpho/attributes.hh
--- olena/oln/morpho/attributes.hh Wed, 08 Sep 2004 10:15:22 +0200 palma_g (oln/j/45_attributes 1.13.1.6 600)
+++ olena/oln/morpho/attributes.hh Thu, 09 Sep 2004 11:14:29 +0200 palma_g (oln/j/45_attributes 1.13.1.6 644)
@@ -33,17 +33,6 @@
# include <oln/morpho/environments.hh>
# include <oln/morpho/abstract/attribute.hh>
-// // attribute dedicated macros
-// # 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
-
-
-
namespace oln {
namespace morpho {
/*! \brief Implementation of attributes.
@@ -64,15 +53,6 @@
}
} // !tools
-
-// // the traits fwd declaration
-// /*!
-// ** Traits for attributes information.
-// ** \param T Exact type of the attribute.
-// */
-// template <class T>
-// struct attr_traits;
-
/*!
** \brief Change the exact type of an attribute.
**
@@ -84,9 +64,6 @@
struct change_exact;
- // the attributes hierarchy
-
-
/*-----------*
| card |
*-----------*/
Index: olena/oln/makefile.src
--- olena/oln/makefile.src Tue, 13 Jul 2004 11:48:20 +0200 palma_g (oln/r/4_makefile.s 1.6 600)
+++ olena/oln/makefile.src Thu, 09 Sep 2004 11:16:39 +0200 palma_g (oln/r/4_makefile.s 1.6 644)
@@ -158,6 +158,8 @@
morpher/piece_morpher.hh \
morpher/slicing_morpher.hh \
morpher/subq_morpher.hh \
+ morpho/abstract/attribute.hh \
+ morpho/abstract/attribute.hxx \
morpho/attribute_closing_opening.hh \
morpho/attribute_closing_opening_map.hxx \
morpho/attribute_closing_opening_map.hh \
Index: olena/oln/morpho/abstract/attribute.hxx
--- olena/oln/morpho/abstract/attribute.hxx Thu, 09 Sep 2004 11:23:50 +0200 palma_g ()
+++ olena/oln/morpho/abstract/attribute.hxx Thu, 09 Sep 2004 11:21:53 +0200 palma_g (oln/v/38_attribute. 644)
@@ -0,0 +1,109 @@
+// 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_ABSTRACT_ATTRIBUTE_HXX
+# define OLN_MORPHO_ABSTRACT_ATTRIBUTE_HXX
+
+namespace oln
+{
+ namespace morpho
+ {
+ namespace attr
+ {
+ namespace abstract
+ {
+ template <class Exact>
+ inline void
+ attribute<Exact>::operator+=(const exact_type &rhs)
+ {
+ mlc_dispatch(pe)(rhs);
+ }
+
+ template <class Exact>
+ inline bool
+ attribute<Exact>::operator>=(const lambda_type &lambda) const
+ {
+ mlc_dispatch(ge)(lambda);
+ }
+
+ template <class Exact>
+ inline
+ bool
+ attribute<Exact>::operator<(const lambda_type &lambda) const
+ {
+ mlc_dispatch(less)(lambda);
+ }
+
+ template <class Exact>
+ inline
+ bool
+ attribute<Exact>::operator<(const exact_type &x) const
+ {
+ mlc_dispatch(less2)(x);
+ }
+
+ template <class Exact>
+ inline
+ bool
+ attribute<Exact>::operator!=(const lambda_type &lambda) const
+ {
+ mlc_dispatch(ne)(lambda);
+ }
+
+ template <class Exact>
+ inline const typename attribute<Exact>::lambda_type &
+ attribute<Exact>::toLambda() const
+ {
+ mlc_dispatch(toLambda)();
+ }
+
+ template <class Exact>
+ inline
+ bool
+ attribute<Exact>::ge_impl(const lambda_type &lambda) const
+ {
+ return !(*this < lambda);
+ }
+
+ template <class Exact>
+ inline
+ bool
+ attribute<Exact>::less2_impl(const exact_type &x) const
+ {
+ return *this < x.toLambda();
+ }
+
+ template <class Exact>
+ inline
+ attribute<Exact>::attribute()
+ {}
+ } // !abstract
+ } // !attr
+ } // !morpho
+} // !oln
+
+#endif // !OLN_MORPHO_ABSTRACT_ATTRIBUTE_HXX
Index: olena/oln/morpho/abstract/attribute.hh
--- olena/oln/morpho/abstract/attribute.hh Thu, 09 Sep 2004 11:23:50 +0200 palma_g ()
+++ olena/oln/morpho/abstract/attribute.hh Thu, 09 Sep 2004 11:21:23 +0200 palma_g (oln/v/40_attribute. 644)
@@ -0,0 +1,155 @@
+// 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_ABSTRACT_ATTRIBUTE_HH
+# define OLN_MORPHO_ABSTRACT_ATTRIBUTE_HH
+# include <oln/morpho/environments.hh>
+
+// attribute dedicated macros
+# 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) \
+ typedef mlc_exact_vt_type(self_type, Exact) exact_type; \
+ typedef attr_value_type(exact_type) value_type; \
+ typedef attr_env_type(exact_type) env_type; \
+ typedef attr_lambda_type(exact_type) lambda_type
+
+namespace oln
+{
+ namespace morpho
+ {
+ namespace attr
+ {
+ // the traits fwd declaration
+ /*!
+ ** Traits for attributes information.
+ ** \param T Exact type of the attribute.
+ */
+ template <class T>
+ struct attr_traits;
+ // }
+
+ namespace abstract
+ {
+ // namespace attr
+ // {
+
+ /*!
+ ** \brief Attribute abstract class
+ **
+ ** Top of the attribute hierarchy.
+ */
+ template <class Exact>
+ class attribute: public mlc_hierarchy::any<Exact>
+ {
+ public:
+ typedef attribute<Exact> self_type; /*< Self type of the class.*/
+ attr_type_decl(self_type);
+
+ /*!
+ ** \brief += operator
+ **
+ ** This is a static dispatcher for the += operator.
+ ** This method is abstract.
+ */
+ void operator+=(const exact_type &rhs);
+
+ /*!
+ ** \brief >= operator
+ **
+ ** This is a static dispatcher for the >= operator.
+ */
+ bool operator>=(const lambda_type &lambda) const;
+
+ /*!
+ ** \brief "<" operator
+ **
+ ** This is a static dispatcher for the "<" operator.
+ ** This method is abstract.
+ */
+ bool operator<(const lambda_type &lambda) const;
+
+ /*!
+ ** \brief "<" operator
+ **
+ ** This is a static dispatcher for the "<" operator.
+ ** This method is abstract.
+ */
+ bool operator<(const exact_type &x) const;
+
+ /*!
+ ** \brief != operator
+ **
+ ** This is a static dispatcher for the != operator.
+ ** This method is abstract.
+ */
+ bool operator!=(const lambda_type &lambda) const;
+
+ /*!
+ ** \brief conversion to lambda type.
+ **
+ ** \warning Virtual method.
+ */
+ const lambda_type &toLambda() const;
+
+ /*!
+ ** \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 be called.
+ */
+ bool ge_impl(const lambda_type &lambda) const;
+
+ /*!
+ ** \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 be called.
+ */
+ bool less2_impl(const exact_type &x) const;
+
+ protected:
+ attribute();
+ };
+ } // !abstract
+ } // !attr
+ } // !morpho
+} // !oln
+
+# include <oln/morpho/abstract/attribute.hxx>
+
+#endif // !OLN_MORPHO_ABSTRACT_ATTRIBUTE_HH
--
Giovanni Palma
EPITA - promo 2005 - LRDE
Mob. : +33 (0)6 60 97 31 74
Index: olena/ChangeLog
from Giovanni Palma <giovanni(a)lrde.epita.fr>
* tests/md5_morpho_attribute_closing_opening_light_hh5: Remove file.
* tests/md5_morpho_attribute_closing_opening_light_hh4: Likewise.
* tests/md5_morpho_attribute_closing_opening_light_hh3: Likewise.
* tests/md5_morpho_attribute_closing_opening_light_hh2: Likewise.
* tests/md5_morpho_attribute_closing_opening_light_hh1: Likewise.
* tests/md5_morpho_attribute_closing_opening_light_hh0: Likewise.
Index:
olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh5
--- olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh5 Tue, 20 Apr 2004 15:16:21 +0200 van-vl_n (oln/l/40_md5_morpho 1.2 644)
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh5 Fri, 16 Jul 2004 12:19:11 +0200 palma_g ()
@@ -1,57 +0,0 @@
-// -*- c++ -*-
-// 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.
-
-#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, 20 Apr 2004 15:16:21 +0200 van-vl_n (oln/l/41_md5_morpho 1.2 644)
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh4 Fri, 16 Jul 2004 12:19:11 +0200 palma_g ()
@@ -1,57 +0,0 @@
-// -*- c++ -*-
-// 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.
-
-#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, 20 Apr 2004 15:16:21 +0200 van-vl_n (oln/l/42_md5_morpho 1.2 644)
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh3 Fri, 16 Jul 2004 12:19:11 +0200 palma_g ()
@@ -1,58 +0,0 @@
-// -*- c++ -*-
-// 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.
-
-#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, 20 Apr 2004 15:16:21 +0200 van-vl_n (oln/l/43_md5_morpho 1.2 644)
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh2 Fri, 16 Jul 2004 12:19:11 +0200 palma_g ()
@@ -1,58 +0,0 @@
-// -*- c++ -*-
-// 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.
-
-#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, 20 Apr 2004 15:16:21 +0200 van-vl_n (oln/l/44_md5_morpho 1.2 644)
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh1 Fri, 16 Jul 2004 12:19:11 +0200 palma_g ()
@@ -1,57 +0,0 @@
-// -*- c++ -*-
-// 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.
-
-#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, 20 Apr 2004 15:16:21 +0200 van-vl_n (oln/l/45_md5_morpho 1.2 644)
+++ olena/tests/morpho/tests/md5_morpho_attribute_closing_opening_light_hh0 Fri, 16 Jul 2004 12:19:11 +0200 palma_g ()
@@ -1,57 +0,0 @@
-// -*- c++ -*-
-// 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.
-
-#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;
- }
--
Giovanni Palma
EPITA - promo 2005 - membre d'EpX - LRDE
Mob. : +33 (0)6 60 97 31 74
"Shouldn't such a massive change be reflected in NEWS? Are you working
on the documentation and test suite too?"
(Copyright Akim)
This is true for shaplets AND for deconvolution.
Reply "ok" once it is done.
Thanks.
--
Niels