>>>> "Damien" == Damien Thivolle
<damien(a)lrde.epita.fr> writes:
Damien>
https://svn/svn/oln/prototypes/proto-1.0/olena
Index: ChangeLog
from Damien Thivolle <damien(a)lrde.epita.fr>
Rewrite reconstruction classes.
* tests/morpho/tests/reconstruction: Now use builtin
types.
* oln/funobj/invert.hh: Add bool and unsigned char inversion.
* oln/core/abstract/image_typeness.hh: Add rules (unsigned char, char
and ntg::real_value) for greylevel_image.
* oln/morpho/reconstruction.hh: Now support grey level images.
* oln/morpho/local.hh: Add new functions for handling neighborhood.
* oln/morpho/reconstruction_by_dilation.hh: Add grey level
specialization and use new functions from local.hh.
* oln/morpho/reconstruction_selfdual.hh: Likewise.
* oln/morpho/reconstruction_by_erosion.hh: Likewise.
* oln/canvas/reconstruction.hh: Now use mlc::is_a to check if the input
images have a neighborhood. A bit of cleaning.
[...]
Index: oln/funobj/invert.hh
--- oln/funobj/invert.hh (revision 275)
+++ oln/funobj/invert.hh (working copy)
@@ -44,6 +44,16 @@
// (not: either -x or 1/x or min<->max or?)
struct invert
{
+ unsigned char operator()(const unsigned char& v) const
+ {
+ return 255 - v;
What about UCHAR_MAX? I know char's size is fixed, but nevertheless.