Commit faeffbfa authored by Roland Levillain's avatar Roland Levillain
Browse files

Make the 5th argument of breadth_first_thinning truly optional.

	* mln/topo/skeleton/breadth_first_thinning.hh
	(mln::topo::skeleton::breadth_first_thinning):
	Disable the default value of the 5th argument, which cannot be
	used in practice, since it depends on the parameter H.
	Add a 4-argument overloading to make the `constraint' argument
	optional.
parent 848be928
2010-09-09 Roland Levillain <roland@lrde.epita.fr>
Make the 5th argument of breadth_first_thinning truly optional.
* mln/topo/skeleton/breadth_first_thinning.hh
(mln::topo::skeleton::breadth_first_thinning):
Disable the default value of the 5th argument, which cannot be
used in practice, since it depends on the parameter H.
Add a 4-argument overloading to make the `constraint' argument
optional.
2010-09-01 Roland Levillain <roland@lrde.epita.fr>
 
Add more documentation on the detach procedure.
......@@ -70,8 +70,27 @@ namespace mln
const Neighborhood<N>& nbh,
Function_v2b<F>& is_simple,
G detach,
const Function_v2b<H>& constraint =
fun::p2b::tautology());
const Function_v2b<H>& constraint);
/** \brief Skeleton by Breadth-First Thinning with no constraint.
A generic implementation of the computation of a skeleton
using a breadth-first thinning on a binary.
\param input The input image.
\param nbh The adjacency relation between triangles.
\param is_simple The predicate on the simplicity of points
(sites). This functor must provide a method
<tt>void set_image(const Image<I>&)</tt>.
\param detach A function used to detach a cell from
\a input. */
template <typename I, typename N, typename F, typename G>
mln_concrete(I)
breadth_first_thinning(const Image<I>& input,
const Neighborhood<N>& nbh,
Function_v2b<F>& is_simple,
G detach);
# ifndef MLN_INCLUDE_ONLY
......@@ -149,6 +168,19 @@ namespace mln
return output;
}
template <typename I, typename N, typename F, typename G>
inline
mln_concrete(I)
breadth_first_thinning(const Image<I>& input,
const Neighborhood<N>& nbh,
Function_v2b<F>& is_simple,
G detach)
{
return breadth_first_thinning(input, nbh, is_simple, detach,
fun::p2b::tautology());
}
# endif // MLN_INCLUDE_ONLY
} // end of namespace mln::topo::skeleton
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment