* milena/mln/core/alias/neighb3d.hh,
* milena/mln/win/sline3d.hh: New.
---
milena/ChangeLog | 7 +++++
milena/mln/core/alias/neighb3d.hh | 42 +++++++++++++++++++++++++++++
milena/mln/win/{vline2d.hh => sline3d.hh} | 36 ++++++++++++++++---------
3 files changed, 72 insertions(+), 13 deletions(-)
copy milena/mln/win/{vline2d.hh => sline3d.hh} (71%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 83cfdd7..8d21753 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,12 @@
2010-02-16 Guillaume Lazzara <z(a)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(a)lrde.epita.fr>
+
Add a new rgb32 type for Qt compatibility.
* milena/mln/convert/from_to.hxx: Declare conversion routines.
diff --git a/milena/mln/core/alias/neighb3d.hh b/milena/mln/core/alias/neighb3d.hh
index a50798e..a5dead7 100644
--- a/milena/mln/core/alias/neighb3d.hh
+++ b/milena/mln/core/alias/neighb3d.hh
@@ -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
@@ -196,6 +223,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()
{
static neighb3d it;
diff --git a/milena/mln/win/vline2d.hh b/milena/mln/win/sline3d.hh
similarity index 71%
copy from milena/mln/win/vline2d.hh
copy to milena/mln/win/sline3d.hh
index c971b2b..2d7731f 100644
--- a/milena/mln/win/vline2d.hh
+++ b/milena/mln/win/sline3d.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -23,12 +23,13 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
-#ifndef MLN_WIN_VLINE2D_HH
-# define MLN_WIN_VLINE2D_HH
+#ifndef MLN_WIN_SLINE3D_HH
+# define MLN_WIN_SLINE3D_HH
/// \file
///
-/// Definition of the mln::win::vline2d window.
+/// Definition of the mln::win::sline3d window.
+
# include <mln/win/line.hh>
# include <mln/core/grids.hh>
@@ -40,22 +41,31 @@ namespace mln
namespace win
{
- /*! \brief Vertical line window defined on the 2D square grid.
+ /*! \brief Depth line window defined on the 3D cubic grid.
- An vline2d is centered and symmetric; so its width is 1 and
- its height (length) is odd.
+ 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
+ . . .
+ . o .
+ . . .
+
+ . . .
+ . x .
+ . . .
+
+ . . .
+ . o .
+ . . .
+
\endverbatim
is defined with length = 3.
- \ingroup modwin2d
+ \ingroup modwin3d
*/
- typedef line<grid::square, 0, def::coord> vline2d;
+ typedef line<grid::cube, 0, def::coord> sline3d;
} // end of namespace mln::win
@@ -63,4 +73,4 @@ namespace mln
-#endif // ! MLN_WIN_VLINE2D_HH
+#endif // ! MLN_WIN_SLINE3D_HH
--
1.5.6.5
Show replies by date