Commit 754f9cde authored by Thierry Geraud's avatar Thierry Geraud
Browse files

2006-09-26 Thierry GERAUD <theo@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.



git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@570 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent c74503a1
2006-09-26 Thierry GERAUD <theo@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.
2006-09-26 Roland Levillain <roland@lrde.epita.fr>
Have all classes of oln::automatic inherit from stc::any__simple.
......
......@@ -30,11 +30,19 @@ nobase_oln_HEADERS = \
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 \
......
......@@ -160,7 +160,7 @@ namespace oln
} // end of namespace oln
# include <oln/core/abstract/image_hierarchies.hh>
# include <oln/core/abstract/image/hierarchies.hh>
#endif // ! OLENA_CORE_ABSTRACT_IMAGE_HH
// 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
// 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
// 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
......@@ -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,48 +73,9 @@
| 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
# include <oln/core/abstract/image/dimension/1d.hh>
# include <oln/core/abstract/image/dimension/2d.hh>
# include <oln/core/abstract/image/dimension/3d.hh>
/*-------------------.
......@@ -156,4 +117,4 @@ namespace oln
}
#endif // ! OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_HH
#endif // ! OLENA_CORE_ABSTRACT_IMAGE_DIMENSION_HIERARCHY_HH
......@@ -49,13 +49,13 @@ namespace oln
// 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
......@@ -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 @@ namespace oln
} // end of namespace oln
#endif // ! OLENA_CORE_ABSTRACT_IMAGE_HAVING_NEIGHBORHOOD_HH
#endif // ! OLENA_CORE_ABSTRACT_IMAGE_NEIGHBORHOOD_HIERARCHY_HH
// 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
// 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
// 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
// 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
......@@ -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,148 +72,20 @@
the entry is plugged to abstract::data_image<I>. */
/*--------------------.
| Type abstractions. |
`--------------------*/
namespace oln
{
namespace abstract
{