Commit c5b960f6 authored by Nicolas Burrus's avatar Nicolas Burrus
Browse files

Merge from branch 2003paradigm.

    prcs2git-id: 9.22
parents fce5a8df 0de8d72f
This diff is collapsed.
2003-08-07 Nicolas Burrus <burrus_n@lrde.epita.fr>
* NEWS: Update for 0.9.
2003-08-05 Nicolas Burrus <burrus_n@lrde.epita.fr>
* config/oln.m4: Remove -W for gnu compilers since they have
painful bugs.
2003-08-04 Nicolas Burrus <burrus_n@lrde.epita.fr>
* config/oln-local.m4: Fail when swig is not detected and swilena
is enabled.
* configure.ac: Temporary fix to ensure that Python.h is present.
2003-08-03 Nicolas Burrus <burrus_n@lrde.epita.fr>
* contrib/runtests: Handle new flag (COMPILE_ONLY).
2003-08-01 Sylvain Berlemont <Sylvain.Berlemont@lrde.epita.fr>
* configure.ac: New math test.
2003-08-01 Nicolas Burrus <burrus_n@lrde.epita.fr>
* contrib/runtests: Check if the current test is present. Fix
the TESTS variable handling.
2003-08-01 Nicolas Burrus <burrus_n@lrde.epita.fr>
* contrib/runtests: New.
* Makefile.am (EXTRA_DIST): Adjust.
2003-07-30 Sylvain Berlemont <Sylvain.Berlemont@lrde.epita.fr>
* configure.ac: Add utils tests.
2003-07-25 Sylvain Berlemont <Sylvain.Berlemont@lrde.epita.fr>
* configure.ac: Add level tests.
2003-07-23 Nicolas Burrus <burrus_n@lrde.epita.fr>
* config/oln.m4: Fix compilation flags overriding.
2003-07-16 Nicolas Burrus <burrus_n@lrde.epita.fr>
* config/oln.m4: Remove -W for gnu compilers.
2003-06-25 Nicolas Burrus <burrus_n@lrde.epita.fr>
* configure.ac: Look for hacha.
......@@ -15,7 +65,7 @@
* configure.ac: Clean CXXFLAGS detection.
2003-05-13 Nicolas Burrus <burrus_n@lrde.epita.fr>
* configure.ac: Add a test entry for integre/tests/sanity.
* configure.ac: Add a test entry for metalic/tests/sanity.
* config/oln.m4: Add local macros for integre and metalic.
......@@ -23,7 +73,7 @@
2003-05-08 Nicolas Burrus <burrus_n@lrde.epita.fr>
* configure.ac: Add a test entry for integre/tests/utils.
2003-05-04 Nicolas Burrus <burrus_n@lrde.epita.fr>
* configure.ac: Make CXXFLAGS empty by default.
......
......@@ -19,7 +19,7 @@ dist_m4data_DATA = config/oln.m4
### Development files.
###
EXTRA_DIST = config/oln-local.m4
EXTRA_DIST = config/oln-local.m4 contrib/runtests
###
### Basic doc files generation.
......
Olena 0.8 April 10st, 2003
Olena 0.9 August 8, 2003
* New static hierarchy paradigm
- Multiple inheritance and diamond hierarchies made
possible.
- Objects' abstract interfaces made available, leading to
safer and easier algorithm writing.
- Label images such as binary_image or vectorial_image added.
* Partial rewrite of images I/O
- Support for 1d and 3d images and windows.
- Better handling of built-in types.
* Color conversions fixed and improved.
* Cleanup and coding style conformance.
* Many bug fixes.
* Improved test-suite.
Olena 0.8 April 10, 2003
IMPORTANT NOTE: This version is not compatible with older
versions of Olena. The project has been split into three part,
......@@ -53,7 +73,7 @@ Olena 0.4.1 April 25, 2002
Olena 0.4 April 24, 2002
* New morho:: operators:
* New morpho:: operators:
- thinning
- thickening
* New convert:: operators:
......
......@@ -60,7 +60,11 @@ AC_DEFUN([MLC_TESTS], dnl Auxiliary function for test categories selection
AC_DEFUN([AC_CHECK_SWIG13],
[dnl
AC_ARG_VAR([SWIG], [the SWIG interface generator])
AC_CHECK_PROGS([SWIG], [swig], [$am_aux_dir/missing swig])
# FIXME: cleanup this
# We cannot enable the compilation of swilena without swig, since
# the link phase requires libswigpy.so.
# AC_CHECK_PROGS([SWIG], [swig], [$am_aux_dir/missing swig])
AC_CHECK_PROGS([SWIG], [swig], AC_MSG_ERROR([You need swig >= 1.3 to compile swilena. You can disable swilena by specifying --without-swilena to configure.]))
AC_CACHE_CHECK([for SWIG >= 1.3],
[oln_cv_recent_swig],
......
......@@ -455,18 +455,20 @@ AC_DEFUN([AC_CXX_FLAGS],
fi])
AC_LANG_POP([C++])
# Note for gnu compilers: the -W flags warns for non explicit call
# to base class constructors even if there are only default constructors.
case "$ac_cv_cxx_style" in
GNU)
_CXXFLAGS_DEBUG="-g"
_CXXFLAGS_OPTIMIZE="-O3 -finline-limit-1500"
_CXXFLAGS_STRICT="-W -Wall -pedantic"
_CXXFLAGS_STRICT_ERRORS="-W -Wall -pedantic -Werror"
_CXXFLAGS_STRICT="-Wall -pedantic"
_CXXFLAGS_STRICT_ERRORS="-Wall -pedantic -Werror"
;;
weakGNU)
_CXXFLAGS_DEBUG="-g"
_CXXFLAGS_OPTIMIZE="-O2 -felide-constructors -funroll-loops"
_CXXFLAGS_STRICT="-W -Wall -pedantic"
_CXXFLAGS_STRICT_ERRORS="-W -Wall -pedantic -Werror"
_CXXFLAGS_STRICT="-Wall -pedantic"
_CXXFLAGS_STRICT_ERRORS="-Wall -pedantic -Werror"
;;
Sun)
_CXXFLAGS_DEBUG="-g"
......@@ -487,16 +489,16 @@ AC_DEFUN([AC_CXX_FLAGS],
;;
esac
if test "x$CXXFLAGS_OPTIMIZE" = "x"; then
if test ! ${CXXFLAGS_OPTIMIZE+set}; then
CXXFLAGS_OPTIMIZE=$_CXXFLAGS_OPTIMIZE
fi
if test "x$CXXFLAGS_DEBUG" = "x"; then
if test ! ${CXXFLAGS_DEBUG+set}; then
CXXFLAGS_DEBUG=$_CXXFLAGS_DEBUG
fi
if test "x$CXXFLAGS_STRICT" = "x"; then
if test ! ${CXXFLAGS_STRICT+set}; then
CXXFLAGS_STRICT=$_CXXFLAGS_STRICT
fi
if test "x$CXXFLAGS_STRICT_ERRORS" = "x"; then
if test ! ${CXXFLAGS_STRICT_ERRORS+set}; then
CXXFLAGS_STRICT_ERRORS=$_CXXFLAGS_STRICT_ERRORS
fi
......
......@@ -42,14 +42,14 @@ AC_CONFIG_FILES([Makefile
### Olena components.
OLN_COLLECTION([OLN_TOP],
OLN_COLLECTION([OLN_TOP],
[dnl
###
### Stuff pertaining to the main source tree
###
OLN_COLLECTION([OLN_SRC],
OLN_COLLECTION([OLN_SRC],
[dnl
### Checks pertaining to the generation of auxiliary images
......@@ -81,7 +81,7 @@ OLN_COLLECTION([OLN_TOP],
[force disable regeneration of manual pages])],
[oln_cv_regen_manpages=$enableval])
])
AM_CONDITIONAL([REGEN_MANPAGES], [test "x$oln_cv_regen_manpages" != xno])
......@@ -94,19 +94,19 @@ OLN_COLLECTION([OLN_TOP],
[disable generation of oln-config-xxx.sh])],
[oln_cv_enable_config_sh=$withval])])
AM_CONDITIONAL([OLN_CONFIG_SH], [test "x$oln_cv_enable_config_sh" != xno])
### The testsuite is a component.
##
## olena testsuite
##
OLN_COMPONENT([olena/tests],
[oln-testsuite],
[oln_cv_build_tests],
[the olena's testsuite],
[OLN_SRC],
OLN_COMPONENT([olena/tests],
[oln-testsuite],
[oln_cv_build_tests],
[the olena's testsuite],
[OLN_SRC],
[olena/tests/Makefile
olena/tests/check/Makefile
olena/tests/check/defs],
......@@ -122,7 +122,7 @@ OLN_COLLECTION([OLN_TOP],
[oln_cv_tests_selection=$withval],
[oln_cv_tests_selection=all])dnl
])dnl
# OLN_TESTS defined in oln-local.m4
OLN_TESTS([arith])
......@@ -130,10 +130,13 @@ OLN_COLLECTION([OLN_TOP],
OLN_TESTS([convol])
OLN_TESTS([core])
OLN_TESTS([io])
OLN_TESTS([math])
OLN_TESTS([morpho])
OLN_TESTS([level])
OLN_TESTS([sanity])
OLN_TESTS([topo])
OLN_TESTS([transforms])
OLN_TESTS([utils])
AC_SUBST([OLN_TESTS_SUBDIRS])
......@@ -141,18 +144,18 @@ OLN_COLLECTION([OLN_TOP],
])dnl End of OLN_COLLECTION([OLN_SRC])
OLN_COLLECTION([NTG_SRC],
OLN_COLLECTION([NTG_SRC],
[dnl
##
## integre testsuite
##
OLN_COMPONENT([integre/tests],
[ntg-testsuite],
[ntg_cv_build_tests],
[the integre's testsuite],
[NTG_SRC],
OLN_COMPONENT([integre/tests],
[ntg-testsuite],
[ntg_cv_build_tests],
[the integre's testsuite],
[NTG_SRC],
[integre/tests/Makefile
integre/tests/check/defs],
[dnl Configuration for the testsuite
......@@ -167,7 +170,7 @@ OLN_COLLECTION([OLN_TOP],
[ntg_cv_tests_selection=$withval],
[ntg_cv_tests_selection=all])dnl
])dnl
# NTG_TESTS defined in oln-local.m4
NTG_TESTS([sanity])
......@@ -180,18 +183,18 @@ OLN_COLLECTION([OLN_TOP],
])dnl End of OLN_COLLECTION([NTG_SRC])
OLN_COLLECTION([MLC_SRC],
OLN_COLLECTION([MLC_SRC],
[dnl
##
## metalic testsuite
##
OLN_COMPONENT([metalic/tests],
[mlc-testsuite],
[mlc_cv_build_tests],
[the metalic's testsuite],
[MLC_SRC],
OLN_COMPONENT([metalic/tests],
[mlc-testsuite],
[mlc_cv_build_tests],
[the metalic's testsuite],
[MLC_SRC],
[metalic/tests/Makefile
metalic/tests/check/Makefile
metalic/tests/check/defs],
......@@ -207,7 +210,7 @@ OLN_COLLECTION([OLN_TOP],
[mlc_cv_tests_selection=$withval],
[mlc_cv_tests_selection=all])dnl
])dnl
# MLC_TESTS defined in oln-local.m4
MLC_TESTS([array])
......@@ -222,14 +225,14 @@ OLN_COLLECTION([OLN_TOP],
###
### Stuff pertaining to the documentation
###
###
### The documentation tree is both a component...
OLN_COMPONENT([doc],
[doc],
[oln_cv_build_doc],
[the documentation],
OLN_COMPONENT([doc],
[doc],
[oln_cv_build_doc],
[the documentation],
[OLN_TOP],
[doc/Makefile],
[OLN_COLLECTION([OLN_DOC], dnl ... and a collection.
......@@ -237,11 +240,11 @@ OLN_COLLECTION([OLN_TOP],
### The reference manuals directory is a component.
OLN_COMPONENT([doc/ref],
[doc-ref],
[oln_cv_build_ref],
[the Olena reference manuals],
[OLN_DOC],
OLN_COMPONENT([doc/ref],
[doc-ref],
[oln_cv_build_ref],
[the Olena reference manuals],
[OLN_DOC],
[doc/ref/Makefile],
[dnl Configuration for the manuals directory.
......@@ -264,11 +267,11 @@ OLN_COLLECTION([OLN_TOP],
### The development manuals directory is a component.
OLN_COMPONENT([doc/dev],
[doc-dev],
[oln_cv_build_devdoc],
[the Olena development manual],
[OLN_DOC],
OLN_COMPONENT([doc/dev],
[doc-dev],
[oln_cv_build_devdoc],
[the Olena development manual],
[OLN_DOC],
[doc/dev/Makefile],
[dnl Configuration for the dev directory.
......@@ -281,11 +284,11 @@ OLN_COLLECTION([OLN_TOP],
### The demonstration programs are a component.
OLN_COMPONENT([doc/demo],
[demo],
[oln_cv_build_demo],
[the demonstration programs],
[OLN_DOC],
OLN_COMPONENT([doc/demo],
[demo],
[oln_cv_build_demo],
[the demonstration programs],
[OLN_DOC],
[doc/demo/Makefile],
[], [demo])
......@@ -297,32 +300,32 @@ OLN_COLLECTION([OLN_TOP],
###
### The tools tree is both a component...
OLN_COMPONENT([tools],
[tools],
[oln_cv_build_tools],
[the run-time tools],
[OLN_TOP],
OLN_COMPONENT([tools],
[tools],
[oln_cv_build_tools],
[the run-time tools],
[OLN_TOP],
[tools/Makefile tools/lib/Makefile],
[OLN_COLLECTION([OLN_TOOLS],dnl ... and a collection.
[dnl
[dnl
### The utilities tree is both a component...
OLN_COMPONENT([tools/utilities],
[utilities],
[oln_cv_build_utilities],
[the command-line utilities],
[OLN_TOOLS],
OLN_COMPONENT([tools/utilities],
[utilities],
[oln_cv_build_utilities],
[the command-line utilities],
[OLN_TOOLS],
[tools/utilities/Makefile],
[OLN_COLLECTION([OLN_UTILITIES], dnl ... and a collection.
[dnl
### The morpho utilities are a component.
OLN_COMPONENT([tools/utilities/morpho],
[morpho-utilities],
[oln_cv_build_morpho_utils],
[the morpho utilities],
[OLN_UTILITIES],
[tools/utilities/morpho/Makefile],
OLN_COMPONENT([tools/utilities/morpho],
[morpho-utilities],
[oln_cv_build_morpho_utils],
[the morpho utilities],
[OLN_UTILITIES],
[tools/utilities/morpho/Makefile],
[], [morpho])
])dnl End of OLN_COLLECTION([OLN_UTILITIES])
......@@ -334,15 +337,15 @@ OLN_COLLECTION([OLN_TOP],
[oln_cv_build_swilena],
[the SWIG interface to Olena],
[OLN_TOOLS],
[tools/swilena/Makefile
[tools/swilena/Makefile
tools/swilena/meta/Makefile
tools/swilena/src/Makefile
tools/swilena/src/Makefile
tools/swilena/doc/Makefile],
[OLN_COLLECTION([OLN_SWILENA], dnl ... and a collection.
[dnl
AC_CHECK_SWIG13 dnl definition in oln-local.m4
AC_ARG_VAR([DVIPS], [program to make Postscript from TeX DVI files])
AC_CHECK_PROGS([DVIPS], [dvips], [$am_aux_dir/missing dvips])
AC_ARG_VAR([TEXI2DVI], [program to create DVI from Texinfo files])
......@@ -356,8 +359,15 @@ OLN_COLLECTION([OLN_TOP],
[tools/swilena/python/Makefile],
[
AM_PATH_PYTHON([2.1])
save_CPPFLAGS=$CPPFLAGS
# FIXME: find python path automatically!
CPPFLAGS="$CPPFLAGS -I/usr/include/python2.2"
AC_CHECK_HEADERS([Python.h],,
AC_MSG_ERROR(
[You need Python development files to compile the Python interface. Specify --without-swilena to configure to disable it.]))
CPPFLAGS=$save_CPPFLAGS
], [python])dnl End of OLN_COMPONENT([tools/swilena/python])
])dnl End of OLN_COLLECTION([OLN_SWILENA])
], [swilena])dnl End of OLN_COMPONENT([tools/swilena])
......
......@@ -18,6 +18,10 @@ indir=${SRCDIR-.}/tests
rundir=runs
test -d $rundir || mkdir $rundir
if test "$# = 0 -a ${TESTS+set}"; then
set $TESTS
fi
# If no tests were given on the command line, get the list from $indir.
if test $# = 0; then
set dummy $indir/*
......@@ -25,11 +29,17 @@ if test $# = 0; then
fi
for test; do
if test -d $test; then continue; fi
echo $test | grep '~$' && continue;
# We want only the basename of $test.
test=`basename "$test"`
fail=0
dir=$rundir/$test
input=$indir/$test
test -f $input || {
echo "FAIL: $test (does not exist)" >&2
failures=`expr $failures + 1`
continue; }
rm -rf $dir
mkdir $dir
# Build the source code to compile.
......@@ -43,17 +53,21 @@ exec 6>&2
if test "x\$1" = "x-q"; then
exec 2>$dir/cxx.errors
else
echo $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS $dir/$test.cc
echo $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS $dir/$test.cc $LDADD
fi
$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS "$dir/$test.cc" -o "$dir/test$EXEEXT" || exit 50
$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS "$dir/$test.cc" -o "$dir/test$EXEEXT" $LDADD || exit 50
if test "x\$1" = "x-q"; then
exec 2>$dir/run.errors
if test "x$COMPILE_ONLY" != "x1"; then
if test "x\$1" = "x-q"; then
exec 2>$dir/run.errors
else
echo srcdir="$SRCDIR" $dir/test$EXEEXT
fi
srcdir="$SRCDIR" $dir/test$EXEEXT
estatus=\$?
else
echo $dir/test$EXEEXT
estatus=0
fi
$dir/test$EXEEXT
estatus=\$?
exec 2>&6
echo \$estatus > $dir/exit.status
......@@ -77,7 +91,11 @@ EOF
msg="";
case $expected:$estatus in
ok:0 | compfail:50 | abort:134) rm -rf "$dir" ;;
ok:0 | compfail:50 | abort:134)
if test ! x"$KEEP_RUNS" = x"1"; then
rm -rf "$dir";
fi
msg="(ok)" ;;
*:50) msg="(doesn't compile)" ;;
*:134) msg="(aborts at run-time)" ;;
compfail:*) msg="(compiles!)" ;;
......@@ -85,7 +103,7 @@ EOF
ok:*) msg="(exits with \$?=$estatus)" ;;
*) ;;
esac
if test -d $dir; then
if test x"$msg" != x"(ok)"; then
if test "$xfail" = "no"; then
echo "FAIL: $test $msg" >&2
failures=`expr $failures + 1`
......
2003-08-07 Nicolas Burrus <burrus_n@lrde.epita.fr>
* dev/thanks.texi: Update.
* dev/srctree.texi: Likewise.
* dev/oln-dev.texi: Comment out design.texi.
2003-08-04 David Lesage <david@lrde.epita.fr>
* demo/image.cc: Fix.
2003-08-01 Nicolas Burrus <burrus_n@lrde.epita.fr>
* demo/Makefile.am: Compile image.cc.
2003-08-01 David Lesage <david@lrde.epita.fr>
* demo/image.cc: Fix. Add some FIXME waiting for binary_image.
2003-08-01 Nicolas Burrus <burrus_n@lrde.epita.fr>
* demo/test-reconstruction.cc: Move into
top_srcdir/olena/tests/morpho/tests/test-reconstruction.
* demo/Makefile.am: Adjust.
2003-07-31 Nicolas Burrus <burrus_n@lrde.epita.fr>
* demo/Makefile.am: Fix compilation flags.
* demo/test-reconstruction.cc: Fix namespaces.
2003-07-28 Nicolas Burrus <burrus_n@lrde.epita.fr>
* ref/Makefile.am: Fix compilation flags.
2003-07-12 Nicolas Burrus <burrus_n@lrde.epita.fr>
* ref/oln-ref.tex, ref/integre-ref.tex: Update.
......
## Process this file with Automake to produce Makefile.in -*-Makefile-*-
AM_CPPFLAGS = -DIMGDIR=\"$(top_srcdir)/olena/img\"
AM_CXXFLAGS = $(CXXFLAGS_STRICT) $(CXXFLAGS_OPTIMIZE)
AM_CXXFLAGS = $(CXXFLAGS_STRICT_ERRORS) $(CXXFLAGS_OPTIMIZE) $(ZLIB_CXXFLAGS)
AM_LDFLAGS = $(ZLIB_LDFLAGS)
# We used to declare these programs as `noinst_PROGRAMS', however
# building them on each run of `make' turned to
......@@ -10,11 +11,13 @@ AM_CXXFLAGS = $(CXXFLAGS_STRICT) $(CXXFLAGS_OPTIMIZE)
# ship the directory unbuilt, but still has to run make for
# the other directories).
# So for now we'll just build these programs on `make check' and `make demo'.
check_PROGRAMS = tour morpholena test-reconstruction convol-gaussian
check_PROGRAMS = image tour morpholena convol-gaussian
.PHONY: demo
demo: $(check_PROGRAMS)
image_SOURCES = image.cc
tour_SOURCES = tour.cc
morpholena_SOURCES = morpholena.cc \
morpholena-base.cc \
......@@ -26,7 +29,6 @@ morpholena_SOURCES = morpholena.cc \
morpholena-wshed.cc \
morpholena-wshed-beucher.cc
test_reconstruction_SOURCES = test-reconstruction.cc
convol_gaussian_SOURCES = convol-gaussian.cc
CLEANFILES = \
......
......@@ -3,7 +3,7 @@
#include <oln/basics3d.hh>
#include <mlc/type.hh>
#include <mlc/cmp.hh>
#include <oln/core/pred_image.hh>
#include <oln/core/abstract/image_with_type.hh>
#include <oln/arith/ops.hh>
#include <oln/arith/logic.hh>
#include <oln/io/basics.hh>
......@@ -12,6 +12,9 @@
using namespace oln;
using namespace ntg;
using std::cout;
using std::endl;
struct a_2dpred {
template<class T>
bin operator()(point2d p, T) const {
......@@ -20,36 +23,30 @@ struct a_2dpred {
};
template<class _I>
typename mute<_I>::ret
foo(const image<_I>& _input)
template<class I>
typename mute<I>::ret
foo(const abstract::image<I>& input)
{
Exact_cref(I, input);
std::cout << I::name() << std::endl;
typename mute<I>::ret output(input.size());
typename I::iter p(input);