[PATCH 06/22] Add non-centered complex windows.

* mln/core/image/complex_windows.hh (mln_gen_complex_window): New (generator) macro. (complex_lower_window) (complex_higher_window) (complex_lower_higher_window) (complex_lower_dim_connected_n_face_window) (complex_higher_dim_connected_n_face_window) (complex_m_face_window): New classes. --- milena/ChangeLog | 14 ++++++ milena/mln/core/image/complex_windows.hh | 69 ++++++++++++++++++++++++++++- 2 files changed, 80 insertions(+), 3 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 2da5700..3daaaa6 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,19 @@ 2009-09-25 Roland Levillain <roland@lrde.epita.fr> + Add non-centered complex windows. + + * mln/core/image/complex_windows.hh (mln_gen_complex_window): + New (generator) macro. + (complex_lower_window) + (complex_higher_window) + (complex_lower_higher_window) + (complex_lower_dim_connected_n_face_window) + (complex_higher_dim_connected_n_face_window) + (complex_m_face_window): + New classes. + +2009-09-25 Roland Levillain <roland@lrde.epita.fr> + Prepare the factoring of complex windows generators. * mln/core/image/complex_windows.hh diff --git a/milena/mln/core/image/complex_windows.hh b/milena/mln/core/image/complex_windows.hh index c2c21fb..b409282 100644 --- a/milena/mln/core/image/complex_windows.hh +++ b/milena/mln/core/image/complex_windows.hh @@ -29,11 +29,10 @@ /// \file /// \brief Definitions of some windows of complex images. +# include <mln/core/internal/complex_window_base.hh> # include <mln/core/internal/complex_window_p_base.hh> -# include <mln/topo/adj_lower_face_iter.hh> -# include <mln/topo/adj_higher_face_iter.hh> -# include <mln/topo/adj_lower_higher_face_iter.hh> +# include <mln/topo/complex_iterators.hh> /** \brief Generate a complex window class, as well as its traits, @@ -77,6 +76,28 @@ } +/** \brief Generate a (non-centered) complex window class, as well as + its traits. + + \param Win The name of the class to generate. + \param Fwd_Complex_Iter The underlying forward iterator type. + \param Bkd_Complex_Iter The underlying backward iterator type. + + The generated class inherits from + + mln::internal::complex_window_base< D, G, + Fwd_Complex_Iter<D>, + Bkd_Complex_Iter<D>, + Win <D, G> > + + where D and G are template parameters of the generated Win class. */ +# define mln_gen_complex_window(Win, Fwd_Complex_Iter, Bkd_Complex_Iter) \ + mln_gen_complex_window_with_base(Win, \ + Fwd_Complex_Iter, \ + Bkd_Complex_Iter, \ + mln::internal::complex_window_base) + + /** \brief Generate a centered complex window class, as well as its traits. \param Win The name of the class to generate. @@ -102,6 +123,47 @@ namespace mln { + /*-----------------------. + | Non-centered windows. | + `-----------------------*/ + + /// \brief Window centered on an n-face of complex returning its + /// adjacent (n-1)-faces. + mln_gen_complex_window(complex_lower_window, + topo::adj_lower_face_fwd_iter, + topo::adj_lower_face_bkd_iter); + + /// \brief Window centered on an n-face of complex returning its + /// adjacent (n+1)-faces. + mln_gen_complex_window(complex_higher_window, + topo::adj_higher_face_fwd_iter, + topo::adj_higher_face_bkd_iter); + + /// \brief Window centered on an n-face of complex returning its + /// adjacent (n-1)-faces and (n+1)-faces. + mln_gen_complex_window(complex_lower_higher_window, + topo::adj_lower_higher_face_fwd_iter, + topo::adj_lower_higher_face_bkd_iter); + + /// \brief Window centered on an n-face of complex returning the + /// n-faces sharing an (n-1)-face with the center n-face. + mln_gen_complex_window(complex_lower_dim_connected_n_face_window, + topo::adj_lower_dim_connected_n_face_fwd_iter, + topo::adj_lower_dim_connected_n_face_bkd_iter); + + /// \brief Window centered on an n-face of complex returning the + /// n-faces sharing an (n+1)-face with the center n-face. + mln_gen_complex_window(complex_higher_dim_connected_n_face_window, + topo::adj_higher_dim_connected_n_face_fwd_iter, + topo::adj_higher_dim_connected_n_face_bkd_iter); + + /// \brief Window centered on an n-face of complex returning + /// the m-faces transitively adjacent to this center n-face. + mln_gen_complex_window(complex_m_face_window, + topo::adj_m_face_fwd_iter, + topo::adj_m_face_bkd_iter); + + /*-------------------. | Centered windows. | `-------------------*/ @@ -149,6 +211,7 @@ namespace mln } // end of namespace mln # undef mln_gen_complex_window_p +# undef mln_gen_complex_window # undef mln_gen_complex_window_from_base #endif // ! MLN_CORE_IMAGE_COMPLEX_WINDOWS_HH -- 1.6.3.1
participants (1)
-
Roland Levillain