30 #ifndef MLN_GEOM_TRANSLATE_HH
31 # define MLN_GEOM_TRANSLATE_HH
33 # include <mln/core/concept/image.hh>
34 # include <mln/core/concept/site_set.hh>
35 # include <mln/core/concept/box.hh>
37 # include <mln/core/routine/extend.hh>
38 # include <mln/core/site_set/p_transformed.hh>
39 # include <mln/core/image/imorph/tr_image.hh>
41 # include <mln/data/fill.hh>
43 # include <mln/fun/x2x/translation.hh>
45 # include <mln/literal/zero.hh>
47 # include <mln/geom/bbox.hh>
70 template <
typename I,
typename V,
typename Ext,
typename S>
73 const algebra::vec<mln_site_(I)::dim, V>& ref,
74 const Ext& extension, const Site_Set<S>& output_domain);
78 template <typename I, typename V, typename Ext>
81 const algebra::vec<mln_site_(I)::dim, V>& ref,
82 const Ext& extension);
87 template <typename I, typename V>
90 const algebra::vec<mln_site_(I)::dim, V>& ref);
94 # ifndef MLN_INCLUDE_ONLY
97 template <
typename I,
typename V,
typename Ext,
typename S>
100 const algebra::vec<mln_site_(I)::dim, V>& ref,
101 const Ext& extension_, const
Site_Set<S>& output_domain_)
103 trace::entering(
"geom::translate");
105 const I& input = exact(input_);
106 const S& output_domain = exact(output_domain_);
107 const mln_exact(Ext)& extension = exact(extension_);
110 mln_precondition(input.is_valid());
111 mln_precondition(output_domain.is_valid());
119 trans_domain_t d(input.domain(), t);
120 tr_ima_t tr_ima(d, input, t);
122 mln_concrete(I) output(output_domain);
125 trace::exiting(
"geom::translate");
130 template <
typename I,
typename V,
typename Ext>
133 const algebra::vec<mln_site_(I)::dim, V>& ref,
134 const Ext& extension)
139 typedef mln_domain(I) domain_t;
140 return translate(input, ref, extension, domain_t());
144 template <
typename I,
typename V>
147 const algebra::vec<mln_site_(I)::dim, V>& ref)
153 # endif // ! MLN_INCLUDE_ONLY
161 #endif // ! MLN_GEOM_TRANSLATE_HH