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 #ifndef MLN_EXTENSION_ADJUST_HH
00027 # define MLN_EXTENSION_ADJUST_HH
00028 
00034 
00035 # include <mln/border/adjust.hh>
00036 # include <mln/core/concept/window.hh>
00037 # include <mln/core/concept/weighted_window.hh>
00038 # include <mln/core/concept/neighborhood.hh>
00039 # include <mln/geom/delta.hh>
00040 
00041 
00042 namespace mln
00043 {
00044 
00045   namespace extension
00046   {
00047 
00050     template <typename I, typename W>
00051     void adjust(const Image<I>& ima, const Window<W>& win);
00052 
00055     template <typename I, typename W>
00056     void adjust(const Image<I>& ima, const Weighted_Window<W>& wwin);
00057 
00060     template <typename I, typename N>
00061     void adjust(const Image<I>& ima, const Neighborhood<N>& nbh);
00062 
00065     template <typename I>
00066     void adjust(const Image<I>& ima, unsigned delta);
00067 
00068 
00069 
00070 # ifndef MLN_INCLUDE_ONLY
00071 
00072     namespace impl
00073     {
00074 
00075       template <typename I>
00076       void adjust(const I& ima, unsigned delta)
00077       {
00078         mln_precondition(exact(ima).is_valid());
00079         
00080         border::adjust(ima, delta);
00081       }
00082 
00083     } 
00084 
00085 
00086     
00087 
00088     template <typename I, typename W>
00089     void adjust(const Image<I>& ima, const Window<W>& win)
00090     {
00091       trace::entering("extension::adjust");
00092       impl::adjust(ima, geom::delta(win));
00093       trace::exiting("extension::adjust");
00094     }
00095 
00096     template <typename I, typename W>
00097     void adjust(const Image<I>& ima, const Weighted_Window<W>& wwin)
00098     {
00099       trace::entering("extension::adjust");
00100       impl::adjust(ima, geom::delta(wwin));
00101       trace::exiting("extension::adjust");
00102     }
00103 
00104     template <typename I, typename N>
00105     void adjust(const Image<I>& ima, const Neighborhood<N>& nbh)
00106     {
00107       trace::entering("extension::adjust");
00108       impl::adjust(ima, geom::delta(nbh));
00109       trace::exiting("extension::adjust");
00110     }
00111 
00112     template <typename I>
00113     void adjust(const Image<I>& ima, unsigned delta)
00114     {
00115       trace::entering("extension::adjust");
00116       impl::adjust(ima, delta);
00117       trace::exiting("extension::adjust");
00118     }
00119 
00120 # endif // ! MLN_INCLUDE_ONLY
00121 
00122   } 
00123 
00124 } 
00125 
00126 
00127 #endif // ! MLN_EXTENSION_ADJUST_HH