• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List

complex_windows.hh

00001 // Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
00002 //
00003 // This file is part of Olena.
00004 //
00005 // Olena is free software: you can redistribute it and/or modify it under
00006 // the terms of the GNU General Public License as published by the Free
00007 // Software Foundation, version 2 of the License.
00008 //
00009 // Olena is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with Olena.  If not, see <http://www.gnu.org/licenses/>.
00016 //
00017 // As a special exception, you may use this file as part of a free
00018 // software project without restriction.  Specifically, if other files
00019 // instantiate templates or use macros or inline functions from this
00020 // file, or you compile this file and link it with other files to produce
00021 // an executable, this file does not by itself cause the resulting
00022 // executable to be covered by the GNU General Public License.  This
00023 // exception does not however invalidate any other reasons why the
00024 // executable file might be covered by the GNU General Public License.
00025 
00026 #ifndef MLN_CORE_IMAGE_COMPLEX_WINDOWS_HH
00027 # define MLN_CORE_IMAGE_COMPLEX_WINDOWS_HH
00028 
00031 
00032 # include <mln/core/internal/complex_window_base.hh>
00033 # include <mln/core/internal/complex_window_p_base.hh>
00034 
00035 # include <mln/topo/complex_iterators.hh>
00036 
00037 
00051 # define mln_gen_complex_window_with_base(Win, Fwd_Complex_Iter, Bkd_Complex_Iter, Base) \
00052   /* Forward declaration.  */                                           \
00053   template <unsigned D, typename G> struct Win;                         \
00054                                                                         \
00055   /* Traits.  */                                                        \
00056   namespace trait                                                       \
00057   {                                                                     \
00058     template <unsigned D, typename G>                                   \
00059     struct window_< Win <D, G> >                                        \
00060       : window_< Base < D, G,                                           \
00061                         Fwd_Complex_Iter<D>,                            \
00062                         Bkd_Complex_Iter <D>,                           \
00063                         Win <D, G> > >                                  \
00064     {                                                                   \
00065     };                                                                  \
00066   }                                                                     \
00067                                                                         \
00068   /* Definition.  */                                                    \
00069   template <unsigned D, typename G>                                     \
00070   struct Win                                                            \
00071     : Base < D, G,                                                      \
00072              Fwd_Complex_Iter <D>,                                      \
00073              Bkd_Complex_Iter <D>,                                      \
00074              Win <D, G> >                                               \
00075   {                                                                     \
00076   }
00077 
00078 
00094 # define mln_gen_complex_window(Win, Fwd_Complex_Iter, Bkd_Complex_Iter) \
00095     mln_gen_complex_window_with_base(Win,                               \
00096                                      Fwd_Complex_Iter,                  \
00097                                      Bkd_Complex_Iter,                  \
00098                                      mln::internal::complex_window_base)
00099 
00100 
00115 # define mln_gen_complex_window_p(Win, Fwd_Complex_Iter, Bkd_Complex_Iter) \
00116     mln_gen_complex_window_with_base(Win,                               \
00117                                      Fwd_Complex_Iter,                  \
00118                                      Bkd_Complex_Iter,                  \
00119                                      mln::internal::complex_window_p_base)
00120 
00121 
00122 
00123 namespace mln
00124 {
00125 
00126   /*-----------------------.
00127   | Non-centered windows.  |
00128   `-----------------------*/
00129 
00132   mln_gen_complex_window(complex_lower_window,
00133                          topo::adj_lower_face_fwd_iter,
00134                          topo::adj_lower_face_bkd_iter);
00135 
00138   mln_gen_complex_window(complex_higher_window,
00139                          topo::adj_higher_face_fwd_iter,
00140                          topo::adj_higher_face_bkd_iter);
00141 
00144   mln_gen_complex_window(complex_lower_higher_window,
00145                          topo::adj_lower_higher_face_fwd_iter,
00146                          topo::adj_lower_higher_face_bkd_iter);
00147 
00150   mln_gen_complex_window(complex_lower_dim_connected_n_face_window,
00151                          topo::adj_lower_dim_connected_n_face_fwd_iter,
00152                          topo::adj_lower_dim_connected_n_face_bkd_iter);
00153 
00156   mln_gen_complex_window(complex_higher_dim_connected_n_face_window,
00157                          topo::adj_higher_dim_connected_n_face_fwd_iter,
00158                          topo::adj_higher_dim_connected_n_face_bkd_iter);
00159 
00162   mln_gen_complex_window(complex_m_face_window,
00163                          topo::adj_m_face_fwd_iter,
00164                          topo::adj_m_face_bkd_iter);
00165 
00166 
00167   /*-------------------.
00168   | Centered windows.  |
00169   `-------------------*/
00170 
00173   mln_gen_complex_window_p(complex_lower_window_p,
00174                            topo::adj_lower_face_fwd_iter,
00175                            topo::adj_lower_face_bkd_iter);
00176 
00179   mln_gen_complex_window_p(complex_higher_window_p,
00180                            topo::adj_higher_face_fwd_iter,
00181                            topo::adj_higher_face_bkd_iter);
00182 
00186   mln_gen_complex_window_p(complex_lower_higher_window_p,
00187                            topo::adj_lower_higher_face_fwd_iter,
00188                            topo::adj_lower_higher_face_bkd_iter);
00189 
00193   mln_gen_complex_window_p(complex_lower_dim_connected_n_face_window_p,
00194                            topo::adj_lower_dim_connected_n_face_fwd_iter,
00195                            topo::adj_lower_dim_connected_n_face_bkd_iter);
00196 
00200   mln_gen_complex_window_p(complex_higher_dim_connected_n_face_window_p,
00201                            topo::adj_higher_dim_connected_n_face_fwd_iter,
00202                            topo::adj_higher_dim_connected_n_face_bkd_iter);
00203 
00207   mln_gen_complex_window_p(complex_m_face_window_p,
00208                            topo::adj_m_face_fwd_iter,
00209                            topo::adj_m_face_bkd_iter);
00210 
00211 } // end of namespace mln
00212 
00213 # undef mln_gen_complex_window_p
00214 # undef mln_gen_complex_window
00215 # undef mln_gen_complex_window_from_base
00216 
00217 #endif // ! MLN_CORE_IMAGE_COMPLEX_WINDOWS_HH

Generated on Tue Oct 4 2011 15:23:38 for Milena (Olena) by  doxygen 1.7.1