* doc/tutorial/image_types.txt,
* sandbox/abraham/mln/level/thru.hh,
* sandbox/abraham/mln/morpho/autarkical_leveling.hh,
* sandbox/abraham/mln/morpho/hit_or_miss.hh,
* sandbox/abraham/mln/morpho/vector_median.hh,
* sandbox/abraham/mln/morpho/vmt.hh,
* sandbox/ballas/color/reference.cc,
* sandbox/ballas/refactorization/rle_image.hh,
* sandbox/duhamel/border_duplicate.cc,
* sandbox/duhamel/border_duplicate.hh,
* sandbox/duhamel/border_fill.cc,
* sandbox/duhamel/border_fill.hh,
* sandbox/duhamel/border_mirror.hh,
* sandbox/duhamel/debug_print_3d_with_border.hh,
* sandbox/duhamel/mesh_image.hh,
* sandbox/duhamel/translate_image.hh,
* sandbox/folio/chamfer.cc,
* sandbox/folio/dt.hh,
* sandbox/folio/dt/canvas_dt.hh,
* sandbox/folio/dt/chamfer.hh,
* sandbox/folio/dt/cp.hh,
* sandbox/folio/dt/dmap.hh,
* sandbox/folio/dt/path.hh,
* sandbox/folio/dt/raw_cp_fast.hh,
* sandbox/folio/dt/raw_cp_slow.hh,
* sandbox/folio/dt/raw_dmap_fast.hh,
* sandbox/folio/dt/raw_dmap_slow.hh,
* sandbox/folio/dt/raw_path_fast.hh,
* sandbox/folio/dt/raw_path_slow.hh,
* sandbox/folio/naive.cc,
* sandbox/folio/psn.cc,
* sandbox/folio/psn_log.cc,
* sandbox/folio/test/canvas/dt.hh,
* sandbox/folio/test/naive.cc,
* sandbox/folio/test/psn.cc,
* sandbox/folio/test/psn_log.cc,
* sandbox/garrigues/fllt/compute_level_set_fast2.hh,
* sandbox/garrigues/fllt/types.hh,
* sandbox/garrigues/image_identity/interpolated.hh,
* sandbox/garrigues/tiled_image2d/tiled_image2d.hh,
* sandbox/garrigues/union_find/reconstructions_on_function.hh,
* sandbox/garrigues/union_find/reconstructions_on_set.hh,
* sandbox/garrigues/union_find/self_dual_reconstruction.hh,
* sandbox/geraud/Rd/min.cc,
* sandbox/geraud/Rd/utils.hh,
* sandbox/geraud/browsing/fwd.hh,
* sandbox/geraud/dead/instant.hh,
* sandbox/geraud/dmap.cc,
* sandbox/geraud/estimate.hh,
* sandbox/inim/binarization/binarization.hh,
* sandbox/jardonnet/registration/chamfer.hh,
* sandbox/jardonnet/subsampling/gaussian_subsampling.hh,
* sandbox/jardonnet/subsampling/sub_sampled_image.hh,
* sandbox/nivault/plugin-gimp/src/gimp-image.hh,
* sandbox/vigouroux/moyenne.cc,
* tests/core/image/graph_image.cc,
* tests/core/image/line_graph_image.cc,
* tests/core/other/graph_elt_neighborhood.cc,
* tests/core/other/graph_elt_window.cc,
* tests/core/other/line_graph_elt_neighborhood.cc,
* tests/core/other/line_graph_elt_window.cc,
* tests/fun/v2v/rgb_hsi_conversion.cc,
* tests/morpho/complex_image_morpho.cc,
* tests/morpho/graph_image_morpho.cc,
* tests/morpho/graph_image_wst.cc,
* tests/morpho/line_graph_image_morpho.cc,
* tests/morpho/line_graph_image_wst.cc,
* tools/area_flooding.cc,
* trash/display_color_pretty.hh,
* trash/display_save.hh,
* trash/fi_adaptor.hh,
* trash/graph_image.hh,
* trash/line_graph_image.hh,
* trash/neighb_get.hh,
* trash/neighb_image.hh,
* trash/translate_image.hh: rename in these files.
---
milena/ChangeLog | 81 ++++++++++++++++++++
milena/doc/tutorial/image_types.txt | 4 +-
milena/sandbox/abraham/mln/level/thru.hh | 2 +-
.../abraham/mln/morpho/autarkical_leveling.hh | 2 +-
milena/sandbox/abraham/mln/morpho/hit_or_miss.hh | 2 +-
milena/sandbox/abraham/mln/morpho/vector_median.hh | 2 +-
milena/sandbox/abraham/mln/morpho/vmt.hh | 2 +-
milena/sandbox/ballas/color/reference.cc | 4 +-
milena/sandbox/ballas/refactorization/rle_image.hh | 6 +-
milena/sandbox/duhamel/border_duplicate.cc | 2 +-
milena/sandbox/duhamel/border_duplicate.hh | 8 +-
milena/sandbox/duhamel/border_fill.cc | 2 +-
milena/sandbox/duhamel/border_fill.hh | 12 ++--
milena/sandbox/duhamel/border_mirror.hh | 2 +-
.../sandbox/duhamel/debug_print_3d_with_border.hh | 2 +-
milena/sandbox/duhamel/mesh_image.hh | 2 +-
milena/sandbox/duhamel/translate_image.hh | 4 +-
milena/sandbox/folio/chamfer.cc | 2 +-
milena/sandbox/folio/dt.hh | 2 +-
milena/sandbox/folio/dt/canvas_dt.hh | 2 +-
milena/sandbox/folio/dt/chamfer.hh | 2 +-
milena/sandbox/folio/dt/cp.hh | 2 +-
milena/sandbox/folio/dt/dmap.hh | 2 +-
milena/sandbox/folio/dt/path.hh | 2 +-
milena/sandbox/folio/dt/raw_cp_fast.hh | 2 +-
milena/sandbox/folio/dt/raw_cp_slow.hh | 2 +-
milena/sandbox/folio/dt/raw_dmap_fast.hh | 2 +-
milena/sandbox/folio/dt/raw_dmap_slow.hh | 2 +-
milena/sandbox/folio/dt/raw_path_fast.hh | 2 +-
milena/sandbox/folio/dt/raw_path_slow.hh | 2 +-
milena/sandbox/folio/naive.cc | 2 +-
milena/sandbox/folio/psn.cc | 2 +-
milena/sandbox/folio/psn_log.cc | 2 +-
milena/sandbox/folio/test/canvas/dt.hh | 2 +-
milena/sandbox/folio/test/naive.cc | 2 +-
milena/sandbox/folio/test/psn.cc | 2 +-
milena/sandbox/folio/test/psn_log.cc | 2 +-
.../garrigues/fllt/compute_level_set_fast2.hh | 6 +-
milena/sandbox/garrigues/fllt/types.hh | 2 +-
.../garrigues/image_identity/interpolated.hh | 8 +-
.../garrigues/tiled_image2d/tiled_image2d.hh | 8 +-
.../union_find/reconstructions_on_function.hh | 12 ++--
.../garrigues/union_find/reconstructions_on_set.hh | 16 ++--
.../union_find/self_dual_reconstruction.hh | 4 +-
milena/sandbox/geraud/Rd/min.cc | 2 +-
milena/sandbox/geraud/Rd/utils.hh | 2 +-
milena/sandbox/geraud/browsing/fwd.hh | 6 +-
milena/sandbox/geraud/dead/instant.hh | 8 +-
milena/sandbox/geraud/dmap.cc | 2 +-
milena/sandbox/geraud/estimate.hh | 2 +-
milena/sandbox/inim/binarization/binarization.hh | 2 +-
milena/sandbox/jardonnet/registration/chamfer.hh | 2 +-
.../jardonnet/subsampling/gaussian_subsampling.hh | 2 +-
.../jardonnet/subsampling/sub_sampled_image.hh | 10 +-
.../sandbox/nivault/plugin-gimp/src/gimp-image.hh | 16 ++--
milena/sandbox/vigouroux/moyenne.cc | 2 +-
milena/tests/core/image/graph_image.cc | 5 +-
milena/tests/core/image/line_graph_image.cc | 5 +-
milena/tests/core/other/graph_elt_neighborhood.cc | 3 +-
milena/tests/core/other/graph_elt_window.cc | 3 +-
.../core/other/line_graph_elt_neighborhood.cc | 3 +-
milena/tests/core/other/line_graph_elt_window.cc | 5 +-
milena/tests/fun/v2v/rgb_hsi_conversion.cc | 5 +-
milena/tests/morpho/complex_image_morpho.cc | 5 +-
milena/tests/morpho/graph_image_morpho.cc | 3 +-
milena/tests/morpho/graph_image_wst.cc | 3 +-
milena/tests/morpho/line_graph_image_morpho.cc | 3 +-
milena/tests/morpho/line_graph_image_wst.cc | 3 +-
milena/tools/area_flooding.cc | 2 +-
milena/trash/display_color_pretty.hh | 2 +-
milena/trash/display_save.hh | 2 +-
milena/trash/fi_adaptor.hh | 14 ++--
milena/trash/graph_image.hh | 4 +-
milena/trash/line_graph_image.hh | 4 +-
milena/trash/neighb_get.hh | 2 +-
milena/trash/neighb_image.hh | 8 +-
milena/trash/translate_image.hh | 4 +-
77 files changed, 229 insertions(+), 150 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 1ab3eff..dbb1dea 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,86 @@
2008-12-31 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Propagate renaming has_data as is_valid.
+
+ * doc/tutorial/image_types.txt,
+ * sandbox/abraham/mln/level/thru.hh,
+ * sandbox/abraham/mln/morpho/autarkical_leveling.hh,
+ * sandbox/abraham/mln/morpho/hit_or_miss.hh,
+ * sandbox/abraham/mln/morpho/vector_median.hh,
+ * sandbox/abraham/mln/morpho/vmt.hh,
+ * sandbox/ballas/color/reference.cc,
+ * sandbox/ballas/refactorization/rle_image.hh,
+ * sandbox/duhamel/border_duplicate.cc,
+ * sandbox/duhamel/border_duplicate.hh,
+ * sandbox/duhamel/border_fill.cc,
+ * sandbox/duhamel/border_fill.hh,
+ * sandbox/duhamel/border_mirror.hh,
+ * sandbox/duhamel/debug_print_3d_with_border.hh,
+ * sandbox/duhamel/mesh_image.hh,
+ * sandbox/duhamel/translate_image.hh,
+ * sandbox/folio/chamfer.cc,
+ * sandbox/folio/dt.hh,
+ * sandbox/folio/dt/canvas_dt.hh,
+ * sandbox/folio/dt/chamfer.hh,
+ * sandbox/folio/dt/cp.hh,
+ * sandbox/folio/dt/dmap.hh,
+ * sandbox/folio/dt/path.hh,
+ * sandbox/folio/dt/raw_cp_fast.hh,
+ * sandbox/folio/dt/raw_cp_slow.hh,
+ * sandbox/folio/dt/raw_dmap_fast.hh,
+ * sandbox/folio/dt/raw_dmap_slow.hh,
+ * sandbox/folio/dt/raw_path_fast.hh,
+ * sandbox/folio/dt/raw_path_slow.hh,
+ * sandbox/folio/naive.cc,
+ * sandbox/folio/psn.cc,
+ * sandbox/folio/psn_log.cc,
+ * sandbox/folio/test/canvas/dt.hh,
+ * sandbox/folio/test/naive.cc,
+ * sandbox/folio/test/psn.cc,
+ * sandbox/folio/test/psn_log.cc,
+ * sandbox/garrigues/fllt/compute_level_set_fast2.hh,
+ * sandbox/garrigues/fllt/types.hh,
+ * sandbox/garrigues/image_identity/interpolated.hh,
+ * sandbox/garrigues/tiled_image2d/tiled_image2d.hh,
+ * sandbox/garrigues/union_find/reconstructions_on_function.hh,
+ * sandbox/garrigues/union_find/reconstructions_on_set.hh,
+ * sandbox/garrigues/union_find/self_dual_reconstruction.hh,
+ * sandbox/geraud/Rd/min.cc,
+ * sandbox/geraud/Rd/utils.hh,
+ * sandbox/geraud/browsing/fwd.hh,
+ * sandbox/geraud/dead/instant.hh,
+ * sandbox/geraud/dmap.cc,
+ * sandbox/geraud/estimate.hh,
+ * sandbox/inim/binarization/binarization.hh,
+ * sandbox/jardonnet/registration/chamfer.hh,
+ * sandbox/jardonnet/subsampling/gaussian_subsampling.hh,
+ * sandbox/jardonnet/subsampling/sub_sampled_image.hh,
+ * sandbox/nivault/plugin-gimp/src/gimp-image.hh,
+ * sandbox/vigouroux/moyenne.cc,
+ * tests/core/image/graph_image.cc,
+ * tests/core/image/line_graph_image.cc,
+ * tests/core/other/graph_elt_neighborhood.cc,
+ * tests/core/other/graph_elt_window.cc,
+ * tests/core/other/line_graph_elt_neighborhood.cc,
+ * tests/core/other/line_graph_elt_window.cc,
+ * tests/fun/v2v/rgb_hsi_conversion.cc,
+ * tests/morpho/complex_image_morpho.cc,
+ * tests/morpho/graph_image_morpho.cc,
+ * tests/morpho/graph_image_wst.cc,
+ * tests/morpho/line_graph_image_morpho.cc,
+ * tests/morpho/line_graph_image_wst.cc,
+ * tools/area_flooding.cc,
+ * trash/display_color_pretty.hh,
+ * trash/display_save.hh,
+ * trash/fi_adaptor.hh,
+ * trash/graph_image.hh,
+ * trash/line_graph_image.hh,
+ * trash/neighb_get.hh,
+ * trash/neighb_image.hh,
+ * trash/translate_image.hh: rename in these files.
+
+2008-12-31 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Rename at() to at_().
* mln/core/image/image1d.hh,
diff --git a/milena/doc/tutorial/image_types.txt b/milena/doc/tutorial/image_types.txt
index 89ef349..1bb2bd9 100644
--- a/milena/doc/tutorial/image_types.txt
+++ b/milena/doc/tutorial/image_types.txt
@@ -406,10 +406,10 @@ used to define ::location.
*** about the image variable
-**** has_data
+**** is_valid
sig is:
-bool has_data() const
+bool is_valid() const
is "is_allocated" / "is_ready" a better name?
diff --git a/milena/sandbox/abraham/mln/level/thru.hh
b/milena/sandbox/abraham/mln/level/thru.hh
index 22aa880..c5189c4 100644
--- a/milena/sandbox/abraham/mln/level/thru.hh
+++ b/milena/sandbox/abraham/mln/level/thru.hh
@@ -98,7 +98,7 @@ namespace mln
{
trace::entering("level::apply");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
impl::apply_(mln_trait_image_speed(I)(), exact(input),
exact(f));
diff --git a/milena/sandbox/abraham/mln/morpho/autarkical_leveling.hh
b/milena/sandbox/abraham/mln/morpho/autarkical_leveling.hh
index 1a71b75..d4541ae 100644
--- a/milena/sandbox/abraham/mln/morpho/autarkical_leveling.hh
+++ b/milena/sandbox/abraham/mln/morpho/autarkical_leveling.hh
@@ -137,7 +137,7 @@ namespace mln
autarkical_leveling(const Image<I>& input, const Image<I>&
marker, const Window<W>& win)
{
trace::entering("morpho::autarkical_leveling");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = impl::autarkical_leveling(input, marker, win);
diff --git a/milena/sandbox/abraham/mln/morpho/hit_or_miss.hh
b/milena/sandbox/abraham/mln/morpho/hit_or_miss.hh
index 94f8f99..3c975cf 100644
--- a/milena/sandbox/abraham/mln/morpho/hit_or_miss.hh
+++ b/milena/sandbox/abraham/mln/morpho/hit_or_miss.hh
@@ -61,7 +61,7 @@ namespace mln
mln_concrete(I) hit_or_miss(const Image<I>& input, const
Window<Wout>& win_out, const Window<Win>& win_in)
{
trace::entering("morpho::hit_or_miss");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win_out).is_empty());
mln_precondition(! exact(win_in).is_empty());
diff --git a/milena/sandbox/abraham/mln/morpho/vector_median.hh
b/milena/sandbox/abraham/mln/morpho/vector_median.hh
index 05b2a4c..177bb3a 100644
--- a/milena/sandbox/abraham/mln/morpho/vector_median.hh
+++ b/milena/sandbox/abraham/mln/morpho/vector_median.hh
@@ -110,7 +110,7 @@ namespace mln
vector_median(const Image<I>& input, const Window<W>& win)
{
trace::entering("morpho::vector_median");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = impl::vector_median(input, win);
diff --git a/milena/sandbox/abraham/mln/morpho/vmt.hh
b/milena/sandbox/abraham/mln/morpho/vmt.hh
index ab5321d..761912e 100644
--- a/milena/sandbox/abraham/mln/morpho/vmt.hh
+++ b/milena/sandbox/abraham/mln/morpho/vmt.hh
@@ -107,7 +107,7 @@ namespace mln
vmt(const Image<I>& input, const Window<W>& win)
{
trace::entering("morpho::vector_median");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = impl::vector_median(input, win);
diff --git a/milena/sandbox/ballas/color/reference.cc
b/milena/sandbox/ballas/color/reference.cc
index c967789..411cd20 100644
--- a/milena/sandbox/ballas/color/reference.cc
+++ b/milena/sandbox/ballas/color/reference.cc
@@ -56,7 +56,7 @@ namespace mln
void
gaussian_2nd_derivative(const Image<I>& input, float sigma,
Image<O>& output)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
impl::recursivefilter_coef_
coef(-1.331f, 3.661f,
@@ -73,7 +73,7 @@ namespace mln
void
gaussian_1st_derivative(const Image<I>& input, float sigma,
Image<O>& output)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
impl::recursivefilter_coef_
coef(-0.6472f, -4.531f,
diff --git a/milena/sandbox/ballas/refactorization/rle_image.hh
b/milena/sandbox/ballas/refactorization/rle_image.hh
index b0480c3..b34ee5c 100644
--- a/milena/sandbox/ballas/refactorization/rle_image.hh
+++ b/milena/sandbox/ballas/refactorization/rle_image.hh
@@ -33,7 +33,7 @@ namespace mln
void insert(const p_run<P>& pr, T value);
rvalue operator() (const rle_psite<P>& psite) const;
lvalue operator() (const rle_psite<P>& psite);
- bool has_data() const;
+ bool is_valid() const;
bool has(const rle_psite<P>& ps) const;
const pset& domain() const;
@@ -55,7 +55,7 @@ namespace mln
template <typename P, typename T>
inline
bool
- rle_image<P, T>::has_data() const
+ rle_image<P, T>::is_valid() const
{
return this->values_.size() != 0;
}
@@ -101,7 +101,7 @@ namespace mln
bool
rle_image<P, T>::has(const rle_psite<P>& ps) const
{
- if (!this->has_data())
+ if (!this->is_valid())
return false;
else
return (ps.p_of_run() < this->domain_.nruns() &&
diff --git a/milena/sandbox/duhamel/border_duplicate.cc
b/milena/sandbox/duhamel/border_duplicate.cc
index 72815e9..4379aff 100644
--- a/milena/sandbox/duhamel/border_duplicate.cc
+++ b/milena/sandbox/duhamel/border_duplicate.cc
@@ -46,7 +46,7 @@ template <typename I>
void print_3d_with_border (const Fast_Image<I>& input_)
{
const I& ima = exact(input_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
typedef mln_point(I) P;
diff --git a/milena/sandbox/duhamel/border_duplicate.hh
b/milena/sandbox/duhamel/border_duplicate.hh
index 2438590..a037c73 100644
--- a/milena/sandbox/duhamel/border_duplicate.hh
+++ b/milena/sandbox/duhamel/border_duplicate.hh
@@ -71,7 +71,7 @@ namespace mln
void duplicate_1d_(const Fast_Image<I>& ima_)
{
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
typedef mln_psite(I) P;
typename I::line_piter pl(ima.domain());
@@ -90,7 +90,7 @@ namespace mln
void duplicate_2d_(const Fast_Image<I>& ima_)
{
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
typedef mln_psite(I) P;
typename I::line_piter pl(ima.domain());
@@ -129,7 +129,7 @@ namespace mln
void duplicate_3d_(const Fast_Image<I>& ima_)
{
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
typedef mln_psite(I) P;
typename I::line_piter pl(ima.domain());
@@ -198,7 +198,7 @@ namespace mln
{
typedef mln_psite(I) P;
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
if (!ima.border ())
return;
diff --git a/milena/sandbox/duhamel/border_fill.cc
b/milena/sandbox/duhamel/border_fill.cc
index 3fc2380..dad46c1 100644
--- a/milena/sandbox/duhamel/border_fill.cc
+++ b/milena/sandbox/duhamel/border_fill.cc
@@ -44,7 +44,7 @@ template <typename I>
void print_3d_with_border (const Fast_Image<I>& input_)
{
const I& ima = exact(input_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
typedef mln_point(I) P;
diff --git a/milena/sandbox/duhamel/border_fill.hh
b/milena/sandbox/duhamel/border_fill.hh
index 1179483..44ca897 100644
--- a/milena/sandbox/duhamel/border_fill.hh
+++ b/milena/sandbox/duhamel/border_fill.hh
@@ -66,7 +66,7 @@ namespace mln
void fill_1d_size_1_(const Fast_Image<I>& ima_, const mln_value(I)&
v)
{
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
typedef mln_psite(I) P;
std::size_t border = ima.border ();
@@ -85,7 +85,7 @@ namespace mln
void fill_1d_size_n_(const Fast_Image<I>& ima_, const mln_value(I)&
v)
{
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
typedef mln_psite(I) P;
std::size_t border = ima.border ();
@@ -104,7 +104,7 @@ namespace mln
void fill_2d_size_1_(const Fast_Image<I>& ima_, const mln_value(I)&
v)
{
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
typedef mln_psite(I) P;
@@ -137,7 +137,7 @@ namespace mln
void fill_2d_size_n_(const Fast_Image<I>& ima_, const mln_value(I)&
v)
{
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
typedef mln_psite(I) P;
@@ -167,7 +167,7 @@ namespace mln
// void fill_3d_size_n_(const Fast_Image<I>& ima_, const
mln_value(I)& v)
// {
// const I& ima = exact(ima_);
-// mln_precondition(ima.has_data());
+// mln_precondition(ima.is_valid());
// typedef mln_psite(I) P;
@@ -272,7 +272,7 @@ namespace mln
{
typedef mln_psite(I) P;
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
if (!ima.border ())
return;
diff --git a/milena/sandbox/duhamel/border_mirror.hh
b/milena/sandbox/duhamel/border_mirror.hh
index ab12649..ad2e1ee 100644
--- a/milena/sandbox/duhamel/border_mirror.hh
+++ b/milena/sandbox/duhamel/border_mirror.hh
@@ -69,7 +69,7 @@ namespace mln
void mirror(const Fast_Image<I>& ima_)
{
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
// internal::fixme();
// FIX
std::size_t border = ima.border ();
diff --git a/milena/sandbox/duhamel/debug_print_3d_with_border.hh
b/milena/sandbox/duhamel/debug_print_3d_with_border.hh
index 0be0f6c..8df962a 100644
--- a/milena/sandbox/duhamel/debug_print_3d_with_border.hh
+++ b/milena/sandbox/duhamel/debug_print_3d_with_border.hh
@@ -41,7 +41,7 @@ namespace mln
void print_3d_with_border (const Fast_Image<I>& input_)
{
const I& ima = exact(input_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
typedef mln_psite(I) P;
diff --git a/milena/sandbox/duhamel/mesh_image.hh b/milena/sandbox/duhamel/mesh_image.hh
index 087e5f7..3c740d8 100644
--- a/milena/sandbox/duhamel/mesh_image.hh
+++ b/milena/sandbox/duhamel/mesh_image.hh
@@ -178,7 +178,7 @@ namespace mln
const mesh_p<P>&
mesh_image<P, V>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->mesh_;
}
diff --git a/milena/sandbox/duhamel/translate_image.hh
b/milena/sandbox/duhamel/translate_image.hh
index 7cdedf3..1fa4144 100644
--- a/milena/sandbox/duhamel/translate_image.hh
+++ b/milena/sandbox/duhamel/translate_image.hh
@@ -98,7 +98,7 @@ namespace mln
typedef translate_image< tag::image_<I> > skeleton;
/// Test if a pixel value is accessible at \p p.
- using super_::has_data;
+ using super_::is_valid;
/// Constructors.
translate_image(I& ima, const mln_dpsite(I) dp);
@@ -146,7 +146,7 @@ namespace mln
template <typename I>
translate_image<I>::translate_image(I& ima, const mln_dpsite(I) dp)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
this->data_ = new internal::data_< translate_image<I> >(ima, dp);
}
diff --git a/milena/sandbox/folio/chamfer.cc b/milena/sandbox/folio/chamfer.cc
index 3ed603c..9390a66 100644
--- a/milena/sandbox/folio/chamfer.cc
+++ b/milena/sandbox/folio/chamfer.cc
@@ -115,7 +115,7 @@ namespace mln
typedef w_window<mln_dpoint(I), T> W;
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_ch_value(I, T) outputDistance;
initialize(outputDistance, input);
diff --git a/milena/sandbox/folio/dt.hh b/milena/sandbox/folio/dt.hh
index b93accb..b69a8c1 100644
--- a/milena/sandbox/folio/dt.hh
+++ b/milena/sandbox/folio/dt.hh
@@ -82,7 +82,7 @@ namespace mln
dt(const Image<I>& input, const N& nbh, unsigned max)
{
trace::entering("dt::dt");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_ch_value(I, L) output =
impl::dt_(mln_trait_image_speed(I)(),
diff --git a/milena/sandbox/folio/dt/canvas_dt.hh b/milena/sandbox/folio/dt/canvas_dt.hh
index dd5170b..aa225b0 100644
--- a/milena/sandbox/folio/dt/canvas_dt.hh
+++ b/milena/sandbox/folio/dt/canvas_dt.hh
@@ -90,7 +90,7 @@ namespace mln
dt<F>::init()
{
// Preconditions.
- mln_precondition(f.input.has_data());
+ mln_precondition(f.input.is_valid());
f.init(); //< f call.
diff --git a/milena/sandbox/folio/dt/chamfer.hh b/milena/sandbox/folio/dt/chamfer.hh
index e031f51..9719651 100644
--- a/milena/sandbox/folio/dt/chamfer.hh
+++ b/milena/sandbox/folio/dt/chamfer.hh
@@ -115,7 +115,7 @@ namespace mln
typedef w_window<mln_dpoint(I), T> W;
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_ch_value(I, T) outputDistance;
initialize(outputDistance, input);
diff --git a/milena/sandbox/folio/dt/cp.hh b/milena/sandbox/folio/dt/cp.hh
index a17230b..2083bfa 100644
--- a/milena/sandbox/folio/dt/cp.hh
+++ b/milena/sandbox/folio/dt/cp.hh
@@ -102,7 +102,7 @@ namespace mln
cp(const Image<I>& input, const N& nbh, unsigned max)
{
trace::entering("dt::cp");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
typedef impl::cp_functor<I, N> F;
F f(exact(input), nbh, max);
diff --git a/milena/sandbox/folio/dt/dmap.hh b/milena/sandbox/folio/dt/dmap.hh
index b914834..fdfff7f 100644
--- a/milena/sandbox/folio/dt/dmap.hh
+++ b/milena/sandbox/folio/dt/dmap.hh
@@ -100,7 +100,7 @@ namespace mln
dmap(const Image<I>& input, const N& nbh, unsigned max)
{
trace::entering("dt::dmap");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
typedef impl::dmap_functor<I, N> F;
F f(exact(input), nbh, max);
diff --git a/milena/sandbox/folio/dt/path.hh b/milena/sandbox/folio/dt/path.hh
index 475d38a..f61d3f6 100644
--- a/milena/sandbox/folio/dt/path.hh
+++ b/milena/sandbox/folio/dt/path.hh
@@ -102,7 +102,7 @@ namespace mln
path(const Image<I>& input, const N& nbh, unsigned max)
{
trace::entering("dt::path");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
typedef impl::path_functor<I, N> F;
F f(exact(input), nbh, max);
diff --git a/milena/sandbox/folio/dt/raw_cp_fast.hh
b/milena/sandbox/folio/dt/raw_cp_fast.hh
index 44e8e27..27b77ba 100644
--- a/milena/sandbox/folio/dt/raw_cp_fast.hh
+++ b/milena/sandbox/folio/dt/raw_cp_fast.hh
@@ -78,7 +78,7 @@ namespace mln
{
// Preconditions.
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// Types.
typedef mln_point(I) point;
diff --git a/milena/sandbox/folio/dt/raw_cp_slow.hh
b/milena/sandbox/folio/dt/raw_cp_slow.hh
index 18389d7..84eae57 100644
--- a/milena/sandbox/folio/dt/raw_cp_slow.hh
+++ b/milena/sandbox/folio/dt/raw_cp_slow.hh
@@ -77,7 +77,7 @@ namespace mln
{
// Preconditions.
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// Types.
typedef mln_point(I) point;
diff --git a/milena/sandbox/folio/dt/raw_dmap_fast.hh
b/milena/sandbox/folio/dt/raw_dmap_fast.hh
index bf80dab..712b82b 100644
--- a/milena/sandbox/folio/dt/raw_dmap_fast.hh
+++ b/milena/sandbox/folio/dt/raw_dmap_fast.hh
@@ -77,7 +77,7 @@ namespace mln
{
// Preconditions.
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// Types.
typedef mln_point(I) point;
diff --git a/milena/sandbox/folio/dt/raw_dmap_slow.hh
b/milena/sandbox/folio/dt/raw_dmap_slow.hh
index 838e816..22c9f94 100644
--- a/milena/sandbox/folio/dt/raw_dmap_slow.hh
+++ b/milena/sandbox/folio/dt/raw_dmap_slow.hh
@@ -77,7 +77,7 @@ namespace mln
{
// Preconditions.
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// Types.
typedef mln_point(I) point;
diff --git a/milena/sandbox/folio/dt/raw_path_fast.hh
b/milena/sandbox/folio/dt/raw_path_fast.hh
index 1d5f1d7..3a3f32b 100644
--- a/milena/sandbox/folio/dt/raw_path_fast.hh
+++ b/milena/sandbox/folio/dt/raw_path_fast.hh
@@ -78,7 +78,7 @@ namespace mln
{
// Preconditions.
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// Types.
typedef mln_point(I) point;
diff --git a/milena/sandbox/folio/dt/raw_path_slow.hh
b/milena/sandbox/folio/dt/raw_path_slow.hh
index f1d7472..40adf52 100644
--- a/milena/sandbox/folio/dt/raw_path_slow.hh
+++ b/milena/sandbox/folio/dt/raw_path_slow.hh
@@ -77,7 +77,7 @@ namespace mln
{
// Preconditions.
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// Types.
typedef mln_point(I) point;
diff --git a/milena/sandbox/folio/naive.cc b/milena/sandbox/folio/naive.cc
index 348a89b..9b1aff8 100644
--- a/milena/sandbox/folio/naive.cc
+++ b/milena/sandbox/folio/naive.cc
@@ -72,7 +72,7 @@ namespace mln
{
const I& input = exact(input_);
const F& fun = exact(fun_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_ch_value(I, mln_result(F)) output;
initialize(output, input);
diff --git a/milena/sandbox/folio/psn.cc b/milena/sandbox/folio/psn.cc
index a47627c..b9c9e7f 100644
--- a/milena/sandbox/folio/psn.cc
+++ b/milena/sandbox/folio/psn.cc
@@ -77,7 +77,7 @@ namespace mln
{
// Preconditions.
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// Types.
typedef mln_point(I) point;
diff --git a/milena/sandbox/folio/psn_log.cc b/milena/sandbox/folio/psn_log.cc
index 2c6c3e3..5f0816c 100644
--- a/milena/sandbox/folio/psn_log.cc
+++ b/milena/sandbox/folio/psn_log.cc
@@ -148,7 +148,7 @@ namespace mln
psn(const Image<I>& input_, const N& nbh)
{
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_ch_value(I, unsigned) D;
initialize(D, input);
diff --git a/milena/sandbox/folio/test/canvas/dt.hh
b/milena/sandbox/folio/test/canvas/dt.hh
index 06b186c..4557ca6 100644
--- a/milena/sandbox/folio/test/canvas/dt.hh
+++ b/milena/sandbox/folio/test/canvas/dt.hh
@@ -82,7 +82,7 @@ namespace mln
dt(const Image<I>& input, const N& nbh, const unsigned max)
{
trace::entering("dt::dt");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_ch_value(I, L) output =
impl::dt_(mln_trait_image_speed(I)(),
diff --git a/milena/sandbox/folio/test/naive.cc b/milena/sandbox/folio/test/naive.cc
index 348a89b..9b1aff8 100644
--- a/milena/sandbox/folio/test/naive.cc
+++ b/milena/sandbox/folio/test/naive.cc
@@ -72,7 +72,7 @@ namespace mln
{
const I& input = exact(input_);
const F& fun = exact(fun_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_ch_value(I, mln_result(F)) output;
initialize(output, input);
diff --git a/milena/sandbox/folio/test/psn.cc b/milena/sandbox/folio/test/psn.cc
index a47627c..b9c9e7f 100644
--- a/milena/sandbox/folio/test/psn.cc
+++ b/milena/sandbox/folio/test/psn.cc
@@ -77,7 +77,7 @@ namespace mln
{
// Preconditions.
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// Types.
typedef mln_point(I) point;
diff --git a/milena/sandbox/folio/test/psn_log.cc b/milena/sandbox/folio/test/psn_log.cc
index 2c6c3e3..5f0816c 100644
--- a/milena/sandbox/folio/test/psn_log.cc
+++ b/milena/sandbox/folio/test/psn_log.cc
@@ -148,7 +148,7 @@ namespace mln
psn(const Image<I>& input_, const N& nbh)
{
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_ch_value(I, unsigned) D;
initialize(D, input);
diff --git a/milena/sandbox/garrigues/fllt/compute_level_set_fast2.hh
b/milena/sandbox/garrigues/fllt/compute_level_set_fast2.hh
index 037e5cb..0118c8b 100644
--- a/milena/sandbox/garrigues/fllt/compute_level_set_fast2.hh
+++ b/milena/sandbox/garrigues/fllt/compute_level_set_fast2.hh
@@ -105,12 +105,12 @@ namespace mln
// p_image2d_fwd_pixter<point2d> qa(A);
image_sub_if_value ima(r_a_n.image() | SET_A);
- mln_assertion(ima.has_data());
+ mln_assertion(ima.is_valid());
image_sub_if_value::fwd_piter qa(ima.domain());
- mln_assertion(ima.has_data());
+ mln_assertion(ima.is_valid());
for_all(qa)
{
- mln_assertion(ima.has_data());
+ mln_assertion(ima.is_valid());
mln_niter(neighb2d) n(F::reg_nbh(), qa);
for_all (n)
if (u.has(n) && !r_a_n.belongs_to<SET_R>(n) &&
diff --git a/milena/sandbox/garrigues/fllt/types.hh
b/milena/sandbox/garrigues/fllt/types.hh
index 8828668..7afbd16 100644
--- a/milena/sandbox/garrigues/fllt/types.hh
+++ b/milena/sandbox/garrigues/fllt/types.hh
@@ -196,7 +196,7 @@ namespace mln
ran_domains::image()
{
mln_precondition(nsites_ > 0);
- mln_assertion(ima_.has_data());
+ mln_assertion(ima_.is_valid());
return ima_ | bb_.to_result();
}
diff --git a/milena/sandbox/garrigues/image_identity/interpolated.hh
b/milena/sandbox/garrigues/image_identity/interpolated.hh
index 9450bdb..14409ea 100644
--- a/milena/sandbox/garrigues/image_identity/interpolated.hh
+++ b/milena/sandbox/garrigues/image_identity/interpolated.hh
@@ -93,7 +93,7 @@ namespace mln
/// Test if this image has been initialized.
- bool has_data() const;
+ bool is_valid() const;
/// Test if a pixel value is accessible at \p p.
using super_::has;
@@ -132,7 +132,7 @@ namespace mln
template <typename I>
interpolated<I>::interpolated(I& ima)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
this->data_ = new internal::data_< interpolated<I> >(ima);
}
@@ -142,9 +142,9 @@ namespace mln
}
template <typename I>
- bool interpolated<I>::has_data() const
+ bool interpolated<I>::is_valid() const
{
- mln_invariant(this->data_->ima_.has_data());
+ mln_invariant(this->data_->ima_.is_valid());
return true;
}
diff --git a/milena/sandbox/garrigues/tiled_image2d/tiled_image2d.hh
b/milena/sandbox/garrigues/tiled_image2d/tiled_image2d.hh
index 40d83dc..cbc44cc 100644
--- a/milena/sandbox/garrigues/tiled_image2d/tiled_image2d.hh
+++ b/milena/sandbox/garrigues/tiled_image2d/tiled_image2d.hh
@@ -300,7 +300,7 @@ namespace mln
void
tiled_image2d<T>::init_(const box2d& b)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ = new internal::data_< tiled_image2d<T> >(b);
}
@@ -317,7 +317,7 @@ namespace mln
const box2d&
tiled_image2d<T>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_;
}
@@ -326,7 +326,7 @@ namespace mln
std::size_t
tiled_image2d<T>::nelements() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_.nsites();
}
@@ -335,7 +335,7 @@ namespace mln
bool
tiled_image2d<T>::has(const point2d& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_.has(p);
}
diff --git a/milena/sandbox/garrigues/union_find/reconstructions_on_function.hh
b/milena/sandbox/garrigues/union_find/reconstructions_on_function.hh
index a0f1faa..c42a7f6 100644
--- a/milena/sandbox/garrigues/union_find/reconstructions_on_function.hh
+++ b/milena/sandbox/garrigues/union_find/reconstructions_on_function.hh
@@ -132,8 +132,8 @@ namespace mln
const J& mask = exact(mask_);
const N& nbh = exact(nbh_);
- mln_precondition(marker.has_data());
- mln_precondition(mask.has_data());
+ mln_precondition(marker.is_valid());
+ mln_precondition(mask.is_valid());
mln_precondition(mask.domain() == marker.domain());
mln_precondition(marker <= mask);
@@ -164,8 +164,8 @@ namespace mln
const J& mask = exact(mask_);
const N& nbh = exact(nbh_);
- mln_precondition(marker.has_data());
- mln_precondition(mask.has_data());
+ mln_precondition(marker.is_valid());
+ mln_precondition(mask.is_valid());
mln_precondition(mask.domain() == marker.domain());
mln_precondition(marker >= mask);
@@ -197,8 +197,8 @@ namespace mln
const J& mask = exact(mask_);
const N& nbh = exact(nbh_);
- mln_precondition(marker.has_data());
- mln_precondition(mask.has_data());
+ mln_precondition(marker.is_valid());
+ mln_precondition(mask.is_valid());
mln_precondition(mask.domain() == marker.domain());
mln_precondition(marker <= mask);
diff --git a/milena/sandbox/garrigues/union_find/reconstructions_on_set.hh
b/milena/sandbox/garrigues/union_find/reconstructions_on_set.hh
index cbe16e3..b71e84e 100644
--- a/milena/sandbox/garrigues/union_find/reconstructions_on_set.hh
+++ b/milena/sandbox/garrigues/union_find/reconstructions_on_set.hh
@@ -135,8 +135,8 @@ namespace mln
{
trace::entering("morpho::reconstruction_on_set_by_dilation");
- mln_precondition(exact(marker).has_data());
- mln_precondition(exact(mask).has_data());
+ mln_precondition(exact(marker).is_valid());
+ mln_precondition(exact(mask).is_valid());
mln_precondition(exact(marker) <= exact(mask));
image2d<bool> output;
initialize(output, marker);
@@ -157,8 +157,8 @@ namespace mln
{
trace::entering("morpho::reconstruction_on_set_by_dilation_alt");
- mln_precondition(exact(marker).has_data());
- mln_precondition(exact(mask).has_data());
+ mln_precondition(exact(marker).is_valid());
+ mln_precondition(exact(mask).is_valid());
mln_precondition(exact(marker) <= exact(mask));
image2d<bool> output;
@@ -180,8 +180,8 @@ namespace mln
{
trace::entering("morpho::reconstruction_on_set_by_erosion");
- mln_precondition(exact(marker).has_data());
- mln_precondition(exact(mask).has_data());
+ mln_precondition(exact(marker).is_valid());
+ mln_precondition(exact(mask).is_valid());
mln_precondition(exact(marker) <= exact(mask));
image2d<bool> output;
@@ -203,8 +203,8 @@ namespace mln
{
trace::entering("morpho::reconstruction_on_set_by_erosion_alt");
- mln_precondition(exact(marker).has_data());
- mln_precondition(exact(mask).has_data());
+ mln_precondition(exact(marker).is_valid());
+ mln_precondition(exact(mask).is_valid());
mln_precondition(exact(marker) <= exact(mask));
image2d<bool> output;
diff --git a/milena/sandbox/garrigues/union_find/self_dual_reconstruction.hh
b/milena/sandbox/garrigues/union_find/self_dual_reconstruction.hh
index 16bc6a8..fa6ac1b 100644
--- a/milena/sandbox/garrigues/union_find/self_dual_reconstruction.hh
+++ b/milena/sandbox/garrigues/union_find/self_dual_reconstruction.hh
@@ -133,8 +133,8 @@ namespace mln
const J& mask = exact(mask_);
const N& nbh = exact(nbh_);
- mln_precondition(marker.has_data());
- mln_precondition(mask.has_data());
+ mln_precondition(marker.is_valid());
+ mln_precondition(mask.is_valid());
mln_precondition(mask.domain() == marker.domain());
mln_concrete(I) output;
diff --git a/milena/sandbox/geraud/Rd/min.cc b/milena/sandbox/geraud/Rd/min.cc
index 61e2ac1..99b8532 100644
--- a/milena/sandbox/geraud/Rd/min.cc
+++ b/milena/sandbox/geraud/Rd/min.cc
@@ -15,7 +15,7 @@ void usage(char* argv[])
template <typename I>
I min(const I& ima1, const I& ima2)
{
- mln_precondition(ima1.has_data() and ima2.has_data());
+ mln_precondition(ima1.is_valid() and ima2.is_valid());
mln_precondition(ima1.domain() == ima2.domain());
I out(ima1.domain());
mln_piter(I) p(ima1.domain());
diff --git a/milena/sandbox/geraud/Rd/utils.hh b/milena/sandbox/geraud/Rd/utils.hh
index f9c0150..656aec3 100644
--- a/milena/sandbox/geraud/Rd/utils.hh
+++ b/milena/sandbox/geraud/Rd/utils.hh
@@ -61,7 +61,7 @@ namespace mln
template <typename I>
I minimun(const I& ima1, const I& ima2)
{
- mln_precondition(ima1.has_data() && ima2.has_data());
+ mln_precondition(ima1.is_valid() && ima2.is_valid());
mln_precondition(ima1.domain() == ima2.domain());
I out(ima1.domain());
mln_piter(I) p(ima1.domain());
diff --git a/milena/sandbox/geraud/browsing/fwd.hh
b/milena/sandbox/geraud/browsing/fwd.hh
index 1f92953..5ed936d 100644
--- a/milena/sandbox/geraud/browsing/fwd.hh
+++ b/milena/sandbox/geraud/browsing/fwd.hh
@@ -13,7 +13,7 @@ namespace mln
void fwd(F& f)
{
trace::entering("canvas::browsing::fwd");
- mln_precondition(f.input.has_data());
+ mln_precondition(f.input.is_valid());
typedef typename F::I I;
mln_fwd_piter(I) p(f.input.domain());
f.init();
@@ -31,7 +31,7 @@ namespace mln
void row_fwd(F& f)
{
trace::entering("canvas::browsing::row_fwd");
- mln_precondition(f.input.has_data());
+ mln_precondition(f.input.is_valid());
box2d b = f.input.domain();
unsigned nrows = b.nrows(), ncols = b.ncols();
def::coord& row = f.p.row();
@@ -58,7 +58,7 @@ namespace mln
void col_fwd(F& f)
{
trace::entering("canvas::browsing::col_fwd");
- mln_precondition(f.input.has_data());
+ mln_precondition(f.input.is_valid());
box2d b = f.input.domain();
unsigned nrows = b.nrows(), ncols = b.ncols();
def::coord& row = f.p.row();
diff --git a/milena/sandbox/geraud/dead/instant.hh
b/milena/sandbox/geraud/dead/instant.hh
index 439cb46..5a8892a 100644
--- a/milena/sandbox/geraud/dead/instant.hh
+++ b/milena/sandbox/geraud/dead/instant.hh
@@ -128,7 +128,7 @@ namespace mln
inline
instant_<I>::instant_(I& ima)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
this->init_(ima);
this->data_ = new internal::data< instant_<I> >(ima);
}
@@ -138,7 +138,7 @@ namespace mln
void
instant_<I>::init_(I& ima)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
this->data_ = new internal::data< instant_<I> >(ima);
}
@@ -147,7 +147,7 @@ namespace mln
I&
instant_<I>::un_instant_()
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->ima_;
}
@@ -156,7 +156,7 @@ namespace mln
I&
instant_<I>::un_instant_() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return const_cast<I&>(this->data_->ima_);
}
diff --git a/milena/sandbox/geraud/dmap.cc b/milena/sandbox/geraud/dmap.cc
index 32c3f7e..02b992a 100644
--- a/milena/sandbox/geraud/dmap.cc
+++ b/milena/sandbox/geraud/dmap.cc
@@ -20,7 +20,7 @@ namespace mln
{
const I& input = exact(input_);
const W& win = exact(win_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
typedef std::vector<mln_site(I)> bucket_t;
diff --git a/milena/sandbox/geraud/estimate.hh b/milena/sandbox/geraud/estimate.hh
index 44117b5..a394a28 100644
--- a/milena/sandbox/geraud/estimate.hh
+++ b/milena/sandbox/geraud/estimate.hh
@@ -70,7 +70,7 @@ namespace mln
{
trace::entering("labeling::estimate");
mlc_equal(mln_trait_image_kind(I), mln::trait::image::kind::binary)::check();
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
std::cerr << "Sorry: mln::labeling::estimate is not yet
implemented!" << std::endl;
diff --git a/milena/sandbox/inim/binarization/binarization.hh
b/milena/sandbox/inim/binarization/binarization.hh
index c9015f3..26c1327 100644
--- a/milena/sandbox/inim/binarization/binarization.hh
+++ b/milena/sandbox/inim/binarization/binarization.hh
@@ -62,7 +62,7 @@ namespace mln
binarization(const Image<I>& input, const Window<W>& win, int
strength)
{
trace::entering("binarisation");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete_ch_value(I, bool) output(exact(input).domain());
output = impl::binarization_(exact(input), exact(win), strength);
diff --git a/milena/sandbox/jardonnet/registration/chamfer.hh
b/milena/sandbox/jardonnet/registration/chamfer.hh
index 1d99041..d4de5de 100644
--- a/milena/sandbox/jardonnet/registration/chamfer.hh
+++ b/milena/sandbox/jardonnet/registration/chamfer.hh
@@ -115,7 +115,7 @@ namespace mln
typedef w_window<mln_dpsite(I), T> W;
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_ch_value(I, T) outputDistance;
initialize(outputDistance, input);
diff --git a/milena/sandbox/jardonnet/subsampling/gaussian_subsampling.hh
b/milena/sandbox/jardonnet/subsampling/gaussian_subsampling.hh
index 583a597..08ef2af 100644
--- a/milena/sandbox/jardonnet/subsampling/gaussian_subsampling.hh
+++ b/milena/sandbox/jardonnet/subsampling/gaussian_subsampling.hh
@@ -70,7 +70,7 @@ namespace mln
const mln_coord(I)& gap)
{
trace::entering("subsampling::gaussian_subsampling");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) temp(exact(input).domain());
mln_concrete(I) output(geom::nrows(input) / gap,
diff --git a/milena/sandbox/jardonnet/subsampling/sub_sampled_image.hh
b/milena/sandbox/jardonnet/subsampling/sub_sampled_image.hh
index 669d549..91153ed 100644
--- a/milena/sandbox/jardonnet/subsampling/sub_sampled_image.hh
+++ b/milena/sandbox/jardonnet/subsampling/sub_sampled_image.hh
@@ -98,7 +98,7 @@ namespace mln
const box_<mln_psite(I)>& domain() const;
/// Test if this image has been initialized.
- bool has_data() const;
+ bool is_valid() const;
/// Test if a pixel value is accessible at \p p.
bool has(const mln_psite(I)& p) const;
@@ -157,7 +157,7 @@ namespace mln
const box_<mln_psite(I)>&
sub_sampled_image<I>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->box_;
}
@@ -174,9 +174,9 @@ namespace mln
template <typename I>
inline
- bool sub_sampled_image<I>::has_data() const
+ bool sub_sampled_image<I>::is_valid() const
{
- mln_invariant(this->delegatee_()->has_data());
+ mln_invariant(this->delegatee_()->is_valid());
return true;
}
@@ -186,7 +186,7 @@ namespace mln
bool
sub_sampled_image<I>::has(const mln_psite(I)& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->delegatee_()->has(translate_coords_(p));
}
diff --git a/milena/sandbox/nivault/plugin-gimp/src/gimp-image.hh
b/milena/sandbox/nivault/plugin-gimp/src/gimp-image.hh
index 2404d4e..2f75a56 100644
--- a/milena/sandbox/nivault/plugin-gimp/src/gimp-image.hh
+++ b/milena/sandbox/nivault/plugin-gimp/src/gimp-image.hh
@@ -351,7 +351,7 @@ namespace mln
void
gimp_image<t>::init_(GimpPixelRgn* rgn)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ = new internal::data_< gimp_image<t> >(rgn);
}
@@ -359,7 +359,7 @@ namespace mln
void
gimp_image<t>::init_(box2d box)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ = new internal::data_< gimp_image<t> >(box);
}
@@ -375,7 +375,7 @@ namespace mln
const box2d&
gimp_image<t>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_;
}
@@ -392,7 +392,7 @@ namespace mln
std::size_t
gimp_image<t>::nelements() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_.nsites();
}
@@ -401,7 +401,7 @@ namespace mln
bool
gimp_image<t>::has(const point2d& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_.has(p);
}
@@ -474,7 +474,7 @@ namespace mln
const mln_value(gimp_image<t>)*
gimp_image<t>::buffer() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->buffer_;
}
@@ -483,7 +483,7 @@ namespace mln
mln_value(gimp_image<t>)*
gimp_image<t>::buffer()
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->buffer_;
}
@@ -492,7 +492,7 @@ namespace mln
// int
// gimp_image<t>::delta_index(const dpoint2d& dp) const
// {
-// mln_precondition(this->has_data());
+// mln_precondition(this->is_valid());
// int o = dp[0] * this->data_->b_.len(1) + dp[1];
// return o;
// }
diff --git a/milena/sandbox/vigouroux/moyenne.cc b/milena/sandbox/vigouroux/moyenne.cc
index 5e50ec5..f2a5f37 100644
--- a/milena/sandbox/vigouroux/moyenne.cc
+++ b/milena/sandbox/vigouroux/moyenne.cc
@@ -19,7 +19,7 @@ float rms(const mln::Image<I1>& ima1_, const
mln::Image<I2>& ima2_)
const I1& ima1 = exact(ima1_);
const I2& ima2 = exact(ima2_);
- mln_precondition(ima1.has_data() && ima2.has_data());
+ mln_precondition(ima1.is_valid() && ima2.is_valid());
double sum = 0, nb = 0;
diff --git a/milena/tests/core/image/graph_image.cc
b/milena/tests/core/image/graph_image.cc
index 2e88446..f12d8f9 100644
--- a/milena/tests/core/image/graph_image.cc
+++ b/milena/tests/core/image/graph_image.cc
@@ -94,9 +94,10 @@ int main()
// Edges.
util::graph g;
+
// Populate the graph with vertices.
- for (unsigned i = 0; i < sites.size(); ++i)
- g.add_vertex();
+ g.add_vertices(sites.size());
+
// Populate the graph with edges.
g.add_edge(0, 1);
g.add_edge(1, 2);
diff --git a/milena/tests/core/image/line_graph_image.cc
b/milena/tests/core/image/line_graph_image.cc
index 981a09a..d565a9f 100644
--- a/milena/tests/core/image/line_graph_image.cc
+++ b/milena/tests/core/image/line_graph_image.cc
@@ -87,9 +87,10 @@ int main()
sites(4) = point2d(4,4); // Point associated to edge 4.
util::graph g;
+
// Populate the graph with vertices.
- for(unsigned i = 0; i < sites.size(); ++i)
- g.add_vertex();
+ g.add_vertices(sites.size());
+
// Populate the graph with edges.
g.add_edge(0, 1);
g.add_edge(1, 2);
diff --git a/milena/tests/core/other/graph_elt_neighborhood.cc
b/milena/tests/core/other/graph_elt_neighborhood.cc
index 4de2216..797b826 100644
--- a/milena/tests/core/other/graph_elt_neighborhood.cc
+++ b/milena/tests/core/other/graph_elt_neighborhood.cc
@@ -80,8 +80,7 @@ int main()
G g;
// Populate the graph with vertices.
- for (unsigned i = 0; i < points.size(); ++i)
- g.add_vertex ();
+ g.add_vertices(points.size());
// Populate the graph with edges.
g.add_edge(0, 1);
diff --git a/milena/tests/core/other/graph_elt_window.cc
b/milena/tests/core/other/graph_elt_window.cc
index 46da228..62a43e3 100644
--- a/milena/tests/core/other/graph_elt_window.cc
+++ b/milena/tests/core/other/graph_elt_window.cc
@@ -80,8 +80,7 @@ int main()
G g;
// Populate the graph with vertices.
- for (unsigned i = 0; i < points.size(); ++i)
- g.add_vertex ();
+ g.add_vertices(points.size());
// Populate the graph with edges.
g.add_edge(0, 1);
diff --git a/milena/tests/core/other/line_graph_elt_neighborhood.cc
b/milena/tests/core/other/line_graph_elt_neighborhood.cc
index 2564c7d..197091e 100644
--- a/milena/tests/core/other/line_graph_elt_neighborhood.cc
+++ b/milena/tests/core/other/line_graph_elt_neighborhood.cc
@@ -79,8 +79,7 @@ int main()
G g;
// Populate the graph with vertices.
- for (unsigned i = 0; i < points.size(); ++i)
- g.add_vertex ();
+ g.add_vertices(points.size());
// Populate the graph with edges.
g.add_edge(0, 1);
diff --git a/milena/tests/core/other/line_graph_elt_window.cc
b/milena/tests/core/other/line_graph_elt_window.cc
index 4792d67..6d6934e 100644
--- a/milena/tests/core/other/line_graph_elt_window.cc
+++ b/milena/tests/core/other/line_graph_elt_window.cc
@@ -77,9 +77,10 @@ int main()
// Edges.
typedef mln::util::graph G;
G g;
+
// Populate the graph with vertices.
- for (unsigned i = 0; i < points.size(); ++i)
- g.add_vertex ();
+ g.add_vertices(points.size());
+
// Populate the graph with edges.
g.add_edge(0, 1);
g.add_edge(1, 2);
diff --git a/milena/tests/fun/v2v/rgb_hsi_conversion.cc
b/milena/tests/fun/v2v/rgb_hsi_conversion.cc
index da7d8c3..f760fa1 100644
--- a/milena/tests/fun/v2v/rgb_hsi_conversion.cc
+++ b/milena/tests/fun/v2v/rgb_hsi_conversion.cc
@@ -26,7 +26,8 @@
// Public License.
/// \file tests/fun/v2v/rgb_hsi_conversion.cc
-/// \brief Test RGB-to-HSI conversion.
+///
+/// Test RGB-to-HSI conversion.
#include <cmath>
@@ -50,7 +51,7 @@ float rms(const mln::Image<I1>& ima1_, const
mln::Image<I2>& ima2_)
const I1& ima1 = exact(ima1_);
const I2& ima2 = exact(ima2_);
- mln_precondition(ima1.has_data() && ima2.has_data());
+ mln_precondition(ima1.is_valid() && ima2.is_valid());
double sum = 0, nb = 0;
diff --git a/milena/tests/morpho/complex_image_morpho.cc
b/milena/tests/morpho/complex_image_morpho.cc
index 80b80f5..e3bffe6 100644
--- a/milena/tests/morpho/complex_image_morpho.cc
+++ b/milena/tests/morpho/complex_image_morpho.cc
@@ -26,7 +26,8 @@
// Public License.
/// \file tests/morpho/complex_image_morpho.cc
-/// \brief Test of mln::complex_image with morphological filters.
+///
+/// Test of mln::complex_image with morphological filters.
#include <iostream>
@@ -178,7 +179,7 @@ test_morpho(const mln::Image<I>& ima_, const
mln::Window<W> win,
const std::string& comment)
{
const I& ima = exact(ima_);
- mln_assertion(ima.has_data());
+ mln_assertion(ima.is_valid());
mln_piter(I) p(ima.domain());
mln_concrete(I) ima_dil = mln::morpho::dilation(ima, win);
diff --git a/milena/tests/morpho/graph_image_morpho.cc
b/milena/tests/morpho/graph_image_morpho.cc
index 8552061..04c18ad 100644
--- a/milena/tests/morpho/graph_image_morpho.cc
+++ b/milena/tests/morpho/graph_image_morpho.cc
@@ -83,8 +83,7 @@ int main()
util::graph g;
// Populate the graph with vertices.
- for (unsigned i = 0; i < sites.size(); ++i)
- g.add_vertex();
+ g.add_vertices(sites.size());
// Populate the graph with edges.
g.add_edge(0, 1);
diff --git a/milena/tests/morpho/graph_image_wst.cc
b/milena/tests/morpho/graph_image_wst.cc
index 53f78cd..2893903 100644
--- a/milena/tests/morpho/graph_image_wst.cc
+++ b/milena/tests/morpho/graph_image_wst.cc
@@ -78,8 +78,7 @@ int main()
util::graph g;
// Populate the graph with vertices.
- for (unsigned i = 0; i < sites.size(); ++i)
- g.add_vertex();
+ g.add_vertices(sites.size());
// Populate the graph with edges.
g.add_edge(0, 1);
diff --git a/milena/tests/morpho/line_graph_image_morpho.cc
b/milena/tests/morpho/line_graph_image_morpho.cc
index ce32528..2b32421 100644
--- a/milena/tests/morpho/line_graph_image_morpho.cc
+++ b/milena/tests/morpho/line_graph_image_morpho.cc
@@ -77,8 +77,7 @@ int main()
sites(4) = point2d(4,4); // Point associated to vertex 4.
// Populate the graph with vertices.
- for (unsigned i = 0; i < sites.size(); ++i)
- g.add_vertex();
+ g.add_vertices(sites.size());
// Populate the graph with edges.
g.add_edge(0, 1);
diff --git a/milena/tests/morpho/line_graph_image_wst.cc
b/milena/tests/morpho/line_graph_image_wst.cc
index a700d16..e9f5871 100644
--- a/milena/tests/morpho/line_graph_image_wst.cc
+++ b/milena/tests/morpho/line_graph_image_wst.cc
@@ -81,8 +81,7 @@ int main()
sites(7) = point2d(1,3); // Point associated to vertex 7.
// Populate the graph with vertices.
- for(unsigned i = 0; i < sites.size(); ++i)
- g.add_vertex();
+ g.add_vertices(sites.size());
// Populate the graph with edges.
g.add_edge(0, 1);
diff --git a/milena/tools/area_flooding.cc b/milena/tools/area_flooding.cc
index 10abdb7..da7c378 100644
--- a/milena/tools/area_flooding.cc
+++ b/milena/tools/area_flooding.cc
@@ -92,7 +92,7 @@ int main(int argc, char* argv[])
orig_ima_t input;
io::pgm::load(input, argv[2]);
- if (!input.has_data())
+ if (!input.is_valid())
{
std::cerr << "Error reading input " << argv[2] <<
std::endl;
std::exit(2);
diff --git a/milena/trash/display_color_pretty.hh b/milena/trash/display_color_pretty.hh
index 9574fe4..31239b8 100644
--- a/milena/trash/display_color_pretty.hh
+++ b/milena/trash/display_color_pretty.hh
@@ -191,7 +191,7 @@ namespace mln
trace::entering("display::color_pretty");
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mlc_is_not(mln_trait_value_kind(mln_value(I)) (),
trait::value::kind::color)::check();
diff --git a/milena/trash/display_save.hh b/milena/trash/display_save.hh
index addd6b7..956276d 100644
--- a/milena/trash/display_save.hh
+++ b/milena/trash/display_save.hh
@@ -124,7 +124,7 @@ namespace mln
trace::entering("display::save");
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
impl::save(mln_trait_value_kind(mln_value(I)) (), input);
trace::exiting("display::save");
diff --git a/milena/trash/fi_adaptor.hh b/milena/trash/fi_adaptor.hh
index 3d24b12..33fdaa9 100644
--- a/milena/trash/fi_adaptor.hh
+++ b/milena/trash/fi_adaptor.hh
@@ -302,7 +302,7 @@ namespace mln
const box2d&
fi_adaptor<I>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_;
}
@@ -310,7 +310,7 @@ namespace mln
unsigned
fi_adaptor<I>::nelements() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_.nsites();
}
@@ -374,7 +374,7 @@ namespace mln
const mln_value(I)*
fi_adaptor<I>::buffer() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->buffer_;
}
@@ -382,7 +382,7 @@ namespace mln
mln_value(I)*
fi_adaptor<I>::buffer()
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->buffer_;
}
@@ -390,7 +390,7 @@ namespace mln
int
fi_adaptor<I>::delta_index(const dpoint2d& dp) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
int o = dp[0] * this->data_->b_.len(1) + dp[1];
return o;
}
@@ -411,7 +411,7 @@ namespace mln
fipImage&
fi_adaptor<I>::adaptee()
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->fi_ima_;
}
@@ -419,7 +419,7 @@ namespace mln
const fipImage&
fi_adaptor<I>::adaptee() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->fi_ima_;
}
diff --git a/milena/trash/graph_image.hh b/milena/trash/graph_image.hh
index 91918bd..e8d84a8 100644
--- a/milena/trash/graph_image.hh
+++ b/milena/trash/graph_image.hh
@@ -233,7 +233,7 @@ namespace mln
void
graph_image<P, V>::init_(const p_graph<P>& pg, const
std::vector<V>& val)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ = new internal::data< graph_image<P, V> > (pg, val);
}
@@ -274,7 +274,7 @@ namespace mln
const p_graph<P>&
graph_image<P, V>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->pg_;
}
diff --git a/milena/trash/line_graph_image.hh b/milena/trash/line_graph_image.hh
index d87dc62..148b941 100644
--- a/milena/trash/line_graph_image.hh
+++ b/milena/trash/line_graph_image.hh
@@ -262,7 +262,7 @@ namespace mln
const std::vector<V>& vertex_val,
const std::vector<V>& edge_val)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ =
new internal::data< line_graph_image<P, V> >(plg, vertex_val,
edge_val);
}
@@ -312,7 +312,7 @@ namespace mln
const p_line_graph<P>&
line_graph_image<P, V>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->plg_;
}
diff --git a/milena/trash/neighb_get.hh b/milena/trash/neighb_get.hh
index 576ae1d..748db6f 100644
--- a/milena/trash/neighb_get.hh
+++ b/milena/trash/neighb_get.hh
@@ -176,7 +176,7 @@ namespace mln
{
trace::entering("neighb::get");
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
typename neighb::get_helper<I>::type res =
neighb::get_helper<I>::run(exact(ima));
diff --git a/milena/trash/neighb_image.hh b/milena/trash/neighb_image.hh
index 11380a3..2338b24 100644
--- a/milena/trash/neighb_image.hh
+++ b/milena/trash/neighb_image.hh
@@ -114,7 +114,7 @@ namespace mln
/// \}
/// Test if this image has been initialized.
- bool has_data() const;
+ bool is_valid() const;
/// Accessors.
/// \{
@@ -208,7 +208,7 @@ namespace mln
void
image<I, N>::init_(Image<I>& ima, const Neighborhood<N>&
nbh)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ =
new mln::internal::data< mln::neighb::image<I, N> >(exact(ima),
exact(nbh));
@@ -217,9 +217,9 @@ namespace mln
template <typename I, typename N>
inline
bool
- image<I, N>::has_data() const
+ image<I, N>::is_valid() const
{
- return this->delegatee_() && this->delegatee_()->has_data();
+ return this->delegatee_() && this->delegatee_()->is_valid();
}
template <typename I, typename N>
diff --git a/milena/trash/translate_image.hh b/milena/trash/translate_image.hh
index 39a990c..57738ca 100644
--- a/milena/trash/translate_image.hh
+++ b/milena/trash/translate_image.hh
@@ -106,7 +106,7 @@ namespace mln
typedef translate_image< tag::image_<I> > skeleton;
/// Test if a pixel value is accessible at \p p.
- using super_::has_data;
+ using super_::is_valid;
/// Constructors.
translate_image(I& ima, const mln_site(I)::dpsite dp);
@@ -156,7 +156,7 @@ namespace mln
inline
translate_image<I>::translate_image(I& ima, const mln_site(I)::dpsite dp)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
this->data_ = new internal::data< translate_image<I> >(ima, dp);
}
--
1.5.6.5