27 #ifndef MLN_CORE_INTERNAL_IMAGE_MORPHER_HH
28 # define MLN_CORE_INTERNAL_IMAGE_MORPHER_HH
36 # include <mln/core/internal/image_base.hh>
37 # include <mln/metal/const.hh>
38 # include <mln/metal/is_const.hh>
39 # include <mln/metal/is_not_const.hh>
54 template <
typename I,
typename T,
typename S,
typename E>
117 template <
typename Subject,
typename T,
126 # ifndef MLN_INCLUDE_ONLY
131 template <
typename I,
typename T,
typename S,
typename E>
137 template <
typename I,
typename T,
typename S,
typename E>
142 return this->data_ == 0 ? 0 : & this->data_->ima_;
145 template <
typename I,
typename T,
typename S,
typename E>
150 return this->data_ == 0 ? 0 : & this->data_->ima_;
153 template <
typename I,
typename T,
typename S,
typename E>
158 I* ptr = delegatee_();
159 mln_assertion(ptr != 0);
163 template <
typename I,
typename T,
typename S,
typename E>
168 mlc_const(I)* ptr = delegatee_();
169 mln_assertion(ptr != 0);
173 template <
typename I,
typename T,
typename S,
typename E>
180 this->delegatee_() != 0 &&
181 this->delegatee_()->is_valid();
184 template <
typename I,
typename T,
typename S,
typename E>
189 mlc_is_not_const(I)::check();
190 mlc_equal(mln_trait_image_value_io(I),
191 mln::trait::image::value_io::read_write)::check();
209 template <
typename Subject,
typename T,
212 void init_(Subject s,
T& target,
const Image<J>& model_)
214 mlc_is(mln_trait_image_category(J),
215 trait::image::category::morpher)::check();
216 const J& model =
exact(model_);
217 init_(s, target, * model.delegatee_());
220 # endif // ! MLN_INCLUDE_ONLY
225 #endif // ! MLN_CORE_INTERNAL_IMAGE_MORPHER_HH