26 #ifndef MLN_MORPHO_TOP_HAT_HH
27 # define MLN_MORPHO_TOP_HAT_HH
35 # include <mln/morpho/opening/structural.hh>
36 # include <mln/morpho/closing/structural.hh>
50 template <
typename I,
typename W>
59 template <typename I, typename W>
71 template <typename I, typename W>
77 # ifndef MLN_INCLUDE_ONLY
80 template <
typename I,
typename W>
85 trace::entering(
"morpho::top_hat_white");
87 mln_precondition(exact(input).is_valid());
88 mln_precondition(! exact(win).is_empty());
91 opening::structural(input, win));
95 trace::exiting(
"morpho::top_hat_white");
100 template <
typename I,
typename W>
104 trace::entering(
"morpho::top_hat_black");
106 mln_precondition(exact(input).is_valid());
107 mln_precondition(! exact(win).is_empty());
109 mln_concrete(I) output =
morpho::minus(closing::structural(input, win),
114 trace::exiting(
"morpho::top_hat_black");
119 template <
typename I,
typename W>
123 trace::entering(
"morpho::top_hat_self_complementary");
125 mln_precondition(exact(input).is_valid());
126 mln_precondition(! exact(win).is_empty());
128 mln_concrete(I) output =
morpho::minus(closing::structural(input, win),
129 opening::structural(input, win));
133 trace::exiting(
"morpho::top_hat_self_complementary");
138 # endif // ! MLN_INCLUDE_ONLY
145 #endif // ! MLN_MORPHO_TOP_HAT_HH