Milena (Olena)  User documentation 2.0a Id
 All Classes Namespaces Functions Variables Typedefs Enumerator Groups Pages
adjust_fill.hh
1 // Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
2 //
3 // This file is part of Olena.
4 //
5 // Olena is free software: you can redistribute it and/or modify it under
6 // the terms of the GNU General Public License as published by the Free
7 // Software Foundation, version 2 of the License.
8 //
9 // Olena is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with Olena. If not, see <http://www.gnu.org/licenses/>.
16 //
17 // As a special exception, you may use this file as part of a free
18 // software project without restriction. Specifically, if other files
19 // instantiate templates or use macros or inline functions from this
20 // file, or you compile this file and link it with other files to produce
21 // an executable, this file does not by itself cause the resulting
22 // executable to be covered by the GNU General Public License. This
23 // exception does not however invalidate any other reasons why the
24 // executable file might be covered by the GNU General Public License.
25 
26 #ifndef MLN_EXTENSION_ADJUST_FILL_HH
27 # define MLN_EXTENSION_ADJUST_FILL_HH
28 
34 
35 # include <mln/extension/adjust.hh>
36 # include <mln/extension/fill.hh>
37 
38 
39 namespace mln
40 {
41 
42  namespace extension
43  {
44 
46  template <typename I, typename W>
47  void adjust_fill(const Image<I>& ima,
48  const Window<W>& win,
49  const mln_value(I)& val);
50 
51  template <typename I, typename W>
52  void adjust_fill(const Image<I>& ima,
53  const Weighted_Window<W>& wwin,
54  const mln_value(I)& val);
55 
56  template <typename I, typename N>
57  void adjust_fill(const Image<I>& ima,
58  const Neighborhood<N>& nbh,
59  const mln_value(I)& val);
60 
61  template <typename I>
62  void adjust_fill(const Image<I>& ima,
63  unsigned delta,
64  const mln_value(I)& val);
65 
66 
67 # ifndef MLN_INCLUDE_ONLY
68 
69  // Facades.
70 
71  template <typename I, typename W>
72  void adjust_fill(const Image<I>& ima,
73  const Window<W>& win,
74  const mln_value(I)& val)
75  {
76  trace::entering("extension::adjust_fill");
77  extension::adjust(ima, win);
78  extension::fill(ima, val);
79  trace::exiting("extension::adjust_fill");
80  }
81 
82  template <typename I, typename W>
83  void adjust_fill(const Image<I>& ima,
84  const Weighted_Window<W>& wwin,
85  const mln_value(I)& val)
86  {
87  trace::entering("extension::adjust_fill");
88  extension::adjust(ima, wwin);
89  extension::fill(ima, val);
90  trace::exiting("extension::adjust_fill");
91  }
92 
93  template <typename I, typename N>
94  void adjust_fill(const Image<I>& ima,
95  const Neighborhood<N>& nbh,
96  const mln_value(I)& val)
97  {
98  trace::entering("extension::adjust_fill");
99  extension::adjust(ima, nbh);
100  extension::fill(ima, val);
101  trace::exiting("extension::adjust_fill");
102  }
103 
104  template <typename I>
105  void adjust_fill(const Image<I>& ima,
106  unsigned delta,
107  const mln_value(I)& val)
108  {
109  trace::entering("extension::adjust_fill");
110  extension::adjust(ima, delta);
111  extension::fill(ima, val);
112  trace::exiting("extension::adjust_fill");
113  }
114 
115 
116 # endif // ! MLN_INCLUDE_ONLY
117 
118  } // end of namespace mln::extension
119 
120 } // end of namespace mln
121 
122 
123 #endif // ! MLN_EXTENSION_ADJUST_FILL_HH