* mln/draw/site_set.hh: Remove call to exact().
* mln/morpho/skeleton_constrained.hh: Add a missing const in fast
implementation.
* mln/topo/is_simple_2d.hh: Add a comment.
* mln/topo/skeleton/is_simple_point.hh: Fix a wrong neighborhood
type.
* tests/topo/skeleton/is_simple_point.cc: Fix compilation.
---
milena/ChangeLog | 16 ++++++++++++++++
milena/mln/draw/site_set.hh | 6 +++---
milena/mln/morpho/skeleton_constrained.hh | 2 +-
milena/mln/topo/is_simple_2d.hh | 1 +
milena/mln/topo/skeleton/is_simple_point.hh | 3 ++-
milena/tests/topo/skeleton/is_simple_point.cc | 9 ++++++++-
6 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 5f2a930..12311da 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,21 @@
2011-09-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Small fixes in Milena.
+
+ * mln/draw/site_set.hh: Remove call to exact().
+
+ * mln/morpho/skeleton_constrained.hh: Add a missing const in fast
+ implementation.
+
+ * mln/topo/is_simple_2d.hh: Add a comment.
+
+ * mln/topo/skeleton/is_simple_point.hh: Fix a wrong neighborhood
+ type.
+
+ * tests/topo/skeleton/is_simple_point.cc: Fix compilation.
+
+2011-09-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+
* mln/morpho/skeleton_constrained.hh: Fix algorithm.
2011-09-02 Guillaume Lazzara <z(a)lrde.epita.fr>
diff --git a/milena/mln/draw/site_set.hh b/milena/mln/draw/site_set.hh
index 1738b16..1f0ab78 100644
--- a/milena/mln/draw/site_set.hh
+++ b/milena/mln/draw/site_set.hh
@@ -67,12 +67,12 @@ namespace mln
const mln_value(I)& v,
unsigned output_ratio)
{
- mln_precondition(exact(ima).is_valid());
- mln_precondition(exact(ima).domain() >= exact(s));
-
I& ima = exact(ima_);
const S& s = exact(s_);
+ mln_precondition(ima.is_valid());
+ mln_precondition(ima.domain() >= s);
+
mln_piter(S) p(s);
for_all(p)
ima(p / output_ratio) = v;
diff --git a/milena/mln/morpho/skeleton_constrained.hh
b/milena/mln/morpho/skeleton_constrained.hh
index 3ada77e..37bce02 100644
--- a/milena/mln/morpho/skeleton_constrained.hh
+++ b/milena/mln/morpho/skeleton_constrained.hh
@@ -193,7 +193,7 @@ namespace mln
output = duplicate(input);
extension::adjust_fill(output, nbh, false);
- mln_pixter(I) p_in(input);
+ mln_pixter(const I) p_in(input);
for_all(p_in)
if (p_in.val() == false &&
is_simple.check__(input, p_in)) // <-- is_simple.check
diff --git a/milena/mln/topo/is_simple_2d.hh b/milena/mln/topo/is_simple_2d.hh
index dd38df1..a5e67cb 100644
--- a/milena/mln/topo/is_simple_2d.hh
+++ b/milena/mln/topo/is_simple_2d.hh
@@ -161,6 +161,7 @@ namespace mln
unsigned res = 0;
+ // Note: fwd here but bkd in is_simple_point.hh...
mln_fwd_niter(N2) n(c8(), p);
for_all(n)
{
diff --git a/milena/mln/topo/skeleton/is_simple_point.hh
b/milena/mln/topo/skeleton/is_simple_point.hh
index 9b9185e..9fa665c 100644
--- a/milena/mln/topo/skeleton/is_simple_point.hh
+++ b/milena/mln/topo/skeleton/is_simple_point.hh
@@ -159,7 +159,8 @@ namespace mln
{
unsigned res = 0;
- mln_bkd_niter(N) n(c8(), p);
+ // Note: bkd here but fwd in is_simple_2d.hh...
+ mln_bkd_niter(N2) n(c8(), p);
for_all(n)
{
res = (res << 1);
diff --git a/milena/tests/topo/skeleton/is_simple_point.cc
b/milena/tests/topo/skeleton/is_simple_point.cc
index d5ff1e1..f559bb4 100644
--- a/milena/tests/topo/skeleton/is_simple_point.cc
+++ b/milena/tests/topo/skeleton/is_simple_point.cc
@@ -27,6 +27,7 @@
#include <mln/make/image2d.hh>
#include <mln/topo/skeleton/is_simple_point.hh>
#include <mln/make/image.hh>
+#include <mln/make/dual_neighb.hh>
static const unsigned ref[] = { 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0 };
@@ -40,8 +41,14 @@ int main()
typedef image2d<bool> I;
I ima = make::image(vals);
+ typedef
+ neighb<win::multiple_size<2u, window<dpoint<grid::square, short int>
>,
+ pw::value_<image2d<bool> > > >
+ nbh_t;
+ nbh_t nbh = make::dual_neighb(ima, c8(), c4());
+
unsigned i = 0;
- topo::skeleton::is_simple_point<neighb2d> is_simple(c8());
+ topo::skeleton::is_simple_point<nbh_t> is_simple(nbh);
// Test generic version.
{
--
1.7.2.5
Show replies by date