Milena (Olena)  User documentation 2.0a Id
 All Classes Namespaces Functions Variables Typedefs Enumerator Groups Pages
adjust_duplicate_2_faces.hh
1 // Copyright (C) 2012 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 
30 
31 #ifndef MLN_WORLD_K2_BORDER_ADJUST_DUPLICATE_2_FACES_HH
32 # define MLN_WORLD_K2_BORDER_ADJUST_DUPLICATE_2_FACES_HH
33 
34 # include <mln/border/adjust.hh>
35 # include <mln/world/kn/border/duplicate_2_faces.hh>
36 # include <mln/world/k2/border/fill_non_primary_from_primary_2_faces.hh>
37 
38 
39 namespace mln
40 {
41 
42  namespace world
43  {
44 
45  namespace k2
46  {
47 
48  namespace border
49  {
50 
62  template <typename I, typename F>
63  void adjust_duplicate_2_faces(const Image<I>& inout,
64  const Function_vv2v<F>& f,
65  unsigned min_thickness);
66 
67 
68 
69 # ifndef MLN_INCLUDE_ONLY
70 
71 
72  template <typename I, typename F>
73  void adjust_duplicate_2_faces(const Image<I>& inout,
74  const Function_vv2v<F>& f,
75  unsigned min_thickness)
76  {
77  trace::entering("mln::world::k2::adjust_duplicate_2_faces");
78 
79  mln_precondition(exact(inout).is_valid());
80  mln_precondition(min_thickness > 0);
81 
82  mln::border::adjust(inout, min_thickness);
83  kn::border::duplicate_2_faces(inout);
84  k2::border::fill_non_primary_from_primary_2_faces(inout, f);
85 
86  trace::exiting("mln::world::k2::adjust_duplicate_2_faces");
87  }
88 
89 
90 # endif // ! MLN_INCLUDE_ONLY
91 
92  } // end of namespace mln::world::k2::border
93 
94  } // end of namespace mln::world::k2
95 
96  } // end of namespace mln::world
97 
98 } // end of namespace mln
99 
100 #endif // ! MLN_WORLD_K2_BORDER_ADJUST_DUPLICATE_2_FACES_HH