* 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.
---
milena/ChangeLog | 11 ++++++
milena/mln/topo/skeleton/breadth_first_thinning.hh | 36 ++++++++++++++++++-
2 files changed, 45 insertions(+), 2 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index ebcec24..18e4ada 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,14 @@
+2010-09-09 Roland Levillain <roland(a)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(a)lrde.epita.fr>
Add more documentation on the detach procedure.
diff --git a/milena/mln/topo/skeleton/breadth_first_thinning.hh b/milena/mln/topo/skeleton/breadth_first_thinning.hh
index f9356f9..f405166 100644
--- a/milena/mln/topo/skeleton/breadth_first_thinning.hh
+++ b/milena/mln/topo/skeleton/breadth_first_thinning.hh
@@ -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
--
1.5.6.5
* mln/make/detachment.hh: Here.
Typo.
* mln/topo/detach.hh: Typo.
---
milena/ChangeLog | 8 ++++++++
milena/mln/make/detachment.hh | 10 ++++++++--
milena/mln/topo/detach.hh | 10 +++++-----
3 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index f83deda..ebcec24 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,11 @@
+2010-09-01 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Add more documentation on the detach procedure.
+
+ * mln/make/detachment.hh: Here.
+ Typo.
+ * mln/topo/detach.hh: Typo.
+
2010-08-18 Roland Levillain <roland(a)lrde.epita.fr>
* mln/topo/skeleton/breadth_first_thinning.hh: Reindent.
diff --git a/milena/mln/make/detachment.hh b/milena/mln/make/detachment.hh
index 16f4954..16a8c92 100644
--- a/milena/mln/make/detachment.hh
+++ b/milena/mln/make/detachment.hh
@@ -41,7 +41,7 @@ namespace mln
{
/** \brief Compute the detachment of the cell corresponding to the
- facet \a f to the image \a ima.
+ facet \a f from the image \a ima.
\pre \a f is a facet (it does not belong to any face of higher
dimension).
@@ -53,7 +53,13 @@ namespace mln
couprie.08.pami). We use the following (equivalent) definition:
an N-face F in CELL is not in the detachment of CELL from IMA if
it is adjacent to at least an (N-1)-face or an (N+1)-face that
- does not belong to CELL. */
+ does not belong to CELL.
+
+ Moreover, the term detachment does not correspond to the
+ complex resulting from the collapsing of CELL onto IMA, but
+ the part that is removed, i.e., the detached part CELL -
+ ATTACHMENT. It would be wise to rename this routine to
+ something else. */
template <unsigned D, typename G, typename V>
p_set< complex_psite<D, G> >
detachment(const complex_psite<D, G>& f,
diff --git a/milena/mln/topo/detach.hh b/milena/mln/topo/detach.hh
index b310423..6218739 100644
--- a/milena/mln/topo/detach.hh
+++ b/milena/mln/topo/detach.hh
@@ -27,7 +27,7 @@
# define MLN_TOPO_DETACH_HH
/// \file
-/// \brief Detachin a cell from a binary complex-based image.
+/// \brief Detaching a cell from a binary complex-based image.
# include <mln/core/site_set/p_set.hh>
# include <mln/core/image/complex_image.hh>
@@ -41,10 +41,10 @@ namespace mln
{
/** Detach the cell corresponding to \a f from \a ima.
-
- \pre \a f is a facet (it does not belong to any face of higher
- dimension).
- \pre \a ima is an image of Boolean values. */
+
+ \pre \a f is a facet (it does not belong to any face of higher
+ dimension).
+ \pre \a ima is an image of Boolean values. */
template <unsigned D, typename G>
void
detach(const complex_psite<D, G>& f, complex_image<D, G, bool>& ima);
--
1.5.6.5