Commit a7dd8e81 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Add new 3D neighborhoods and windows.

	* milena/mln/core/alias/neighb3d.hh,
	* milena/mln/win/sline3d.hh: New.
parent 0a2727d0
2010-02-16 Guillaume Lazzara <z@lrde.epita.fr>
Add new 3D neighborhoods and windows.
* milena/mln/core/alias/neighb3d.hh,
* milena/mln/win/sline3d.hh: New.
2010-02-16 Guillaume Lazzara <z@lrde.epita.fr>
 
Add a new rgb32 type for Qt compatibility.
......@@ -49,6 +49,33 @@ namespace mln
//
typedef neighb<window3d> neighb3d;
/// \brief depth 2-connectivity neighborhood on the 3D grid.
/*!
\verbatim
. . .
. o .
. . .
. . .
. x .
. . .
. . .
. o .
. . .
\endverbatim
\return A neighb3d.
\ingroup modneighb3d
*/
const neighb3d& c2_3d_sli();
/// \brief 4-connectivity neighborhood on the 3D grid.
/*!
\verbatim
......@@ -195,6 +222,21 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
inline
const neighb3d& c2_3d_sli()
{
static neighb3d it;
if (it.size() == 0)
{
window3d& win = it.hook_win_();
win
.insert(-1, 0, 0)
.insert(1, 0, 0);
}
return it;
}
inline
const neighb3d& c4_3d()
{
......
// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
// Olena is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation, version 2 of the License.
//
// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, you may use this file as part of a free
// software project 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 MLN_WIN_SLINE3D_HH
# define MLN_WIN_SLINE3D_HH
/// \file
///
/// Definition of the mln::win::sline3d window.
# include <mln/win/line.hh>
# include <mln/core/grids.hh>
namespace mln
{
namespace win
{
/*! \brief Depth line window defined on the 3D cubic grid.
An sline3d is centered and symmetric; so its height and its
width are 1 and its depth is odd.
For instance:
\verbatim
. . .
. o .
. . .
. . .
. x .
. . .
. . .
. o .
. . .
\endverbatim
is defined with length = 3.
\ingroup modwin3d
*/
typedef line<grid::cube, 0, def::coord> sline3d;
} // end of namespace mln::win
} // end of namespace mln
#endif // ! MLN_WIN_SLINE3D_HH
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment