$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
graph_elt_mixed_window.hh
1 // Copyright (C) 2009, 2011 EPITA Research and Development Laboratory
2 // (LRDE)
3 //
4 // This file is part of Olena.
5 //
6 // Olena is free software: you can redistribute it and/or modify it under
7 // the terms of the GNU General Public License as published by the Free
8 // Software Foundation, version 2 of the License.
9 //
10 // Olena is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with Olena. If not, see <http://www.gnu.org/licenses/>.
17 //
18 // As a special exception, you may use this file as part of a free
19 // software project without restriction. Specifically, if other files
20 // instantiate templates or use macros or inline functions from this
21 // file, or you compile this file and link it with other files to produce
22 // an executable, this file does not by itself cause the resulting
23 // executable to be covered by the GNU General Public License. This
24 // exception does not however invalidate any other reasons why the
25 // executable file might be covered by the GNU General Public License.
26 
27 #ifndef MLN_CORE_IMAGE_GRAPH_ELT_MIXED_WINDOW_HH
28 # define MLN_CORE_IMAGE_GRAPH_ELT_MIXED_WINDOW_HH
29 
34 
35 # include <mln/core/concept/window.hh>
36 # include <mln/core/internal/neighborhood_base.hh>
37 # include <mln/core/internal/graph_window_base.hh>
38 # include <mln/core/image/graph_window_piter.hh>
39 
40 
41 namespace mln
42 {
43 
45  template <typename G, typename S, typename S2> class graph_elt_mixed_window;
46  template <typename G, typename F> class p_edges;
47  template <typename G, typename F> class p_vertices;
48  namespace util
49  {
50  template <typename G> class edge;
51  template <typename G> class vertex;
52  };
53 
54 
55  namespace internal
56  {
57 
58  template <typename G, typename S, typename S2, typename E>
60  : public neighborhood_extra_impl<graph_elt_mixed_window<G,S,S2>,E>
61  {
62  };
63 
64 
72  //
73  template <typename G, typename S, typename S2>
75 
76  template <typename G, typename F, typename F2>
78  {
79  typedef mln_vertex_nbh_edge_fwd_iter(G) nbh_fwd_iter_;
80  typedef mln_vertex_nbh_edge_bkd_iter(G) nbh_bkd_iter_;
81 
83  };
84 
85 
86  } // end of namespace mln::internal
87 
88 
89  namespace trait
90  {
91 
92  template <typename G, typename S, typename S2>
93  struct window_< mln::graph_elt_mixed_window<G,S,S2> >
94  {
95  typedef trait::window::size::unknown size;
96  typedef trait::window::support::irregular support;
97  typedef trait::window::definition::varying definition;
98  };
99 
100  } // end of namespace mln::trait
101 
102 
108  //
109  template <typename G, typename S, typename S2>
111  : public graph_window_base<mln_result(S2::fun_t),
112  graph_elt_mixed_window<G,S,S2> >,
113  public internal::graph_mixed_window_iter_dispatch<G,S,S2>
114  {
116  typedef internal::graph_mixed_window_iter_dispatch<G,S,S2> super_;
117 
118  typedef typename super_::nbh_fwd_iter_ nbh_fwd_iter_;
119  typedef typename super_::nbh_bkd_iter_ nbh_bkd_iter_;
120 
121  public:
124  typedef typename super_::target target;
126  typedef mln_psite(target) psite;
127 
129  typedef mln_psite(S) center_t;
130 
132  typedef mln_graph_element(target) graph_element;
133 
136  typedef graph_window_piter<target,self_,nbh_fwd_iter_> fwd_qiter;
137 
140  typedef graph_window_piter<target,self_,nbh_bkd_iter_> bkd_qiter;
141 
143  typedef fwd_qiter qiter;
145 
146  };
147 
148 } // end of namespace mln
149 
150 
151 #endif // ! MLN_CORE_IMAGE_GRAPH_ELT_MIXED_WINDOW_HH