00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef MLN_GEOM_MAX_COL_HH
00028 # define MLN_GEOM_MAX_COL_HH
00029
00033
00034 # include <mln/core/concept/image.hh>
00035 # include <mln/geom/bbox.hh>
00036
00037
00038 namespace mln
00039 {
00040
00041 namespace geom
00042 {
00043
00045 template <typename I>
00046 mln_deduce(I, site, coord) max_col(const Image<I>& ima);
00047
00049 template <typename B>
00050 mln_deduce(B, point, coord) max_col(const Box<B>& b);
00051
00052 # ifndef MLN_INCLUDE_ONLY
00053
00054 template <typename I>
00055 inline
00056 mln_deduce(I, site, coord) max_col(const Image<I>& ima)
00057 {
00058 mln_precondition(exact(ima).is_valid());
00059 mln_deduce(I, site, coord) maxcol = geom::bbox(ima).pmax().col();
00060
00061 return maxcol;
00062 }
00063
00064
00065 template <typename B>
00066 inline
00067 mln_deduce(B, point, coord) max_col(const Box<B>& b)
00068 {
00069 metal::not_<metal::equal<metal::int_<B::dim>, metal::int_<1> > >::check();
00070 mln_deduce(B, point, coord) maxcol = exact(b).pmax().col();
00071
00072 return maxcol;
00073 }
00074
00075 # endif // ! MLN_INCLUDE_ONLY
00076
00077 }
00078
00079 }
00080
00081
00082 #endif // ! MLN_GEOM_MAX_COL_HH