26 #ifndef MLN_MORPHO_ELEMENTARY_LAPLACIAN_HH
27 # define MLN_MORPHO_ELEMENTARY_LAPLACIAN_HH
35 # include <mln/morpho/elementary/gradient_internal.hh>
36 # include <mln/morpho/elementary/gradient_external.hh>
51 template <
typename I,
typename N>
53 laplacian(const Image<I>& input, const Neighborhood<N>& nbh);
56 # ifndef MLN_INCLUDE_ONLY
58 template <
typename I,
typename N>
61 laplacian(const Image<I>& input, const Neighborhood<N>& nbh)
63 trace::entering(
"morpho::elementary::laplacian");
65 mln_precondition(exact(input).is_valid());
66 mln_precondition(exact(nbh).is_valid());
69 output = gradient_external(input, nbh) - gradient_internal(input, nbh);
71 trace::exiting("morpho::elementary::
laplacian");
75 # endif // ! MLN_INCLUDE_ONLY
84 #endif // ! MLN_MORPHO_ELEMENTARY_LAPLACIAN_HH