27 #ifndef MLN_DEBUG_SUPERPOSE_HH
28 # define MLN_DEBUG_SUPERPOSE_HH
34 # include <mln/core/concept/image.hh>
35 # include <mln/core/image/dmorph/image_if.hh>
36 # include <mln/value/concept/scalar.hh>
37 # include <mln/value/concept/symbolic.hh>
38 # include <mln/value/rgb8.hh>
39 # include <mln/data/fill.hh>
40 # include <mln/data/convert.hh>
41 # include <mln/pw/all.hh>
42 # include <mln/literal/colors.hh>
67 template <
typename I,
typename J>
68 mln_ch_value(I,value::rgb8)
69 superpose(const Image<I>& input_, const Image<J>& object_,
70 const
value::rgb8& object_color);
75 template <typename I, typename J>
76 mln_ch_value(I,
value::rgb8)
77 superpose(const Image<I>& input, const Image<J>&
object);
80 # ifndef MLN_INCLUDE_ONLY
82 template <
typename I,
typename J>
83 mln_ch_value(I,value::rgb8)
84 superpose(const Image<I>& input_, const Image<J>& object_,
85 const
value::rgb8& object_color)
87 mln_trace(
"debug::superpose");
89 const I& input =
exact(input_);
90 const J&
object =
exact(object_);
93 mlc_or(mlc_or(mlc_is_a(mln_value(J), value::Scalar),
94 mlc_is(mln_value(J),
bool)),
95 mlc_is_a(mln_value(J), value::Symbolic))::check();
97 mln_precondition(input.is_valid());
98 mln_precondition(
object.is_valid());
99 mln_precondition(input.domain() ==
object.domain());
102 data::
fill((output | (pw::
value(
object) != pw::cst(literal::zero))).rw(),
108 template <typename I, typename J>
109 mln_ch_value(I,
value::rgb8)
110 superpose(const Image<I>& input, const Image<J>&
object)
115 # endif // ! MLN_INCLUDE_ONLY
121 #endif // ! MLN_DEBUG_SUPERPOSE_HH