26 #ifndef MLN_GEOM_BOTTOM_LEFT_HH
27 # define MLN_GEOM_BOTTOM_LEFT_HH
33 # include <mln/core/concept/image.hh>
34 # include <mln/geom/bbox.hh>
58 # ifndef MLN_INCLUDE_ONLY
66 mln_site(B) bottom_left_2d(const Box<B>& b_)
68 const B& b =
exact(b_);
76 mln_site(B) bottom_left_3d(const Box<B>& b_)
78 const B& b =
exact(b_);
79 mln_site(B) bottom_left(b.pmax().sli(),
93 struct bottom_left_dispatch_impl;
97 struct bottom_left_dispatch_impl<2>
101 mln_site(B) run(const Box<B>&
box)
const
103 return impl::bottom_left_2d(box);
109 struct bottom_left_dispatch_impl<3>
111 template <
typename B>
113 mln_site(B) run(const Box<B>&
box)
const
115 return impl::bottom_left_3d(box);
120 template <
typename B>
122 mln_site(B) bottom_left_dispatch(const Box<B>&
box)
124 typedef mln_site(B) P;
125 return bottom_left_dispatch_impl<P::dim>().run(box);
133 template <typename I>
135 mln_site(I) bottom_left(const Image<I>& ima)
137 mln_precondition(
exact(ima).is_valid());
138 mln_site(I) output = internal::bottom_left_dispatch(
exact(ima).domain());
143 template <typename B>
145 mln_site(B) bottom_left(const Box<B>& b)
147 mln_precondition(
exact(b).is_valid());
148 mln_site(B) output = internal::bottom_left_dispatch(b);
153 # endif // ! MLN_INCLUDE_ONLY
160 #endif // ! MLN_GEOM_BOTTOM_LEFT_HH