2006-09-26 Thierry GERAUD <theo(a)tegucigalpa.lrde.epita.fr>
Dispatch image abstract classes into subdirs and files.
* oln/core/abstract/image/type: New directory.
* oln/core/abstract/image/dimension: New directory.
* oln/core/abstract/image/neighborhood: New directory.
* oln/core/abstract/image_type.hh (internal): Remove.
Rename into...
* oln/core/abstract/image/type/hierarchy.hh: ...this file.
* oln/core/abstract/image_dimension.hh: Rename into...
* oln/core/abstract/image/dimension/hierarchy.hh: ...this file.
* oln/core/abstract/image_hierarchies.hh: Rename into...
* oln/core/abstract/image/hierarchies.hh: ...this file.
* oln/core/abstract/image_type_integre.hh: Rename into...
* oln/core/abstract/image/type/integre.hh: ...this file.
* oln/core/abstract/image_having_neighborhood.hh: Rename into...
* oln/core/abstract/image/neighborhood/hierarchy.hh: ...this file.
* oln/core/abstract/image.hh (include): Update.
* Makefile.am: Update.
Index: oln/core/abstract/image.hh
===================================================================
--- oln/core/abstract/image.hh (revision 569)
+++ oln/core/abstract/image.hh (working copy)
@@ -160,7 +160,7 @@
} // end of namespace oln
-# include <oln/core/abstract/image_hierarchies.hh>
+# include <oln/core/abstract/image/hierarchies.hh>
#endif // ! OLENA_CORE_ABSTRACT_IMAGE_HH
Index: oln/core/abstract/image_type.hh
===================================================================
--- oln/core/abstract/image_type.hh (revision 569)
+++ oln/core/abstract/image_type.hh (working copy)
@@ -1,275 +0,0 @@
-// Copyright (C) 2005, 2006 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, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-#ifndef OLENA_CORE_ABSTRACT_IMAGE_TYPE_HH
-# define OLENA_CORE_ABSTRACT_IMAGE_TYPE_HH
-
-# include <oln/core/abstract/image.hh>
-
-
-/* Image ``type'' hierarchy (summary).
-
-
- /image<I>/
- ^
- |
- ,--------------+-------------+-------------+--------+---------.
- | | | | | |
- /grey_level_image/ /color_image/ /label_image/ /data_image/ ... /not_binary_
- ^ ^ ^ ^ ^ ^ image/
- | | | | | | ^
- | | | /binary_image/ | | |
- | | | ^ | | |
- | | | | | | |
- ,---------------------------------------------------------------------.
- | The selection of the super class(es) is made according to the value |
- | of type_of(I, value). |
- `---------------------------------------------------------------------'
- | | | | | | |
- o o o o o o o
-
- o
- |
- /switch_<image_dimension_type, I>::ret/
- (image type selector)
- ^
- |
- /entry<abstract::image, I>/
- ^
- |
- image_entry<I>
- ^
- |
- I
- (a concrete image)
-
-
- Default case: If no known value type is returned by `oln_type_of(I, value)',
- the entry is plugged to abstract::data_image<I>. */
-
-
-/*--------------------.
-| Type abstractions. |
-`--------------------*/
-
-namespace oln
-{
-
- namespace abstract
- {
-
- /// \brief Class of grey-level images.
- ///
- /// An image that contains values whose type is \c int or
- /// <tt>unsigned char</tt>, or ntg::int_u<8> (...) is
<b>not</b> a
- /// grey-level image.
- ///
- /// FIXME: Say more.
- template <typename E>
- struct grey_level_image : public virtual image<E>
- {
- protected:
- /// Constructor (protected, empty).
- grey_level_image() {}
- };
-
- /// Class of color images.
- template <typename E>
- struct color_image : public virtual image<E>
- {
- protected:
- /// Constructor (protected, empty).
- color_image() {}
- };
-
- /// \brief Class of images whose data are NOT Boolean values.
- ///
- /// However such images can derive from abstract::label_image (we
- /// can have labels that are not binary ones).
- template <typename E>
- struct not_binary_image : public virtual image<E>
- {
- protected:
- /// Constructor (protected, empty).
- not_binary_image() {}
- };
-
- /// \brief Class of images whose data are labels.
- ///
- /// Such images do not support arithmetics.
- template <typename E>
- struct label_image : public virtual image<E>
- {
- protected:
- /// Constructor (protected, empty).
- label_image() {}
- };
-
- /// \brief Class of images whose data are Boolean values.
- ///
- /// Such images are also oln::abstract::label_image.
- template <typename E>
- struct binary_image : public label_image<E>
- {
- protected:
- /// Constructor (protected, empty).
- binary_image() {}
- };
-
- /// \brief Class of images whose data cannot be qualified of
- /// grey-levels, colors, or labels.
- template <typename E>
- struct data_image : public virtual image<E>
- {
- protected:
- /// Constructor (protected, empty).
- data_image() {}
- };
-
-
- // -------------------- //
- // Conjunctions types. //
- // -------------------- //
-
- namespace internal
- {
-
- /// \brief Conjunctions types
- ///
- /// These types are helpers to express the inheritance relation
- /// ``is a X and not_binary_image''. These abstractions are not
- /// to be used by client code (i.e., algorithms), they are only
- /// part of the inheritance machinery.
- //
- /// \{
-
- /// <em>Grey-level image</em> and <em>not binary image</em>
abstraction.
- template <typename E>
- struct grey_level_image_ : public grey_level_image<E>,
- public not_binary_image<E>
- {
- protected:
- /// Constructor (protected, empty).
- grey_level_image_() {}
- };
-
- /// <em>Label image</em> and <em>not binary image</em>
abstraction.
- template <typename E>
- struct label_image_ : public label_image<E>,
- public not_binary_image<E>
- {
- protected:
- /// Constructor (protected, empty).
- label_image_() {}
- };
-
- /// <em>Color image</em> and <em>not binary image</em>
abstraction.
- template <typename E>
- struct color_image_ : public color_image<E>,
- public not_binary_image<E>
- {
- protected:
- /// Constructor (protected, empty).
- color_image_() {}
- };
-
- /// <em>Data image</em> and <em>not binary image</em>
abstraction.
- template <typename E>
- struct data_image_ : public data_image<E>,
- public not_binary_image<E>
- {
- protected:
- /// Constructor (protected, empty).
- data_image_() {}
- };
-
- /// \}
-
- } // end of namespace oln::abstract::internal
-
- } // end of namespace oln::abstract
-
-} // end of namespace oln
-
-
-/*--------------.
-| Type switch. |
-`--------------*/
-
-namespace oln
-{
-
- /// Switch on on the grid dimension.
- /// \{
-
- // ----------------------------------------------- //
- // Cases where the value type is an builtin type. //
- // ----------------------------------------------- //
-
- /// Binary case.
- template <typename E>
- struct case_< image_hierarchy_wrt_type, E, 1 > :
- where_< mlc::eq_< oln_type_of(E, value), bool > >
- {
- // Definition of the super class corresponding to this case.
- typedef abstract::binary_image<E> ret;
- };
-
- /// Grey-level case.
- template <typename E>
- struct case_< image_hierarchy_wrt_type, E, 2 > :
- where_< mlc::or_list_< mlc::eq_<oln_type_of(E, value), char>,
- mlc::eq_<oln_type_of(E, value), signed char>,
- mlc::eq_<oln_type_of(E, value), unsigned char> > >
- {
- // Definition of the super class corresponding to this case
- // (abstract::grey_level_image_ is the conjunction of
- // abstract::grey_level_image and abstract::not_binary_image).
- typedef abstract::internal::grey_level_image_<E> ret;
- };
-
-
- // -------------- //
- // Default case. //
- // -------------- //
-
- /// Default case: image of ``data''.
- template <typename E>
- struct default_case_< image_hierarchy_wrt_type, E >
- {
- // Definition of the super class corresponding to this case
- // (abstract::data_image_ is the conjunction of
- // abstract::data_image and abstract::not_binary_image).
- typedef abstract::internal::data_image_<E> ret;
- };
-
- /// \}
-
-} // end of namespace oln
-
-
-#endif // ! OLENA_CORE_ABSTRACT_IMAGE_TYPE_HH
Index: oln/core/abstract/image/type/binary.hh
===================================================================
--- oln/core/abstract/image/type/binary.hh (revision 0)
+++ oln/core/abstract/image/type/binary.hh (revision 0)
@@ -0,0 +1,56 @@
+// Copyright (C) 2005, 2006 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLENA_CORE_ABSTRACT_IMAGE_TYPE_BINARY_HH
+# define OLENA_CORE_ABSTRACT_IMAGE_TYPE_BINARY_HH
+
+# include <oln/core/abstract/image/type/label.hh>
+
+
+namespace oln
+{
+
+ namespace abstract
+ {
+
+ /// \brief Class of images whose data are Boolean values.
+ ///
+ /// Such images are also oln::abstract::label_image.
+ template <typename E>
+ struct binary_image : public label_image<E>
+ {
+ protected:
+ /// Constructor (protected, empty).
+ binary_image() {}
+ };
+
+ } // end of namespace oln::abstract
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_ABSTRACT_IMAGE_TYPE_BINARY_HH
Index: oln/core/abstract/image/type/data.hh
===================================================================
--- oln/core/abstract/image/type/data.hh (revision 0)
+++ oln/core/abstract/image/type/data.hh (revision 0)
@@ -0,0 +1,54 @@
+// Copyright (C) 2005, 2006 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLENA_CORE_ABSTRACT_IMAGE_TYPE_DATA_HH
+# define OLENA_CORE_ABSTRACT_IMAGE_TYPE_DATA_HH
+
+# include <oln/core/abstract/image.hh>
+
+namespace oln
+{
+
+ namespace abstract
+ {
+
+ /// \brief Class of images whose data cannot be qualified of
+ /// grey-levels, colors, or labels.
+ template <typename E>
+ struct data_image : public virtual image<E>
+ {
+ protected:
+ /// Constructor (protected, empty).
+ data_image() {}
+ };
+
+ } // end of namespace oln::abstract
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_ABSTRACT_IMAGE_TYPE_DATA_HH
Index: oln/core/abstract/image/type/integre.hh
===================================================================
--- oln/core/abstract/image/type/integre.hh (revision 0)
+++ oln/core/abstract/image/type/integre.hh (working copy)
@@ -32,7 +32,7 @@
#ifndef OLENA_CORE_ABSTRACT_IMAGE_TYPE_INTEGRE_HH
# define OLENA_CORE_ABSTRACT_IMAGE_TYPE_INTEGRE_HH
-# include <oln/core/abstract/image_type.hh>
+# include <oln/core/abstract/image/type/hierarchy.hh>
// Forward declarations.
Index: oln/core/abstract/image/type/grey_level.hh
===================================================================
--- oln/core/abstract/image/type/grey_level.hh (revision 0)
+++ oln/core/abstract/image/type/grey_level.hh (revision 0)
@@ -0,0 +1,60 @@
+// Copyright (C) 2005, 2006 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLENA_CORE_ABSTRACT_IMAGE_TYPE_GREY_LEVEL_HH
+# define OLENA_CORE_ABSTRACT_IMAGE_TYPE_GREY_LEVEL_HH
+
+# include <oln/core/abstract/image.hh>
+
+
+namespace oln
+{
+
+ namespace abstract
+ {
+
+ /// \brief Class of grey-level images.
+ ///
+ /// An image that contains values whose type is \c int or
+ /// <tt>unsigned char</tt>, or ntg::int_u<8> (...) is
<b>not</b> a
+ /// grey-level image.
+ ///
+ /// FIXME: Say more.
+ template <typename E>
+ struct grey_level_image : public virtual image<E>
+ {
+ protected:
+ /// Constructor (protected, empty).
+ grey_level_image() {}
+ };
+
+ } // end of namespace oln::abstract
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_ABSTRACT_IMAGE_TYPE_GREY_LEVEL_HH
Index: oln/core/abstract/image/type/hierarchy.hh
===================================================================
--- oln/core/abstract/image/type/hierarchy.hh (revision 0)
+++ oln/core/abstract/image/type/hierarchy.hh (working copy)
@@ -25,8 +25,8 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef OLENA_CORE_ABSTRACT_IMAGE_TYPE_HH
-# define OLENA_CORE_ABSTRACT_IMAGE_TYPE_HH
+#ifndef OLENA_CORE_ABSTRACT_IMAGE_TYPE_HIERARCHY_HH
+# define OLENA_CORE_ABSTRACT_IMAGE_TYPE_HIERARCHY_HH
# include <oln/core/abstract/image.hh>
@@ -37,20 +37,20 @@
/image<I>/
^
|
- ,--------------+-------------+-------------+--------+---------.
- | | | | | |
- /grey_level_image/ /color_image/ /label_image/ /data_image/ ... /not_binary_
- ^ ^ ^ ^ ^ ^ image/
- | | | | | | ^
- | | | /binary_image/ | | |
- | | | ^ | | |
- | | | | | | |
- ,---------------------------------------------------------------------.
- | The selection of the super class(es) is made according to the value |
- | of type_of(I, value). |
- `---------------------------------------------------------------------'
- | | | | | | |
- o o o o o o o
+ ,--------------+-------------+-------------+--------+
+ | | | | |
+ /grey_level_image/ /color_image/ /label_image/ /data_image/ ...
+ ^ ^ ^ ^ ^ ^
+ | | | | | |
+ | | | /binary_image/ | |
+ | | | ^ | |
+ | | | | | |
+ ,----------------------------------------------------------.
+ | The selection of the super class(es) is made according |
+ | to the value of type_of(I, value). |
+ `----------------------------------------------------------'
+ | | | | | |
+ o o o o o o
o
|
@@ -72,150 +72,22 @@
the entry is plugged to abstract::data_image<I>. */
+
/*--------------------.
| Type abstractions. |
`--------------------*/
-namespace oln
-{
+# include <oln/core/abstract/image/type/binary.hh>
+# include <oln/core/abstract/image/type/color.hh>
+# include <oln/core/abstract/image/type/data.hh>
+# include <oln/core/abstract/image/type/grey_level.hh>
+# include <oln/core/abstract/image/type/label.hh>
- namespace abstract
- {
+// FIXME: do we really want this file?
+// # include <oln/core/abstract/image/type/integre.hh>
- /// \brief Class of grey-level images.
- ///
- /// An image that contains values whose type is \c int or
- /// <tt>unsigned char</tt>, or ntg::int_u<8> (...) is
<b>not</b> a
- /// grey-level image.
- ///
- /// FIXME: Say more.
- template <typename E>
- struct grey_level_image : public virtual image<E>
- {
- protected:
- /// Constructor (protected, empty).
- grey_level_image() {}
- };
- /// Class of color images.
- template <typename E>
- struct color_image : public virtual image<E>
- {
- protected:
- /// Constructor (protected, empty).
- color_image() {}
- };
- /// \brief Class of images whose data are NOT Boolean values.
- ///
- /// However such images can derive from abstract::label_image (we
- /// can have labels that are not binary ones).
- template <typename E>
- struct not_binary_image : public virtual image<E>
- {
- protected:
- /// Constructor (protected, empty).
- not_binary_image() {}
- };
-
- /// \brief Class of images whose data are labels.
- ///
- /// Such images do not support arithmetics.
- template <typename E>
- struct label_image : public virtual image<E>
- {
- protected:
- /// Constructor (protected, empty).
- label_image() {}
- };
-
- /// \brief Class of images whose data are Boolean values.
- ///
- /// Such images are also oln::abstract::label_image.
- template <typename E>
- struct binary_image : public label_image<E>
- {
- protected:
- /// Constructor (protected, empty).
- binary_image() {}
- };
-
- /// \brief Class of images whose data cannot be qualified of
- /// grey-levels, colors, or labels.
- template <typename E>
- struct data_image : public virtual image<E>
- {
- protected:
- /// Constructor (protected, empty).
- data_image() {}
- };
-
-
- // -------------------- //
- // Conjunctions types. //
- // -------------------- //
-
- namespace internal
- {
-
- /// \brief Conjunctions types
- ///
- /// These types are helpers to express the inheritance relation
- /// ``is a X and not_binary_image''. These abstractions are not
- /// to be used by client code (i.e., algorithms), they are only
- /// part of the inheritance machinery.
- //
- /// \{
-
- /// <em>Grey-level image</em> and <em>not binary image</em>
abstraction.
- template <typename E>
- struct grey_level_image_ : public grey_level_image<E>,
- public not_binary_image<E>
- {
- protected:
- /// Constructor (protected, empty).
- grey_level_image_() {}
- };
-
- /// <em>Label image</em> and <em>not binary image</em>
abstraction.
- template <typename E>
- struct label_image_ : public label_image<E>,
- public not_binary_image<E>
- {
- protected:
- /// Constructor (protected, empty).
- label_image_() {}
- };
-
- /// <em>Color image</em> and <em>not binary image</em>
abstraction.
- template <typename E>
- struct color_image_ : public color_image<E>,
- public not_binary_image<E>
- {
- protected:
- /// Constructor (protected, empty).
- color_image_() {}
- };
-
- /// <em>Data image</em> and <em>not binary image</em>
abstraction.
- template <typename E>
- struct data_image_ : public data_image<E>,
- public not_binary_image<E>
- {
- protected:
- /// Constructor (protected, empty).
- data_image_() {}
- };
-
- /// \}
-
- } // end of namespace oln::abstract::internal
-
- } // end of namespace oln::abstract
-
-} // end of namespace oln
-
-
/*--------------.
| Type switch. |
`--------------*/
@@ -246,10 +118,8 @@
mlc::eq_<oln_type_of(E, value), signed char>,
mlc::eq_<oln_type_of(E, value), unsigned char> > >
{
- // Definition of the super class corresponding to this case
- // (abstract::grey_level_image_ is the conjunction of
- // abstract::grey_level_image and abstract::not_binary_image).
- typedef abstract::internal::grey_level_image_<E> ret;
+ // Definition of the super class corresponding to this case.
+ typedef abstract::grey_level_image<E> ret;
};
@@ -261,10 +131,8 @@
template <typename E>
struct default_case_< image_hierarchy_wrt_type, E >
{
- // Definition of the super class corresponding to this case
- // (abstract::data_image_ is the conjunction of
- // abstract::data_image and abstract::not_binary_image).
- typedef abstract::internal::data_image_<E> ret;
+ // Definition of the super class corresponding to this case.
+ typedef abstract::data_image<E> ret;
};
/// \}
@@ -272,4 +140,4 @@
} // end of namespace oln
-#endif // ! OLENA_CORE_ABSTRACT_IMAGE_TYPE_HH
+#endif // ! OLENA_CORE_ABSTRACT_IMAGE_TYPE_HIERARCHY_HH
Index: oln/core/abstract/image/type/color.hh
===================================================================
--- oln/core/abstract/image/type/color.hh (revision 0)
+++ oln/core/abstract/image/type/color.hh (revision 0)
@@ -0,0 +1,55 @@
+// Copyright (C) 2005, 2006 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLENA_CORE_ABSTRACT_IMAGE_TYPE_COLOR_HH
+# define OLENA_CORE_ABSTRACT_IMAGE_TYPE_COLOR_HH
+
+# include <oln/core/abstract/image.hh>
+
+
+namespace oln
+{
+
+ namespace abstract
+ {
+
+ /// Class of color images.
+ template <typename E>
+ struct color_image : public virtual image<E>
+ {
+ protected:
+ /// Constructor (protected, empty).
+ color_image() {}
+ };
+
+ } // end of namespace oln::abstract
+
+} // end of namespace oln
+
+
+
+#endif // ! OLENA_CORE_ABSTRACT_IMAGE_TYPE_COLOR_HH
Index: oln/core/abstract/image/type/label.hh
===================================================================
--- oln/core/abstract/image/type/label.hh (revision 0)
+++ oln/core/abstract/image/type/label.hh (revision 0)
@@ -0,0 +1,56 @@
+// Copyright (C) 2005, 2006 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLENA_CORE_ABSTRACT_IMAGE_TYPE_LABEL_HH
+# define OLENA_CORE_ABSTRACT_IMAGE_TYPE_LABEL_HH
+
+# include <oln/core/abstract/image.hh>
+
+
+namespace oln
+{
+
+ namespace abstract
+ {
+
+ /// \brief Class of images whose data are labels.
+ ///
+ /// Such images do not support arithmetics.
+ template <typename E>
+ struct label_image : public virtual image<E>
+ {
+ protected:
+ /// Constructor (protected, empty).
+ label_image() {}
+ };
+
+ } // end of namespace oln::abstract
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_ABSTRACT_IMAGE_TYPE_LABEL_HH
Index: oln/core/abstract/image/hierarchies.hh
===================================================================
--- oln/core/abstract/image/hierarchies.hh (revision 0)
+++ oln/core/abstract/image/hierarchies.hh (working copy)
@@ -49,13 +49,13 @@
// Hierarchy 1: topology w.r.t. dimension.
-# include <oln/core/abstract/image_dimension.hh>
+# include <oln/core/abstract/image/dimension/hierarchy.hh>
// Hierarchy 2: topology w.r.t. type of data.
-# include <oln/core/abstract/image_type.hh>
+# include <oln/core/abstract/image/type/hierarchy.hh>
// Hierarchy 3: topology w.r.t. neighborhood.
-# include <oln/core/abstract/image_having_neighborhood.hh>
+# include <oln/core/abstract/image/neighborhood/hierarchy.hh>
#endif // ! OLENA_CORE_ABSTRACT_IMAGE_HIERARCHIES_HH
Index: oln/core/abstract/image/dimension/1d.hh
===================================================================
--- oln/core/abstract/image/dimension/1d.hh (revision 0)
+++ oln/core/abstract/image/dimension/1d.hh (revision 0)
@@ -0,0 +1,55 @@
+// Copyright (C) 2005, 2006 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_1D_HH
+# define OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_1D_HH
+
+# include <oln/core/abstract/image.hh>
+
+namespace oln
+{
+
+ namespace abstract
+ {
+
+ /// Class of 1-D images.
+ template <typename E>
+ struct image1d :
+ public virtual image<E>,
+ public automatic::impl< image1d, oln_type_of(E, morpher), E>
+ {
+ protected:
+ /// Constructor (protected, empty).
+ image1d() {}
+ };
+
+ } // end of namespace oln::abstract
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_1D_HH
Index: oln/core/abstract/image/dimension/2d.hh
===================================================================
--- oln/core/abstract/image/dimension/2d.hh (revision 0)
+++ oln/core/abstract/image/dimension/2d.hh (revision 0)
@@ -0,0 +1,56 @@
+// Copyright (C) 2005, 2006 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_2D_HH
+# define OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_2D_HH
+
+# include <oln/core/abstract/image.hh>
+
+
+namespace oln
+{
+
+ namespace abstract
+ {
+
+ /// Class of 2-D images.
+ template <typename E>
+ struct image2d :
+ public virtual image<E>,
+ public automatic::impl< image2d, oln_type_of(E, morpher), E>
+ {
+ protected:
+ /// Constructor (protected, empty).
+ image2d() {}
+ };
+
+ } // end of namespace oln::abstract
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_2D_HH
Index: oln/core/abstract/image/dimension/3d.hh
===================================================================
--- oln/core/abstract/image/dimension/3d.hh (revision 0)
+++ oln/core/abstract/image/dimension/3d.hh (revision 0)
@@ -0,0 +1,56 @@
+// Copyright (C) 2005, 2006 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_3D_HH
+# define OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_3D_HH
+
+# include <oln/core/abstract/image.hh>
+
+
+namespace oln
+{
+
+ namespace abstract
+ {
+
+ /// Class of 3-D images.
+ template <typename E>
+ struct image3d :
+ public virtual image<E>,
+ public automatic::impl< image3d, oln_type_of(E, morpher), E>
+ {
+ protected:
+ /// Constructor (protected, empty).
+ image3d() {}
+ };
+
+ } // end of namespace oln::abstract
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_3D_HH
Index: oln/core/abstract/image/dimension/hierarchy.hh
===================================================================
--- oln/core/abstract/image/dimension/hierarchy.hh (revision 0)
+++ oln/core/abstract/image/dimension/hierarchy.hh (working copy)
@@ -25,8 +25,8 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_HH
-# define OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_HH
+#ifndef OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_HIERARCHY_HH
+# define OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_HIERARCHY_HH
# include <oln/core/abstract/image.hh>
@@ -73,50 +73,11 @@
| Dimension abstractions. |
`-------------------------*/
-namespace oln
-{
-
- namespace abstract
- {
+# include <oln/core/abstract/image/dimension/1d.hh>
+# include <oln/core/abstract/image/dimension/2d.hh>
+# include <oln/core/abstract/image/dimension/3d.hh>
- /// Class of 1-D images.
- template <typename E>
- struct image1d :
- public virtual image<E>,
- public automatic::impl< image1d, oln_type_of(E, morpher), E>
- {
- protected:
- /// Constructor (protected, empty).
- image1d() {}
- };
- /// Class of 2-D images.
- template <typename E>
- struct image2d :
- public virtual image<E>,
- public automatic::impl< image2d, oln_type_of(E, morpher), E>
- {
- protected:
- /// Constructor (protected, empty).
- image2d() {}
- };
-
- /// Class of 3-D images.
- template <typename E>
- struct image3d :
- public virtual image<E>,
- public automatic::impl< image3d, oln_type_of(E, morpher), E>
- {
- protected:
- /// Constructor (protected, empty).
- image3d() {}
- };
-
- } // end of namespace oln::abstract
-
-} // end of namespace oln
-
-
/*-------------------.
| Dimension switch. |
`-------------------*/
@@ -156,4 +117,4 @@
}
-#endif // ! OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_HH
+#endif // ! OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_HIERARCHY_HH
Index: oln/core/abstract/image/neighborhood/hierarchy.hh
===================================================================
--- oln/core/abstract/image/neighborhood/hierarchy.hh (revision 0)
+++ oln/core/abstract/image/neighborhood/hierarchy.hh (working copy)
@@ -25,8 +25,8 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef OLENA_CORE_ABSTRACT_IMAGE_HAVING_NEIGHBORHOOD_HH
-# define OLENA_CORE_ABSTRACT_IMAGE_HAVING_NEIGHBORHOOD_HH
+#ifndef OLENA_CORE_ABSTRACT_IMAGE_NEIGHBORHOOD_HIERARCHY_HH
+# define OLENA_CORE_ABSTRACT_IMAGE_NEIGHBORHOOD_HIERARCHY_HH
# include <oln/core/abstract/image.hh>
@@ -95,4 +95,4 @@
} // end of namespace oln
-#endif // ! OLENA_CORE_ABSTRACT_IMAGE_HAVING_NEIGHBORHOOD_HH
+#endif // ! OLENA_CORE_ABSTRACT_IMAGE_NEIGHBORHOOD_HIERARCHY_HH
Index: oln/core/abstract/image_dimension.hh
===================================================================
--- oln/core/abstract/image_dimension.hh (revision 569)
+++ oln/core/abstract/image_dimension.hh (working copy)
@@ -1,159 +0,0 @@
-// Copyright (C) 2005, 2006 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, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-#ifndef OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_HH
-# define OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_HH
-
-# include <oln/core/abstract/image.hh>
-
-
-/* Image dimension hierarchy (summary).
-
-
- /image<I>/
- ^
- |
- ,------------------------+------------------------.
- | | |
- /image1d<I>/ /image2d<I>/ /image3d<I>/
- ^ ^ ^
- | | |
- ,---------------------. ,---------------------. ,---------------------.
- | if type_of(I, grid) | | if type_of(I, grid) | | if type_of(I, grid) |
- | == grid1d | | == grid2d | | == grid3d |
- `---------------------' `---------------------' `---------------------'
- | | |
- o o o
-
- o
- |
- /switch_<image_hierarchy_wrt_dimension, I>::ret/
- (image dimension selector)
- ^
- |
- /entry<abstract::image, I>/
- ^
- |
- image_entry<I>
- ^
- |
- I
- (a concrete image)
-
-
- Default case: If no known grid type is returned by `oln_type_of(I, grid)',
- the entry is directly plugged to abstract::image<I>. */
-
-
-/*-------------------------.
-| Dimension abstractions. |
-`-------------------------*/
-
-namespace oln
-{
-
- namespace abstract
- {
-
- /// Class of 1-D images.
- template <typename E>
- struct image1d :
- public virtual image<E>,
- public automatic::impl< image1d, oln_type_of(E, morpher), E>
- {
- protected:
- /// Constructor (protected, empty).
- image1d() {}
- };
-
- /// Class of 2-D images.
- template <typename E>
- struct image2d :
- public virtual image<E>,
- public automatic::impl< image2d, oln_type_of(E, morpher), E>
- {
- protected:
- /// Constructor (protected, empty).
- image2d() {}
- };
-
- /// Class of 3-D images.
- template <typename E>
- struct image3d :
- public virtual image<E>,
- public automatic::impl< image3d, oln_type_of(E, morpher), E>
- {
- protected:
- /// Constructor (protected, empty).
- image3d() {}
- };
-
- } // end of namespace oln::abstract
-
-} // end of namespace oln
-
-
-/*-------------------.
-| Dimension switch. |
-`-------------------*/
-
-namespace oln
-{
-
- // Forward declarations.
- class grid1d;
- class grid2d;
- class grid3d;
-
- /// 1-D case.
- template <typename E>
- struct case_< image_hierarchy_wrt_dimension, E, 1 > :
- where_< mlc::eq_< oln_type_of(E, grid), oln::grid1d > >
- {
- typedef abstract::image1d<E> ret;
- };
-
- /// 2-D case.
- template <typename E>
- struct case_< image_hierarchy_wrt_dimension, E, 2 > :
- where_< mlc::eq_< oln_type_of(E, grid), oln::grid2d > >
- {
- typedef abstract::image2d<E> ret;
- };
-
- /// 3-D case.
- template <typename E>
- struct case_< image_hierarchy_wrt_dimension, E, 3 > :
- where_< mlc::eq_< oln_type_of(E, grid), oln::grid3d > >
- {
- typedef abstract::image3d<E> ret;
- };
-
-}
-
-
-#endif // ! OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_HH
Index: oln/core/abstract/image_hierarchies.hh
===================================================================
--- oln/core/abstract/image_hierarchies.hh (revision 569)
+++ oln/core/abstract/image_hierarchies.hh (working copy)
@@ -1,61 +0,0 @@
-// Copyright (C) 2006 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, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-#ifndef OLENA_CORE_ABSTRACT_IMAGE_HIERARCHIES_HH
-# define OLENA_CORE_ABSTRACT_IMAGE_HIERARCHIES_HH
-
-# include <oln/core/abstract/image.hh>
-
-
-namespace oln
-{
-
- typedef hierarchy<abstract::image, 1> image_hierarchy_wrt_dimension;
- typedef hierarchy<abstract::image, 2> image_hierarchy_wrt_type;
- typedef hierarchy<abstract::image, 3> image_hierarchy_wrt_neighborhood;
-
- // FIXME: To be continued.
-#if 0
- typedef hierarchy<abstract::image, 4> image_hierarchy_wrt_value;
- typedef hierarchy<abstract::image, 5> image_hierarchy_wrt_data_retrieval;
- // ...
-#endif
-
-} // end of namespace oln
-
-
-// Hierarchy 1: topology w.r.t. dimension.
-# include <oln/core/abstract/image_dimension.hh>
-
-// Hierarchy 2: topology w.r.t. type of data.
-# include <oln/core/abstract/image_type.hh>
-
-// Hierarchy 3: topology w.r.t. neighborhood.
-# include <oln/core/abstract/image_having_neighborhood.hh>
-
-
-#endif // ! OLENA_CORE_ABSTRACT_IMAGE_HIERARCHIES_HH
Index: oln/core/abstract/image_type_integre.hh
===================================================================
--- oln/core/abstract/image_type_integre.hh (revision 569)
+++ oln/core/abstract/image_type_integre.hh (working copy)
@@ -1,145 +0,0 @@
-// Copyright (C) 2006 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, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-
-// FIXME: Move this file into Integre? Or in a another project,
-// serving as a glue between Integre and Olena?
-
-#ifndef OLENA_CORE_ABSTRACT_IMAGE_TYPE_INTEGRE_HH
-# define OLENA_CORE_ABSTRACT_IMAGE_TYPE_INTEGRE_HH
-
-# include <oln/core/abstract/image_type.hh>
-
-
-// Forward declarations.
-/* FIXME: These are Integre values; should'nt we let Integre add the
- necessary cases itself? */
-namespace ntg
-{
- class bin;
- template <unsigned nbits, typename behavior> class int_u;
- template <unsigned nbits, typename behavior> class int_s;
- template <typename E> class color_value;
- template <typename E> class enum_value;
- template <typename E> class real_value;
-
- /** \brief ``eq'' operator dedicated to ntg::int_u<nbits, behavior>
and
- ntg::int_s<nbits, behavior>, with nbits a known unsigned (e.g.,
- int_u<1, behavior>).
-
- Checking whether value_type is a ntg::int_u<1, behavior>
- (behavior being a template parameter) is a bit tricky: we
- can't use mlc_eq() since ntg::int_u<1, B> is not a (complete)
- type, nor mlc_is_a(), since it is a partially-valued template.
- Hence this dedicated approach, used for ntg::int_u and
- ntg::int_s.
-
- (Olena proto-1.0 used to mimic mlc_is_a with its own
- machinery, for all kind of value type, which is redundant with
- mlc_is_a).
- \{ */
- template< template <unsigned, class> class T, unsigned nbits, typename U
>
- struct eq_ : public mlc::bexpr_<false>
- {
- };
-
- template< template <unsigned, class> class T, unsigned nbits,
- typename behavior >
- struct eq_< T, nbits, T<nbits, behavior> > : public
mlc::bexpr_<true>
- {
- };
- /** \} */
-
-} // end of namespace ntg
-
-
-/*----------------------.
-| Type switch (cont.). |
-`----------------------*/
-
-namespace oln {
-
-
- /// Switch on on the value type.
- /// \{
-
- // ----------------------------------------------- //
- // Cases where the value type is an Integre type. //
- // ----------------------------------------------- //
-
- // (The first cases are located in oln/core/abstract/image_type.hh).
-
-
- /// Binary case.
- template <typename E>
- struct case_< image_hierarchy_wrt_type, E, 3 > :
- where_< mlc::or_list_< mlc::eq_<oln_type_of(E, value), ntg::bin>,
- ntg::eq_<ntg::int_u, 1, oln_type_of(E, value)>,
- ntg::eq_<ntg::int_s, 1, oln_type_of(E, value)> > >
- {
- // Definition of the super class corresponding to this case.
- typedef abstract::binary_image<E> ret;
- };
-
- /// Grey-level case.
- template <typename E>
- struct case_< image_hierarchy_wrt_type, E, 4 > :
- where_< mlc_is_a( mlc_comma_1(oln_type_of(E, value)), ntg::real_value ) >
- {
- // Definition of the super class corresponding to this case
- // (abstract::grey_level_image_ is the conjunction of
- // abstract::grey_level_image and abstract::not_binary_image).
- typedef abstract::internal::grey_level_image_<E> ret;
- };
-
- /// Label case.
- template <typename E>
- struct case_< image_hierarchy_wrt_type, E, 5 > :
- where_< mlc_is_a( mlc_comma_1(oln_type_of(E, value)), ntg::enum_value ) >
- {
- // Definition of the super class corresponding to this case
- // (abstract::label_image_ is the conjunction of
- // abstract::label_image and abstract::not_binary_image).
- typedef abstract::internal::label_image_<E> ret;
- };
-
- /// Color case.
- template <typename E>
- struct case_< image_hierarchy_wrt_type, E, 6 > :
- where_< mlc_is_a( mlc_comma_1(oln_type_of(E, value)), ntg::color_value ) >
- {
- // Definition of the super class corresponding to this case
- // (abstract::color_image_ is the conjunction of
- // abstract::color_image and abstract::not_binary_image).
- typedef abstract::internal::color_image_<E> ret;
- };
-
- /// \}
-
-} // end of namespace oln
-
-#endif // ! OLENA_CORE_ABSTRACT_IMAGE_TYPE_INTEGRE_HH
Index: oln/core/abstract/image_having_neighborhood.hh
===================================================================
--- oln/core/abstract/image_having_neighborhood.hh (revision 569)
+++ oln/core/abstract/image_having_neighborhood.hh (working copy)
@@ -1,98 +0,0 @@
-// Copyright (C) 2006 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, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-#ifndef OLENA_CORE_ABSTRACT_IMAGE_HAVING_NEIGHBORHOOD_HH
-# define OLENA_CORE_ABSTRACT_IMAGE_HAVING_NEIGHBORHOOD_HH
-
-# include <oln/core/abstract/image.hh>
-
-// Automatically-inherited implementations.
-# include <oln/automatic/image_having_neighborhood.hh>
-
-
-/* Image having neighborhood hierarchy (summary).
-
-
-FIXME: TODO!
-
-
- Default case: If the neighborhood type returned by
- `oln_type_of(I, neighborhood)', the entry is directly plugged to
- abstract::image<I>. */
-
-
-namespace oln
-{
-
- /*-------------------------.
- | Dimension abstractions. |
- `-------------------------*/
-
- namespace abstract
- {
-
- /// Image having a neighborhood.
- template <typename E>
- struct image_having_neighborhood :
- public virtual image<E>,
- public automatic::impl< image_having_neighborhood,
- oln_type_of(E, morpher),
- E >
- {
- private:
- typedef oln_type_of(E, neighborhood) neighborhood_t;
-
- public:
- neighborhood_t neighborhood() const
- {
- return this->topo().neighborhood();
- }
-
- protected:
- /// Constructor (protected, empty).
- image_having_neighborhood() {}
- };
-
- } // end of namespace oln::abstract
-
-
- /*-------------------.
- | Dimension switch. |
- `-------------------*/
-
- /// With neighborhood.
- template <typename E>
- struct case_< image_hierarchy_wrt_neighborhood, E, 1 > :
- where_< mlc::neq_< oln_type_of(E, neighborhood), mlc::not_found > >
- {
- typedef abstract::image_having_neighborhood<E> ret;
- };
-
-} // end of namespace oln
-
-
-#endif // ! OLENA_CORE_ABSTRACT_IMAGE_HAVING_NEIGHBORHOOD_HH
Index: oln/Makefile.am
===================================================================
--- oln/Makefile.am (revision 569)
+++ oln/Makefile.am (working copy)
@@ -30,11 +30,19 @@
core/abstract/entry.hh \
core/abstract/grid.hh \
core/abstract/image.hh \
- core/abstract/image_dimension.hh \
- core/abstract/image_having_neighborhood.hh \
- core/abstract/image_hierarchies.hh \
- core/abstract/image_type.hh \
- core/abstract/image_type_integre.hh \
+ core/abstract/image/dimension/1d.hh \
+ core/abstract/image/dimension/2d.hh \
+ core/abstract/image/dimension/3d.hh \
+ core/abstract/image/dimension/hierarchy.hh \
+ core/abstract/image/hierarchies.hh \
+ core/abstract/image/neighborhood/hierarchy.hh \
+ core/abstract/image/type/binary.hh \
+ core/abstract/image/type/color.hh \
+ core/abstract/image/type/data.hh \
+ core/abstract/image/type/grey_level.hh \
+ core/abstract/image/type/hierarchy.hh \
+ core/abstract/image/type/integre.hh \
+ core/abstract/image/type/label.hh \
core/abstract/iterator.hh \
core/abstract/iterator_on_points.hh \
core/abstract/neighborhood.hh \