* tests/transform/fft.cc: Fix the path to the input image.
* tests/transform/Makefile.am
(check_PROGRAMS) [HAVE_FFTW3]: Add fft.
(fft_SOURCES, fft_CPPFLAGS, fft_LDFLAGS) [HAVE_FFTW3]: New.
(MOSTLYCLEANFILES): New.
---
milena/ChangeLog | 10 ++++++++++
milena/tests/transform/Makefile.am | 21 ++++++++++++++++++++-
milena/tests/transform/fft.cc | 6 ++++--
3 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 9f4e622..88f2402 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,15 @@
2012-10-09 Roland Levillain <roland(a)lrde.epita.fr>
+ Exercise the Fast Fourier Transform.
+
+ * tests/transform/fft.cc: Fix the path to the input image.
+ * tests/transform/Makefile.am
+ (check_PROGRAMS) [HAVE_FFTW3]: Add fft.
+ (fft_SOURCES, fft_CPPFLAGS, fft_LDFLAGS) [HAVE_FFTW3]: New.
+ (MOSTLYCLEANFILES): New.
+
+2012-10-09 Roland Levillain <roland(a)lrde.epita.fr>
+
Fix the Fast Fourier Transform.
* mln/transform/fft.hh
diff --git a/milena/tests/transform/Makefile.am b/milena/tests/transform/Makefile.am
index 933483d..f458a92 100644
--- a/milena/tests/transform/Makefile.am
+++ b/milena/tests/transform/Makefile.am
@@ -1,4 +1,5 @@
-# Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2008, 2009, 2012 EPITA Research and Development
+# Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -35,4 +36,22 @@ influence_zone_front_SOURCES = influence_zone_front.cc
influence_zone_geodesic_SOURCES = influence_zone_geodesic.cc
influence_zone_geodesic_saturated_SOURCES = influence_zone_geodesic_saturated.cc
+
+if HAVE_FFTW3
+
+check_PROGRAMS += fft
+fft_SOURCES = fft.cc
+fft_CPPFLAGS = $(AM_CPPFLAGS) $(FFTW3_CPPFLAGS)
+fft_LDFLAGS = $(AM_LDFLAGS) $(FFTW3_LDFLAGS)
+
+endif HAVE_FFTW3
+
+
TESTS = $(check_PROGRAMS)
+
+MOSTLYCLEANFILES = \
+ fft.pgm \
+ fft_copy.pgm \
+ fft_low_pass.pgm \
+ fft_trans_clipped.pgm \
+ fft_trans_log.pgm
diff --git a/milena/tests/transform/fft.cc b/milena/tests/transform/fft.cc
index d7f7e63..bf7b8b9 100644
--- a/milena/tests/transform/fft.cc
+++ b/milena/tests/transform/fft.cc
@@ -1,5 +1,5 @@
// -*- c++ -*-
-// Copyright (C) 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2004, 2012 EPITA Research and Development Laboratory
//
// This file is part of the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -33,6 +33,8 @@
#include <mln/opt/at.hh>
#include <mln/debug/println.hh>
+#include "tests/data.hh"
+
#define CHECK(Condition) \
if (Condition) \
std::cout << "OK" << std::endl; \
@@ -51,7 +53,7 @@ int main ()
int status = 0;
image2d<int_u8> im1;
- io::pgm::load(im1, "lena.pgm");
+ io::pgm::load(im1, MLN_IMG_DIR "/lena.pgm");
fft<double> fourier(im1);
--
1.7.2.5