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_MORPHO_CLOSING_AREA_ON_VERTICES_HH
00027 # define MLN_MORPHO_CLOSING_AREA_ON_VERTICES_HH
00028 
00033 
00034 # include <mln/core/image/edge_image.hh>
00035 # include <mln/morpho/closing/algebraic.hh>
00036 # include <mln/morpho/attribute/count_adjacent_vertices.hh>
00037 
00038 
00039 namespace mln
00040 {
00041 
00042   namespace morpho
00043   {
00044 
00045     namespace closing
00046     {
00047 
00056       
00057       template <typename P, typename V, typename G, typename N>
00058       edge_image<P,V,G>
00059       area_on_vertices(const edge_image<P,V,G>& input,
00060                        const Neighborhood<N>& nbh,
00061                        unsigned lambda);
00062 
00063 
00064 # ifndef MLN_INCLUDE_ONLY
00065 
00066     template <typename P, typename V, typename G, typename N>
00067     inline
00068     edge_image<P,V,G>
00069     area_on_vertices(const edge_image<P,V,G>& input,
00070                      const Neighborhood<N>& nbh,
00071                      unsigned lambda)
00072     {
00073       trace::entering("morpho::closing::area_on_vertices");
00074       mln_precondition(exact(input).is_valid());
00075 
00076       typedef attribute::count_adjacent_vertices< edge_image<P,V,G> > attribute_t;
00077 
00078       edge_image<P,V,G>
00079         output = closing::algebraic(input, nbh, attribute_t(), lambda);
00080 
00081       trace::exiting("morpho::closing::area_on_vertices");
00082       return output;
00083     }
00084 
00085 # endif // ! MLN_INCLUDE_ONLY
00086 
00087     } 
00088 
00089   } 
00090 
00091 } 
00092 
00093 
00094 #endif // ! MLN_MORPHO_CLOSING_AREA_ON_VERTICES_HH