26 #ifndef MLN_MORPHO_THINNING_HH
27 # define MLN_MORPHO_THINNING_HH
33 # include <mln/morpho/hit_or_miss.hh>
34 # include <mln/morpho/thickening.hh>
36 #include <mln/io/pgm/save.hh>
50 template <
typename I,
typename Wfg,
typename Wbg>
53 const Window<Wfg>& win_fg, const Window<Wbg>& win_bg);
56 # ifndef MLN_INCLUDE_ONLY
61 template <
typename I,
typename Wfg,
typename Wbg>
64 thinning_tests(
const Image<I>& input_,
65 const Window<Wfg>& win_fg_,
66 const Window<Wbg>& win_bg_)
68 const I& input = exact(input_);
69 const Wfg& win_fg = exact(win_fg_);
70 const Wbg& win_bg = exact(win_bg_);
73 mln_precondition(input.is_valid());
74 mln_precondition(win_fg.is_centered());
75 mln_precondition(! win_bg.is_empty());
76 mln_precondition((win_fg && win_bg).is_empty());
87 template <
typename I,
typename Wfg,
typename Wbg>
93 trace::entering(
"morpho::thinning");
96 internal::thinning_tests(input, win_fg, win_bg);
102 win_bg, win_fg ) ) == output);
103 trace::exiting(
"morpho::thinning");
107 # endif // ! MLN_INCLUDE_ONLY
114 #endif // ! MLN_MORPHO_THINNING_HH