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 mln_trace(
"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());
127 template <typename I, typename V>
131 mln_trace(
"data::fill_with_value");
133 internal::fill_with_value_tests(ima, val);
134 internal::fill_with_value_dispatch(ima, val);
139 # endif // ! MLN_INCLUDE_ONLY
146 #endif // ! MLN_DATA_FILL_WITH_VALUE_HH