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;
56 template <
typename I,
typename S>
57 struct data< sub_image<I,S> >
59 data(
const I& ima,
const S& pset);
72 template <
typename I,
typename S>
73 struct image_< sub_image<I,S> > : default_image_morpher< I,
82 typedef trait::image::category::domain_morpher
category;
84 typedef trait::image::ext_domain::none
ext_domain;
85 typedef trait::image::ext_value::irrelevant
ext_value;
86 typedef trait::image::ext_io::irrelevant
ext_io;
88 typedef trait::image::vw_io::none
vw_io;
89 typedef trait::image::vw_set::none
vw_set;
103 template <
typename I,
typename S>
120 void init_(
const I& ima,
const S& pset);
134 template <
typename I,
typename S>
139 template <
typename I,
typename S>
145 template <
typename I,
typename S,
typename J>
150 # ifndef MLN_INCLUDE_ONLY
154 template <
typename I,
typename S,
typename J>
162 target.
init_(ima, pset);
171 template <
typename I,
typename S>
184 template <
typename I,
typename S>
186 sub_image<I,S>::sub_image()
190 template <
typename I,
typename S>
192 sub_image<I,S>::sub_image(
const I& ima,
const S& pset)
197 template <
typename I,
typename S>
200 sub_image<I,S>::init_(
const I& ima,
const S& pset)
202 mln_precondition(! this->is_valid());
203 this->data_ =
new internal::data< sub_image<I,S> >(ima, pset);
206 template <
typename I,
typename S>
209 sub_image<I,S>::domain()
const
211 return this->data_->domain_;
214 template <
typename I,
typename S>
216 sub_image<I,S>::operator sub_image<const I, S>()
const
218 sub_image<const I, S> tmp(this->data_->ima_,
219 this->data_->domain_);
226 template <
typename I,
typename S>
228 sub_image<const I, S>
229 operator|(
const Image<I>& ima,
const Site_Set<S>& pset)
231 sub_image<const I, S> tmp(
exact(ima),
exact(pset));
235 template <
typename I,
typename S>
238 operator|(Image<I>& ima,
const Site_Set<S>& pset)
244 # endif // ! MLN_INCLUDE_ONLY
249 #endif // ! MLN_CORE_IMAGE_DMORPH_SUB_IMAGE_HH