* milena/mln/data/paste.spe.hh,
* milena/mln/data/stretch.hh,
* milena/mln/fun/x2v/bilinear.hh,
* milena/mln/morpho/erosion.hh,
* milena/mln/value/mixin.hh: Fix layout.
* milena/mln/debug/filename.hh: Update doc.
* milena/mln/subsampling/subsampling.hh: Fix invalid min rows and
cols.
---
milena/ChangeLog | 15 ++++++++++++
milena/mln/data/paste.spe.hh | 3 +-
milena/mln/data/stretch.hh | 41 +++++++++++++++++----------------
milena/mln/debug/filename.hh | 15 +++++------
milena/mln/fun/x2v/bilinear.hh | 3 +-
milena/mln/morpho/erosion.hh | 3 +-
milena/mln/subsampling/subsampling.hh | 9 +++++--
milena/mln/value/mixin.hh | 3 +-
scribo/src/debug/show_objects_thin.cc | 3 --
9 files changed, 57 insertions(+), 38 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 371f6d3..b6f9ce4 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,18 @@
+2009-10-22 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Small fixes.
+
+ * milena/mln/data/paste.spe.hh,
+ * milena/mln/data/stretch.hh,
+ * milena/mln/fun/x2v/bilinear.hh,
+ * milena/mln/morpho/erosion.hh,
+ * milena/mln/value/mixin.hh: Fix layout.
+
+ * milena/mln/debug/filename.hh: Update doc.
+
+ * milena/mln/subsampling/subsampling.hh: Fix invalid min rows and
+ cols.
+
2009-10-26 Roland Levillain <roland(a)lrde.epita.fr>
Regen Makefile helpers.
diff --git a/milena/mln/data/paste.spe.hh b/milena/mln/data/paste.spe.hh
index 30adca8..d071be8 100644
--- a/milena/mln/data/paste.spe.hh
+++ b/milena/mln/data/paste.spe.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
diff --git a/milena/mln/data/stretch.hh b/milena/mln/data/stretch.hh
index 8fa6517..90ba8c6 100644
--- a/milena/mln/data/stretch.hh
+++ b/milena/mln/data/stretch.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -79,7 +80,7 @@ namespace mln
template <typename V, typename I>
inline
mln_ch_value(I, V)
- stretch(const V& v, const Image<I>& input)
+ stretch(const V& v, const Image<I>& input)
{
trace::entering("data::impl::stretch");
@@ -91,25 +92,25 @@ namespace mln
mln_value(I) min_, max_;
estim::min_max(input, min_, max_);
if (max_ != min_)
- {
- //FIXME: we would like to use float instead of double but we
- //can't for precision reasons. See ticket #179.
- double
- min = double(min_),
- max = double(max_),
- epsilon = mln_epsilon(float),
- M = mln_max(V) + 0.5f - epsilon,
- m = 0.0f - 0.5f + epsilon,
- a = (M - m) / (max - min),
- b = (m * max - M * min) / (max - min);
- fun::v2v::linear_sat<mln_value(I), double, V> f(a, b);
- output = data::transform(input, f);
- }
+ {
+ //FIXME: we would like to use float instead of double but we
+ //can't for precision reasons. See ticket #179.
+ double
+ min = double(min_),
+ max = double(max_),
+ epsilon = mln_epsilon(float),
+ M = mln_max(V) + 0.5f - epsilon,
+ m = 0.0f - 0.5f + epsilon,
+ a = (M - m) / (max - min),
+ b = (m * max - M * min) / (max - min);
+ fun::v2v::linear_sat<mln_value(I), double, V> f(a, b);
+ output = data::transform(input, f);
+ }
else
- {
- initialize(output, input);
- trace::warning("output has no significative data!");
- }
+ {
+ initialize(output, input);
+ trace::warning("output has no significative data!");
+ }
trace::exiting("data::impl::stretch");
return output;
diff --git a/milena/mln/debug/filename.hh b/milena/mln/debug/filename.hh
index 1df7992..85def95 100644
--- a/milena/mln/debug/filename.hh
+++ b/milena/mln/debug/filename.hh
@@ -45,18 +45,17 @@ namespace mln
/*!
** The file name is formatted as follow:
**
- ** `filename_prefix`_`id`_`filename`_`postfix_id`
+ ** `filename_prefix`_`id`_`filename`
**
** Where:
** - `filename_prefix` can be set through the global variable
** debug::internal::filename_prefix.
- ** - `id` is auto-incremented and cannot be controlled.
+ ** - `postfix_id` is autoincremented by default. Its value can be
+ forced.
** - `filename` is the given filename
- ** - `postfix_id` is an optional counter which can be controlled contrary
- ** to `id`.
*/
std::string
- filename(const std::string& filename, int postfix_id);
+ filename(const std::string& filename, int id);
# ifndef MLN_INCLUDE_ONLY
@@ -66,7 +65,7 @@ namespace mln
std::string filename_prefix = "";
- } // end of namespace scribo::make::internal
+ } // end of namespace mln::debug::internal
inline
@@ -80,7 +79,7 @@ namespace mln
if (! internal::filename_prefix.empty())
os << internal::filename_prefix << "_";
- if (id >= 0)
+ if (id == -1)
{
if (file_id < 10)
os << "0";
@@ -90,7 +89,7 @@ namespace mln
os << file_id++;
}
else
- os << "_" << id;
+ os << id;
os << "_"
<< filename;
diff --git a/milena/mln/fun/x2v/bilinear.hh b/milena/mln/fun/x2v/bilinear.hh
index ab0786d..0b2dbd2 100644
--- a/milena/mln/fun/x2v/bilinear.hh
+++ b/milena/mln/fun/x2v/bilinear.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
diff --git a/milena/mln/morpho/erosion.hh b/milena/mln/morpho/erosion.hh
index 477de6c..9946d7e 100644
--- a/milena/mln/morpho/erosion.hh
+++ b/milena/mln/morpho/erosion.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
diff --git a/milena/mln/subsampling/subsampling.hh
b/milena/mln/subsampling/subsampling.hh
index 4cb376d..60ee3c0 100644
--- a/milena/mln/subsampling/subsampling.hh
+++ b/milena/mln/subsampling/subsampling.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -66,8 +67,10 @@ namespace mln
mln_concrete(image2d<T>) output(geom::nrows(input) / gap,
geom::ncols(input) / gap);
- for (unsigned j = 0; j < geom::ncols(output); ++j)
- for (unsigned i = 0; i < geom::nrows(output); ++i)
+ for (def::coord j = geom::min_col(output);
+ j <= geom::max_col(output); ++j)
+ for (def::coord i = geom::min_row(output);
+ i <= geom::max_row(output); ++i)
{
point2d p1(i, j);
point2d p2(first_p[0] + i * gap, first_p[1] + j * gap);
diff --git a/milena/mln/value/mixin.hh b/milena/mln/value/mixin.hh
index ed7ef51..a917344 100644
--- a/milena/mln/value/mixin.hh
+++ b/milena/mln/value/mixin.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
diff --git a/scribo/src/debug/show_objects_thin.cc
b/scribo/src/debug/show_objects_thin.cc
index 6b61168..e69de29 100644
--- a/scribo/src/debug/show_objects_thin.cc
+++ b/scribo/src/debug/show_objects_thin.cc
@@ -1,3 +0,0 @@
-// FIXME: Dummy main to have this program compile and link. Populate
-// with an actual test case.
-int main() {}
--
1.5.6.5