27 #ifndef MLN_DATA_FILL_WITH_VALUE_HH
28 # define MLN_DATA_FILL_WITH_VALUE_HH
41 # include <mln/core/concept/image.hh>
46 # include <mln/data/fill_with_value.spe.hh>
63 template <
typename I,
typename V>
69 # ifndef MLN_INCLUDE_ONLY
74 template <
typename I,
typename V>
76 void fill_with_value_tests(Image<I>& ima,
const V&)
78 mlc_converts_to(
mln_exact(V), mln_value(I))::check();
79 mln_precondition(exact(ima).is_valid());
102 template <
typename I,
typename V>
105 trace::entering(
"data::impl::generic::fill_with_value");
107 I& ima = exact(ima_);
109 internal::fill_with_value_tests(ima, val);
110 mlc_is(mln_trait_image_pw_io(I),
111 trait::image::pw_io::read_write)::check();
113 mln_value(I) v =
static_cast<mln_value(I)
>(exact(val));
114 mln_piter(I) p(ima.domain());
118 trace::exiting(
"data::impl::generic::fill_with_value");
128 template <
typename I,
typename V>
132 trace::entering(
"data::fill_with_value");
134 internal::fill_with_value_tests(ima, val);
135 internal::fill_with_value_dispatch(ima, val);
137 trace::exiting(
"data::fill_with_value");
141 # endif // ! MLN_INCLUDE_ONLY
148 #endif // ! MLN_DATA_FILL_WITH_VALUE_HH