27 #ifndef MLN_CORE_IMAGE_DMORPH_SUB_IMAGE_HH
28 # define MLN_CORE_IMAGE_DMORPH_SUB_IMAGE_HH
38 # include <mln/core/internal/image_domain_morpher.hh>
47 template <
typename I,
typename S>
class sub_image;
54 template <
typename I,
typename S>
55 struct data< sub_image<I,S> >
57 data(
const I& ima,
const S& pset);
70 template <
typename I,
typename S>
71 struct image_< sub_image<I,S> > : default_image_morpher< I,
80 typedef trait::image::category::domain_morpher category;
82 typedef trait::image::ext_domain::none ext_domain;
83 typedef trait::image::ext_value::irrelevant ext_value;
84 typedef trait::image::ext_io::irrelevant ext_io;
86 typedef trait::image::vw_io::none vw_io;
87 typedef trait::image::vw_set::none vw_set;
88 typedef trait::image::value_alignment::not_aligned value_alignment;
89 typedef trait::image::value_storage::disrupted value_storage;
101 template <
typename I,
typename S>
102 class sub_image :
public internal::image_domain_morpher< I,
117 void init_(
const I& ima,
const S& pset);
130 template <
typename I,
typename S>
135 template <
typename I,
typename S>
141 template <
typename I,
typename S,
typename J>
146 # ifndef MLN_INCLUDE_ONLY
150 template <
typename I,
typename S,
typename J>
155 init_(tag::image, ima, model);
157 init_(tag::domain, pset, model);
158 target.init_(ima, pset);
167 template <
typename I,
typename S>
180 template <
typename I,
typename S>
186 template <
typename I,
typename S>
193 template <
typename I,
typename S>
198 mln_precondition(! this->is_valid());
199 this->data_ =
new internal::data< sub_image<I,S> >(ima, pset);
202 template <
typename I,
typename S>
207 return this->data_->domain_;
210 template <
typename I,
typename S>
215 this->data_->domain_);
222 template <
typename I,
typename S>
231 template <
typename I,
typename S>
234 operator|(Image<I>& ima,
const Site_Set<S>& pset)
236 sub_image<I, S> tmp(exact(ima), exact(pset));
240 # endif // ! MLN_INCLUDE_ONLY
245 #endif // ! MLN_CORE_IMAGE_DMORPH_SUB_IMAGE_HH