26 #ifndef MLN_MORPHO_WATERSHED_SUPERPOSE_HH
27 # define MLN_MORPHO_WATERSHED_SUPERPOSE_HH
33 # include <mln/core/concept/image.hh>
34 # include <mln/core/image/dmorph/image_if.hh>
35 # include <mln/data/convert.hh>
36 # include <mln/data/fill.hh>
37 # include <mln/value/rgb8.hh>
38 # include <mln/literal/colors.hh>
39 # include <mln/pw/all.hh>
58 template <
typename I,
typename J>
60 mln_ch_value(I,value::rgb8)
62 const Image<J>& ws_ima_,
63 const
value::rgb8& wsl_color);
73 template <typename I, typename J>
75 mln_ch_value(I,
value::rgb8)
77 const Image<J>& ws_ima);
80 # ifndef MLN_INCLUDE_ONLY
82 template <
typename I,
typename J>
84 mln_ch_value(I,value::rgb8)
86 const Image<J>& ws_ima_,
87 const
value::rgb8& wsl_color)
89 mln_trace(
"morpho::watershed::superpose");
91 const I& input =
exact(input_);
92 const J& ws_ima =
exact(ws_ima_);
93 mln_precondition(input.is_valid());
94 mln_precondition(ws_ima.is_valid());
98 data::
fill((output | (pw::
value(ws_ima) == pw::cst(literal::zero))).rw(),
105 template <typename I, typename J>
107 mln_ch_value(I,
value::rgb8)
109 const Image<J>& ws_ima)
114 # endif // ! MLN_INCLUDE_ONLY
123 #endif // ! MLN_MORPHO_WATERSHED_SUPERPOSE_HH