• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List

adjust.hh

00001 // Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
00002 //
00003 // This file is part of Olena.
00004 //
00005 // Olena is free software: you can redistribute it and/or modify it under
00006 // the terms of the GNU General Public License as published by the Free
00007 // Software Foundation, version 2 of the License.
00008 //
00009 // Olena is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with Olena.  If not, see <http://www.gnu.org/licenses/>.
00016 //
00017 // As a special exception, you may use this file as part of a free
00018 // software project without restriction.  Specifically, if other files
00019 // instantiate templates or use macros or inline functions from this
00020 // file, or you compile this file and link it with other files to produce
00021 // an executable, this file does not by itself cause the resulting
00022 // executable to be covered by the GNU General Public License.  This
00023 // exception does not however invalidate any other reasons why the
00024 // executable file might be covered by the GNU General Public License.
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         // FIXME: Is-it right?
00080         border::adjust(ima, delta);
00081       }
00082 
00083     } // end of namespace mln::extension::impl
00084 
00085 
00086     // Facades.
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   } // end of namespace mln::extension
00123 
00124 } // end of namespace mln
00125 
00126 
00127 #endif // ! MLN_EXTENSION_ADJUST_HH

Generated on Tue Oct 4 2011 15:23:24 for Milena (Olena) by  doxygen 1.7.1