URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2009-02-18 Edwin Carlinet <carlinet(a)lrde.epita.fr>
Fix bugs in connected filters tests and add Makefile rules.
* mln/canvas/morpho/connected_filter.hh: Fix bugs to avoid
warning at compile.
* tests/canvas/morpho/Makefile.am: Add check rule.
* tests/canvas/morpho/connected_filter.cc: Fix include mistakes.
---
mln/canvas/morpho/connected_filter.hh | 6 +++++-
tests/canvas/morpho/Makefile.am | 4 ++++
tests/canvas/morpho/connected_filter.cc | 5 ++++-
3 files changed, 13 insertions(+), 2 deletions(-)
Index: trunk/milena/tests/canvas/morpho/Makefile.am
===================================================================
--- trunk/milena/tests/canvas/morpho/Makefile.am (revision 3382)
+++ trunk/milena/tests/canvas/morpho/Makefile.am (revision 3383)
@@ -1,3 +1,7 @@
## Process this file through Automake to create Makefile.in -*- Makefile -*-
include $(top_srcdir)/milena/tests/tests.mk
+
+check_PROGRAMS=connected_filter
+
+connected_filter_SOURCES=connected_filter.cc
Index: trunk/milena/tests/canvas/morpho/connected_filter.cc
===================================================================
--- trunk/milena/tests/canvas/morpho/connected_filter.cc (revision 3382)
+++ trunk/milena/tests/canvas/morpho/connected_filter.cc (revision 3383)
@@ -6,13 +6,16 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/morpho/attribute/volume.hh>
#include <mln/morpho/attribute/card.hh>
-#include "connected_filter.hh"
+#include <mln/canvas/morpho/connected_filter.hh>
int main(int argc, char** argv)
{
using namespace mln;
using value::int_u8;
+ if (argc < 2)
+ return 1;
+
std::cout << "Leveling filter test" << std::endl;
typedef mln::image2d<int_u8> I;
Index: trunk/milena/mln/canvas/morpho/connected_filter.hh
===================================================================
--- trunk/milena/mln/canvas/morpho/connected_filter.hh (revision 3382)
+++ trunk/milena/mln/canvas/morpho/connected_filter.hh (revision 3383)
@@ -74,6 +74,8 @@
void take_as_init_fastest (trait::accumulator::when_pix::use_none, A& accu,
const I& input, const unsigned p)
{
+ (void)input;
+ (void)p;
accu.take_as_init ();
}
@@ -81,6 +83,7 @@
void take_as_init (trait::accumulator::when_pix::use_p, A& accu,
const I& input, const P& p)
{
+ (void)input;
accu.take_as_init (p);
}
@@ -88,6 +91,7 @@
void take_as_init (trait::accumulator::when_pix::use_none, A& accu,
const I& input, const P& p)
{
+ (void)input;
accu.take_as_init (p);
}
@@ -279,11 +283,11 @@
const typename A::result& lambda)
{
trace::entering("canvas::morpho::impl::connected_filter_fastest");
-
// FIXME: Tests?
const I& input = exact(input_);
const N& nbh = exact(nbh_);
+ (void)a_;
mln_concrete(I) output;
initialize(output, input);