* mln/accu/compute.hh,
* mln/accu/line.hh,
* mln/accu/take.hh,
* mln/accu/transform.hh,
* mln/accu/transform_diagonal.hh,
* mln/accu/transform_directional.hh,
* mln/accu/transform_snake.hh,
* mln/accu/transform_stop.hh,
* mln/arith/diff_abs.hh,
* mln/arith/minus.hh,
* mln/arith/plus.hh,
* mln/arith/revert.hh,
* mln/arith/times.hh,
* mln/binarization/binarization.hh,
* mln/binarization/threshold.hh,
* mln/border/adjust.hh,
* mln/border/duplicate.hh,
* mln/border/equalize.hh,
* mln/border/fill.hh,
* mln/border/find.hh,
* mln/border/get.hh,
* mln/border/mirror.hh,
* mln/border/resize.hh,
* mln/canvas/browsing/fwd.hh,
* mln/canvas/browsing/snake_fwd.hh,
* mln/canvas/browsing/snake_generic.hh,
* mln/canvas/browsing/snake_vert.hh,
* mln/canvas/distance_front.hh,
* mln/canvas/distance_geodesic.hh,
* mln/canvas/labeling.hh,
* mln/convert/from_to.hh,
* mln/convert/to_p_set.hh,
* mln/convert/to_window.hh,
* mln/core/concept/doc/image.hh,
* mln/core/concept/image.hh,
* mln/core/concept/window.hh,
* mln/core/dpoints_pixter.hh,
* mln/core/image/bgraph_image.hh,
* mln/core/image/cast_image.hh,
* mln/core/image/ch_piter.hh,
* mln/core/image/complex_image.hh,
* mln/core/image/decorated_image.hh,
* mln/core/image/extended.hh,
* mln/core/image/extension_fun.hh,
* mln/core/image/extension_ima.hh,
* mln/core/image/extension_val.hh,
* mln/core/image/flat_image.hh,
* mln/core/image/fun_image.hh,
* mln/core/image/hexa.hh,
* mln/core/image/image1d.hh,
* mln/core/image/image2d.hh,
* mln/core/image/image3d.hh,
* mln/core/image/image_if.hh,
* mln/core/image/interpolated.hh,
* mln/core/image/lazy_image.hh,
* mln/core/image/mono_obased_rle_image.hh,
* mln/core/image/mono_rle_image.hh,
* mln/core/image/obased_rle_image.hh,
* mln/core/image/plain.hh,
* mln/core/image/rle_image.hh,
* mln/core/image/safe.hh,
* mln/core/image/sparse_image.hh,
* mln/core/image/sub_image.hh,
* mln/core/image/sub_image_if.hh,
* mln/core/image/t_image.hh,
* mln/core/image/tr_image.hh,
* mln/core/image/value_enc_image.hh,
* mln/core/image/violent_cast_image.hh,
* mln/core/internal/check/image_fastest.hh,
* mln/core/internal/image_base.hh,
* mln/core/internal/image_morpher.hh,
* mln/core/internal/pixel_iterator_base.hh,
* mln/core/internal/run_image.hh,
* mln/core/pixel.hh,
* mln/core/pixter1d.hh,
* mln/core/pixter2d.hh,
* mln/core/pixter3d.hh,
* mln/core/routine/duplicate.hh,
* mln/core/routine/initialize.hh,
* mln/core/routine/primary.hh,
* mln/core/site_set/p_image.hh,
* mln/core/w_window.hh,
* mln/data/fill.hh,
* mln/data/fill_with_image.hh,
* mln/data/fill_with_value.hh,
* mln/data/memcpy_.hh,
* mln/data/memset_.hh,
* mln/data/paste.hh,
* mln/debug/colorize.hh,
* mln/debug/iota.hh,
* mln/draw/box.hh,
* mln/draw/line.hh,
* mln/draw/plot.hh,
* mln/estim/mean.hh,
* mln/estim/min_max.hh,
* mln/estim/sum.hh,
* mln/extension/adjust.hh,
* mln/extension/fill.hh,
* mln/geom/bbox.hh,
* mln/geom/max_col.hh,
* mln/geom/max_ind.hh,
* mln/geom/max_row.hh,
* mln/geom/max_sli.hh,
* mln/geom/min_col.hh,
* mln/geom/min_ind.hh,
* mln/geom/min_row.hh,
* mln/geom/min_sli.hh,
* mln/geom/ncols.hh,
* mln/geom/ninds.hh,
* mln/geom/nrows.hh,
* mln/geom/nsites.hh,
* mln/geom/nslis.hh,
* mln/geom/seeds2tiling.hh,
* mln/geom/seeds2tiling_roundness.hh,
* mln/histo/compute.hh,
* mln/io/txt/save.hh,
* mln/labeling/background.hh,
* mln/labeling/blobs.hh,
* mln/labeling/compute.hh,
* mln/labeling/flat_zones.hh,
* mln/labeling/foreground.hh,
* mln/labeling/level.hh,
* mln/labeling/regional_maxima.hh,
* mln/labeling/regional_minima.hh,
* mln/labeling/relabel.hh,
* mln/level/abs.hh,
* mln/level/apply.hh,
* mln/level/convert.hh,
* mln/level/fast_median.hh,
* mln/level/replace.hh,
* mln/level/saturate.hh,
* mln/level/sort_psites.hh,
* mln/level/stretch.hh,
* mln/level/transform.hh,
* mln/level/transform_inplace.hh,
* mln/level/update.hh,
* mln/level/was.median.hh,
* mln/linear/convolve.hh,
* mln/linear/convolve_2x1d.hh,
* mln/linear/convolve_directional.hh,
* mln/linear/gaussian.hh,
* mln/linear/lap.hh,
* mln/linear/local/convolve.hh,
* mln/linear/log.hh,
* mln/linear/sobel_2d.hh,
* mln/logical/includes.hh,
* mln/logical/not.hh,
* mln/make/dual_neighb.hh,
* mln/make/graph.hh,
* mln/morpho/closing.hh,
* mln/morpho/closing_area.hh,
* mln/morpho/closing_area_on_vertices.hh,
* mln/morpho/closing_attribute.hh,
* mln/morpho/closing_height.hh,
* mln/morpho/closing_volume.hh,
* mln/morpho/complementation.hh,
* mln/morpho/contrast.hh,
* mln/morpho/dilation.hh,
* mln/morpho/elementary/closing.hh,
* mln/morpho/elementary/dilation.hh,
* mln/morpho/elementary/erosion.hh,
* mln/morpho/elementary/gradient.hh,
* mln/morpho/elementary/gradient_external.hh,
* mln/morpho/elementary/gradient_internal.hh,
* mln/morpho/elementary/laplacian.hh,
* mln/morpho/elementary/opening.hh,
* mln/morpho/elementary/top_hat.hh,
* mln/morpho/erosion.hh,
* mln/morpho/general.hh,
* mln/morpho/gradient.hh,
* mln/morpho/hit_or_miss.hh,
* mln/morpho/laplacian.hh,
* mln/morpho/opening.hh,
* mln/morpho/opening_area.hh,
* mln/morpho/opening_area_on_vertices.hh,
* mln/morpho/opening_attribute.hh,
* mln/morpho/opening_height.hh,
* mln/morpho/opening_volume.hh,
* mln/morpho/rank_filter.hh,
* mln/morpho/thickening.hh,
* mln/morpho/thin_fit.hh,
* mln/morpho/thinning.hh,
* mln/morpho/top_hat.hh,
* mln/morpho/tree/compute_parent.hh,
* mln/morpho/tree/data.hh,
* mln/morpho/tree/max.hh,
* mln/morpho/tree/utils.hh,
* mln/pw/value.hh,
* mln/subsampling/gaussian_subsampling.hh,
* mln/subsampling/subsampling.hh,
* mln/test/positive.hh,
* mln/test/predicate.hh,
* mln/transform/distance_front.hh,
* mln/transform/distance_geodesic.hh,
* mln/transform/influence_zone_front.hh,
* mln/transform/influence_zone_geodesic.hh,
* mln/value/stack.hh: apply the renaming here.
---
milena/ChangeLog | 202 +++++++++++++++++++++
milena/mln/accu/compute.hh | 6 +-
milena/mln/accu/line.hh | 4 +-
milena/mln/accu/take.hh | 2 +-
milena/mln/accu/transform.hh | 8 +-
milena/mln/accu/transform_diagonal.hh | 2 +-
milena/mln/accu/transform_directional.hh | 2 +-
milena/mln/accu/transform_snake.hh | 2 +-
milena/mln/accu/transform_stop.hh | 8 +-
milena/mln/arith/diff_abs.hh | 4 +-
milena/mln/arith/minus.hh | 16 +-
milena/mln/arith/plus.hh | 20 +-
milena/mln/arith/revert.hh | 8 +-
milena/mln/arith/times.hh | 6 +-
milena/mln/binarization/binarization.hh | 2 +-
milena/mln/binarization/threshold.hh | 2 +-
milena/mln/border/adjust.hh | 2 +-
milena/mln/border/duplicate.hh | 4 +-
milena/mln/border/equalize.hh | 2 +-
milena/mln/border/fill.hh | 2 +-
milena/mln/border/find.hh | 2 +-
milena/mln/border/get.hh | 2 +-
milena/mln/border/mirror.hh | 2 +-
milena/mln/border/resize.hh | 2 +-
milena/mln/canvas/browsing/fwd.hh | 2 +-
milena/mln/canvas/browsing/snake_fwd.hh | 2 +-
milena/mln/canvas/browsing/snake_generic.hh | 2 +-
milena/mln/canvas/browsing/snake_vert.hh | 2 +-
milena/mln/canvas/distance_front.hh | 2 +-
milena/mln/canvas/distance_geodesic.hh | 2 +-
milena/mln/canvas/labeling.hh | 2 +-
milena/mln/convert/from_to.hh | 2 +-
milena/mln/convert/to_p_set.hh | 2 +-
milena/mln/convert/to_window.hh | 2 +-
milena/mln/core/concept/doc/image.hh | 2 +-
milena/mln/core/concept/image.hh | 6 +-
milena/mln/core/concept/window.hh | 2 +-
milena/mln/core/dpoints_pixter.hh | 8 +-
milena/mln/core/image/bgraph_image.hh | 2 +-
milena/mln/core/image/cast_image.hh | 6 +-
milena/mln/core/image/ch_piter.hh | 4 +-
milena/mln/core/image/complex_image.hh | 4 +-
milena/mln/core/image/decorated_image.hh | 4 +-
milena/mln/core/image/extended.hh | 6 +-
milena/mln/core/image/extension_fun.hh | 6 +-
milena/mln/core/image/extension_ima.hh | 12 +-
milena/mln/core/image/extension_val.hh | 8 +-
milena/mln/core/image/flat_image.hh | 12 +-
milena/mln/core/image/fun_image.hh | 4 +-
milena/mln/core/image/hexa.hh | 10 +-
milena/mln/core/image/image1d.hh | 18 +-
milena/mln/core/image/image2d.hh | 24 ++--
milena/mln/core/image/image3d.hh | 18 +-
milena/mln/core/image/image_if.hh | 6 +-
milena/mln/core/image/interpolated.hh | 10 +-
milena/mln/core/image/lazy_image.hh | 2 +-
milena/mln/core/image/mono_obased_rle_image.hh | 4 +-
milena/mln/core/image/mono_rle_image.hh | 4 +-
milena/mln/core/image/obased_rle_image.hh | 4 +-
milena/mln/core/image/plain.hh | 12 +-
milena/mln/core/image/rle_image.hh | 6 +-
milena/mln/core/image/safe.hh | 12 +-
milena/mln/core/image/sparse_image.hh | 6 +-
milena/mln/core/image/sub_image.hh | 2 +-
milena/mln/core/image/sub_image_if.hh | 2 +-
milena/mln/core/image/t_image.hh | 14 +-
milena/mln/core/image/tr_image.hh | 8 +-
milena/mln/core/image/value_enc_image.hh | 6 +-
milena/mln/core/image/violent_cast_image.hh | 6 +-
milena/mln/core/internal/check/image_fastest.hh | 2 +-
milena/mln/core/internal/image_base.hh | 14 +-
milena/mln/core/internal/image_morpher.hh | 8 +-
milena/mln/core/internal/pixel_iterator_base.hh | 2 +-
milena/mln/core/internal/run_image.hh | 2 +-
milena/mln/core/pixel.hh | 2 +-
milena/mln/core/pixter1d.hh | 4 +-
milena/mln/core/pixter2d.hh | 4 +-
milena/mln/core/pixter3d.hh | 4 +-
milena/mln/core/routine/duplicate.hh | 2 +-
milena/mln/core/routine/initialize.hh | 8 +-
milena/mln/core/routine/primary.hh | 2 +-
milena/mln/core/site_set/p_image.hh | 4 +-
milena/mln/core/w_window.hh | 2 +-
milena/mln/data/fill.hh | 2 +-
milena/mln/data/fill_with_image.hh | 4 +-
milena/mln/data/fill_with_value.hh | 2 +-
milena/mln/data/memcpy_.hh | 4 +-
milena/mln/data/memset_.hh | 4 +-
milena/mln/data/paste.hh | 2 +-
milena/mln/debug/colorize.hh | 2 +-
milena/mln/debug/iota.hh | 2 +-
milena/mln/draw/box.hh | 2 +-
milena/mln/draw/line.hh | 2 +-
milena/mln/draw/plot.hh | 2 +-
milena/mln/estim/mean.hh | 4 +-
milena/mln/estim/min_max.hh | 2 +-
milena/mln/estim/sum.hh | 4 +-
milena/mln/extension/adjust.hh | 2 +-
milena/mln/extension/fill.hh | 2 +-
milena/mln/geom/bbox.hh | 2 +-
milena/mln/geom/max_col.hh | 2 +-
milena/mln/geom/max_ind.hh | 2 +-
milena/mln/geom/max_row.hh | 2 +-
milena/mln/geom/max_sli.hh | 2 +-
milena/mln/geom/min_col.hh | 2 +-
milena/mln/geom/min_ind.hh | 2 +-
milena/mln/geom/min_row.hh | 2 +-
milena/mln/geom/min_sli.hh | 2 +-
milena/mln/geom/ncols.hh | 2 +-
milena/mln/geom/ninds.hh | 2 +-
milena/mln/geom/nrows.hh | 2 +-
milena/mln/geom/nsites.hh | 2 +-
milena/mln/geom/nslis.hh | 2 +-
milena/mln/geom/seeds2tiling.hh | 2 +-
milena/mln/geom/seeds2tiling_roundness.hh | 2 +-
milena/mln/histo/compute.hh | 2 +-
milena/mln/io/txt/save.hh | 2 +-
milena/mln/labeling/background.hh | 2 +-
milena/mln/labeling/blobs.hh | 2 +-
milena/mln/labeling/compute.hh | 6 +-
milena/mln/labeling/flat_zones.hh | 2 +-
milena/mln/labeling/foreground.hh | 2 +-
milena/mln/labeling/level.hh | 2 +-
milena/mln/labeling/regional_maxima.hh | 2 +-
milena/mln/labeling/regional_minima.hh | 2 +-
milena/mln/labeling/relabel.hh | 4 +-
milena/mln/level/abs.hh | 2 +-
milena/mln/level/apply.hh | 2 +-
milena/mln/level/convert.hh | 2 +-
milena/mln/level/fast_median.hh | 4 +-
milena/mln/level/replace.hh | 2 +-
milena/mln/level/saturate.hh | 6 +-
milena/mln/level/sort_psites.hh | 8 +-
milena/mln/level/stretch.hh | 4 +-
milena/mln/level/transform.hh | 6 +-
milena/mln/level/transform_inplace.hh | 6 +-
milena/mln/level/update.hh | 2 +-
milena/mln/level/was.median.hh | 4 +-
milena/mln/linear/convolve.hh | 4 +-
milena/mln/linear/convolve_2x1d.hh | 4 +-
milena/mln/linear/convolve_directional.hh | 4 +-
milena/mln/linear/gaussian.hh | 24 ++--
milena/mln/linear/lap.hh | 8 +-
milena/mln/linear/local/convolve.hh | 2 +-
milena/mln/linear/log.hh | 8 +-
milena/mln/linear/sobel_2d.hh | 8 +-
milena/mln/logical/includes.hh | 4 +-
milena/mln/logical/not.hh | 8 +-
milena/mln/make/dual_neighb.hh | 2 +-
milena/mln/make/graph.hh | 2 +-
milena/mln/morpho/closing.hh | 2 +-
milena/mln/morpho/closing_area.hh | 2 +-
milena/mln/morpho/closing_area_on_vertices.hh | 2 +-
milena/mln/morpho/closing_attribute.hh | 2 +-
milena/mln/morpho/closing_height.hh | 2 +-
milena/mln/morpho/closing_volume.hh | 2 +-
milena/mln/morpho/complementation.hh | 4 +-
milena/mln/morpho/contrast.hh | 2 +-
milena/mln/morpho/dilation.hh | 2 +-
milena/mln/morpho/elementary/closing.hh | 2 +-
milena/mln/morpho/elementary/dilation.hh | 2 +-
milena/mln/morpho/elementary/erosion.hh | 2 +-
milena/mln/morpho/elementary/gradient.hh | 2 +-
milena/mln/morpho/elementary/gradient_external.hh | 2 +-
milena/mln/morpho/elementary/gradient_internal.hh | 2 +-
milena/mln/morpho/elementary/laplacian.hh | 2 +-
milena/mln/morpho/elementary/opening.hh | 2 +-
milena/mln/morpho/elementary/top_hat.hh | 6 +-
milena/mln/morpho/erosion.hh | 2 +-
milena/mln/morpho/general.hh | 4 +-
milena/mln/morpho/gradient.hh | 6 +-
milena/mln/morpho/hit_or_miss.hh | 2 +-
milena/mln/morpho/laplacian.hh | 2 +-
milena/mln/morpho/opening.hh | 2 +-
milena/mln/morpho/opening_area.hh | 2 +-
milena/mln/morpho/opening_area_on_vertices.hh | 2 +-
milena/mln/morpho/opening_attribute.hh | 2 +-
milena/mln/morpho/opening_height.hh | 2 +-
milena/mln/morpho/opening_volume.hh | 2 +-
milena/mln/morpho/rank_filter.hh | 4 +-
milena/mln/morpho/thickening.hh | 2 +-
milena/mln/morpho/thin_fit.hh | 2 +-
milena/mln/morpho/thinning.hh | 2 +-
milena/mln/morpho/top_hat.hh | 6 +-
milena/mln/morpho/tree/compute_parent.hh | 2 +-
milena/mln/morpho/tree/data.hh | 2 +-
milena/mln/morpho/tree/max.hh | 2 +-
milena/mln/morpho/tree/utils.hh | 12 +-
milena/mln/pw/value.hh | 2 +-
milena/mln/subsampling/gaussian_subsampling.hh | 2 +-
milena/mln/subsampling/subsampling.hh | 2 +-
milena/mln/test/positive.hh | 2 +-
milena/mln/test/predicate.hh | 6 +-
milena/mln/transform/distance_front.hh | 2 +-
milena/mln/transform/distance_geodesic.hh | 2 +-
milena/mln/transform/influence_zone_front.hh | 2 +-
milena/mln/transform/influence_zone_geodesic.hh | 2 +-
milena/mln/value/stack.hh | 8 +-
198 files changed, 608 insertions(+), 406 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index d5c4ca8..577c1dd 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,207 @@
2008-12-31 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Rename Image::has_data() to Image::is_valid().
+
+ * mln/accu/compute.hh,
+ * mln/accu/line.hh,
+ * mln/accu/take.hh,
+ * mln/accu/transform.hh,
+ * mln/accu/transform_diagonal.hh,
+ * mln/accu/transform_directional.hh,
+ * mln/accu/transform_snake.hh,
+ * mln/accu/transform_stop.hh,
+ * mln/arith/diff_abs.hh,
+ * mln/arith/minus.hh,
+ * mln/arith/plus.hh,
+ * mln/arith/revert.hh,
+ * mln/arith/times.hh,
+ * mln/binarization/binarization.hh,
+ * mln/binarization/threshold.hh,
+ * mln/border/adjust.hh,
+ * mln/border/duplicate.hh,
+ * mln/border/equalize.hh,
+ * mln/border/fill.hh,
+ * mln/border/find.hh,
+ * mln/border/get.hh,
+ * mln/border/mirror.hh,
+ * mln/border/resize.hh,
+ * mln/canvas/browsing/fwd.hh,
+ * mln/canvas/browsing/snake_fwd.hh,
+ * mln/canvas/browsing/snake_generic.hh,
+ * mln/canvas/browsing/snake_vert.hh,
+ * mln/canvas/distance_front.hh,
+ * mln/canvas/distance_geodesic.hh,
+ * mln/canvas/labeling.hh,
+ * mln/convert/from_to.hh,
+ * mln/convert/to_p_set.hh,
+ * mln/convert/to_window.hh,
+ * mln/core/concept/doc/image.hh,
+ * mln/core/concept/image.hh,
+ * mln/core/concept/window.hh,
+ * mln/core/dpoints_pixter.hh,
+ * mln/core/image/bgraph_image.hh,
+ * mln/core/image/cast_image.hh,
+ * mln/core/image/ch_piter.hh,
+ * mln/core/image/complex_image.hh,
+ * mln/core/image/decorated_image.hh,
+ * mln/core/image/extended.hh,
+ * mln/core/image/extension_fun.hh,
+ * mln/core/image/extension_ima.hh,
+ * mln/core/image/extension_val.hh,
+ * mln/core/image/flat_image.hh,
+ * mln/core/image/fun_image.hh,
+ * mln/core/image/hexa.hh,
+ * mln/core/image/image1d.hh,
+ * mln/core/image/image2d.hh,
+ * mln/core/image/image3d.hh,
+ * mln/core/image/image_if.hh,
+ * mln/core/image/interpolated.hh,
+ * mln/core/image/lazy_image.hh,
+ * mln/core/image/mono_obased_rle_image.hh,
+ * mln/core/image/mono_rle_image.hh,
+ * mln/core/image/obased_rle_image.hh,
+ * mln/core/image/plain.hh,
+ * mln/core/image/rle_image.hh,
+ * mln/core/image/safe.hh,
+ * mln/core/image/sparse_image.hh,
+ * mln/core/image/sub_image.hh,
+ * mln/core/image/sub_image_if.hh,
+ * mln/core/image/t_image.hh,
+ * mln/core/image/tr_image.hh,
+ * mln/core/image/value_enc_image.hh,
+ * mln/core/image/violent_cast_image.hh,
+ * mln/core/internal/check/image_fastest.hh,
+ * mln/core/internal/image_base.hh,
+ * mln/core/internal/image_morpher.hh,
+ * mln/core/internal/pixel_iterator_base.hh,
+ * mln/core/internal/run_image.hh,
+ * mln/core/pixel.hh,
+ * mln/core/pixter1d.hh,
+ * mln/core/pixter2d.hh,
+ * mln/core/pixter3d.hh,
+ * mln/core/routine/duplicate.hh,
+ * mln/core/routine/initialize.hh,
+ * mln/core/routine/primary.hh,
+ * mln/core/site_set/p_image.hh,
+ * mln/core/w_window.hh,
+ * mln/data/fill.hh,
+ * mln/data/fill_with_image.hh,
+ * mln/data/fill_with_value.hh,
+ * mln/data/memcpy_.hh,
+ * mln/data/memset_.hh,
+ * mln/data/paste.hh,
+ * mln/debug/colorize.hh,
+ * mln/debug/iota.hh,
+ * mln/draw/box.hh,
+ * mln/draw/line.hh,
+ * mln/draw/plot.hh,
+ * mln/estim/mean.hh,
+ * mln/estim/min_max.hh,
+ * mln/estim/sum.hh,
+ * mln/extension/adjust.hh,
+ * mln/extension/fill.hh,
+ * mln/geom/bbox.hh,
+ * mln/geom/max_col.hh,
+ * mln/geom/max_ind.hh,
+ * mln/geom/max_row.hh,
+ * mln/geom/max_sli.hh,
+ * mln/geom/min_col.hh,
+ * mln/geom/min_ind.hh,
+ * mln/geom/min_row.hh,
+ * mln/geom/min_sli.hh,
+ * mln/geom/ncols.hh,
+ * mln/geom/ninds.hh,
+ * mln/geom/nrows.hh,
+ * mln/geom/nsites.hh,
+ * mln/geom/nslis.hh,
+ * mln/geom/seeds2tiling.hh,
+ * mln/geom/seeds2tiling_roundness.hh,
+ * mln/histo/compute.hh,
+ * mln/io/txt/save.hh,
+ * mln/labeling/background.hh,
+ * mln/labeling/blobs.hh,
+ * mln/labeling/compute.hh,
+ * mln/labeling/flat_zones.hh,
+ * mln/labeling/foreground.hh,
+ * mln/labeling/level.hh,
+ * mln/labeling/regional_maxima.hh,
+ * mln/labeling/regional_minima.hh,
+ * mln/labeling/relabel.hh,
+ * mln/level/abs.hh,
+ * mln/level/apply.hh,
+ * mln/level/convert.hh,
+ * mln/level/fast_median.hh,
+ * mln/level/replace.hh,
+ * mln/level/saturate.hh,
+ * mln/level/sort_psites.hh,
+ * mln/level/stretch.hh,
+ * mln/level/transform.hh,
+ * mln/level/transform_inplace.hh,
+ * mln/level/update.hh,
+ * mln/level/was.median.hh,
+ * mln/linear/convolve.hh,
+ * mln/linear/convolve_2x1d.hh,
+ * mln/linear/convolve_directional.hh,
+ * mln/linear/gaussian.hh,
+ * mln/linear/lap.hh,
+ * mln/linear/local/convolve.hh,
+ * mln/linear/log.hh,
+ * mln/linear/sobel_2d.hh,
+ * mln/logical/includes.hh,
+ * mln/logical/not.hh,
+ * mln/make/dual_neighb.hh,
+ * mln/make/graph.hh,
+ * mln/morpho/closing.hh,
+ * mln/morpho/closing_area.hh,
+ * mln/morpho/closing_area_on_vertices.hh,
+ * mln/morpho/closing_attribute.hh,
+ * mln/morpho/closing_height.hh,
+ * mln/morpho/closing_volume.hh,
+ * mln/morpho/complementation.hh,
+ * mln/morpho/contrast.hh,
+ * mln/morpho/dilation.hh,
+ * mln/morpho/elementary/closing.hh,
+ * mln/morpho/elementary/dilation.hh,
+ * mln/morpho/elementary/erosion.hh,
+ * mln/morpho/elementary/gradient.hh,
+ * mln/morpho/elementary/gradient_external.hh,
+ * mln/morpho/elementary/gradient_internal.hh,
+ * mln/morpho/elementary/laplacian.hh,
+ * mln/morpho/elementary/opening.hh,
+ * mln/morpho/elementary/top_hat.hh,
+ * mln/morpho/erosion.hh,
+ * mln/morpho/general.hh,
+ * mln/morpho/gradient.hh,
+ * mln/morpho/hit_or_miss.hh,
+ * mln/morpho/laplacian.hh,
+ * mln/morpho/opening.hh,
+ * mln/morpho/opening_area.hh,
+ * mln/morpho/opening_area_on_vertices.hh,
+ * mln/morpho/opening_attribute.hh,
+ * mln/morpho/opening_height.hh,
+ * mln/morpho/opening_volume.hh,
+ * mln/morpho/rank_filter.hh,
+ * mln/morpho/thickening.hh,
+ * mln/morpho/thin_fit.hh,
+ * mln/morpho/thinning.hh,
+ * mln/morpho/top_hat.hh,
+ * mln/morpho/tree/compute_parent.hh,
+ * mln/morpho/tree/data.hh,
+ * mln/morpho/tree/max.hh,
+ * mln/morpho/tree/utils.hh,
+ * mln/pw/value.hh,
+ * mln/subsampling/gaussian_subsampling.hh,
+ * mln/subsampling/subsampling.hh,
+ * mln/test/positive.hh,
+ * mln/test/predicate.hh,
+ * mln/transform/distance_front.hh,
+ * mln/transform/distance_geodesic.hh,
+ * mln/transform/influence_zone_front.hh,
+ * mln/transform/influence_zone_geodesic.hh,
+ * mln/value/stack.hh: apply the renaming here.
+
+2008-12-31 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Various small fixes (again).
* mln/core/image/complex_image.hh: update comments.
diff --git a/milena/mln/accu/compute.hh b/milena/mln/accu/compute.hh
index d5bbdaf..69af068 100644
--- a/milena/mln/accu/compute.hh
+++ b/milena/mln/accu/compute.hh
@@ -94,7 +94,7 @@ namespace mln
trace::entering("accu::impl::generic::compute");
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
A a;
mln_piter(I) p(input.domain());
@@ -132,7 +132,7 @@ namespace mln
{
trace::entering("accu::compute");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_result(A) output = internal::compute_dispatch(a, input);
trace::exiting("accu::compute");
@@ -146,7 +146,7 @@ namespace mln
{
trace::entering("accu::compute");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
typedef mln_accu_with(A, util::pix<I>) A_;
util::pix<I>* pix_; // So we can pass a pixel below (pixel has
diff --git a/milena/mln/accu/line.hh b/milena/mln/accu/line.hh
index 8521c99..c8a440e 100644
--- a/milena/mln/accu/line.hh
+++ b/milena/mln/accu/line.hh
@@ -97,8 +97,8 @@ namespace mln
const I& input = exact(input_);
O& output = exact(output_);
- mln_precondition(input.has_data());
- mln_precondition(output.has_data());
+ mln_precondition(input.is_valid());
+ mln_precondition(output.is_valid());
}
} // end of namespace mln::accu::internal
diff --git a/milena/mln/accu/take.hh b/milena/mln/accu/take.hh
index 5b7f3e8..6bf6119 100644
--- a/milena/mln/accu/take.hh
+++ b/milena/mln/accu/take.hh
@@ -87,7 +87,7 @@ namespace mln
inline
void take(const Image<I>& input, Accumulator<A>& a)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
impl::take(exact(input), exact(a));
}
diff --git a/milena/mln/accu/transform.hh b/milena/mln/accu/transform.hh
index c7d300b..f5f9096 100644
--- a/milena/mln/accu/transform.hh
+++ b/milena/mln/accu/transform.hh
@@ -82,7 +82,7 @@ namespace mln
const W& win = exact(win_);
A a = exact(a_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// mln_precondition(win.is_valid());
extension::adjust(input, win);
@@ -119,7 +119,7 @@ namespace mln
const W& win = exact(win_);
A a = exact(a_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// mln_precondition(win.is_valid());
extension::adjust(input, win);
@@ -188,7 +188,7 @@ namespace mln
{
trace::entering("accu::transform");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(win).is_valid());
mln_ch_value(I, mln_result(A)) output;
@@ -204,7 +204,7 @@ namespace mln
{
trace::entering("accu::transform");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(win).is_valid());
typedef mln_accu_with(A, mln_value(I)) A_;
diff --git a/milena/mln/accu/transform_diagonal.hh
b/milena/mln/accu/transform_diagonal.hh
index 49c2f3f..18d396b 100644
--- a/milena/mln/accu/transform_diagonal.hh
+++ b/milena/mln/accu/transform_diagonal.hh
@@ -88,7 +88,7 @@ namespace mln
const I& input = exact(input_);
const W& win = exact(win_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_precondition(! win.is_empty());
// mln_precondition(! win.is_valid());
diff --git a/milena/mln/accu/transform_directional.hh
b/milena/mln/accu/transform_directional.hh
index b3957f5..16f5dd0 100644
--- a/milena/mln/accu/transform_directional.hh
+++ b/milena/mln/accu/transform_directional.hh
@@ -86,7 +86,7 @@ namespace mln
const I& input = exact(input_);
const W& win = exact(win_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_precondition(! win.is_empty());
// mln_precondition(! win.is_valid());
diff --git a/milena/mln/accu/transform_snake.hh b/milena/mln/accu/transform_snake.hh
index 3fb50fe..fa3da5b 100644
--- a/milena/mln/accu/transform_snake.hh
+++ b/milena/mln/accu/transform_snake.hh
@@ -81,7 +81,7 @@ namespace mln
const I& input = exact(input_);
const W& win = exact(win_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_precondition(! win.is_empty());
// mln_precondition(! win.is_valid());
diff --git a/milena/mln/accu/transform_stop.hh b/milena/mln/accu/transform_stop.hh
index df61e5d..1978b32 100644
--- a/milena/mln/accu/transform_stop.hh
+++ b/milena/mln/accu/transform_stop.hh
@@ -78,7 +78,7 @@ namespace mln
const W& win = exact(win_);
A a = exact(a_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// mln_precondition(win.is_valid());
extension::adjust(input, win);
@@ -119,7 +119,7 @@ namespace mln
const W& win = exact(win_);
A a = exact(a_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// mln_precondition(win.is_valid());
extension::adjust(input, win);
@@ -192,7 +192,7 @@ namespace mln
{
trace::entering("accu::transform_stop");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(win).is_valid());
mln_ch_value(I, mln_result(A)) output;
@@ -208,7 +208,7 @@ namespace mln
{
trace::entering("accu::transform_stop");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(win).is_valid());
typedef mln_accu_with(A, mln_value(I)) A_;
diff --git a/milena/mln/arith/diff_abs.hh b/milena/mln/arith/diff_abs.hh
index 623a0b0..4636596 100644
--- a/milena/mln/arith/diff_abs.hh
+++ b/milena/mln/arith/diff_abs.hh
@@ -66,8 +66,8 @@ namespace mln
diff_abs(const Image<I>& lhs, const Image<I>& rhs)
{
trace::entering("arith::diff_abs");
- mln_precondition(exact(lhs).has_data());
- mln_precondition(exact(rhs).has_data());
+ mln_precondition(exact(lhs).is_valid());
+ mln_precondition(exact(rhs).is_valid());
mln_precondition(exact(rhs).domain() == exact(lhs).domain());
mln_concrete(I) output = level::transform(lhs, rhs,
fun::vv2v::diff_abs<mln_value(I)>());
diff --git a/milena/mln/arith/minus.hh b/milena/mln/arith/minus.hh
index 5a7db44..f6fd030 100644
--- a/milena/mln/arith/minus.hh
+++ b/milena/mln/arith/minus.hh
@@ -151,7 +151,7 @@ namespace mln
* \param[in] val The value.
* \result The result image.
*
- * \pre \p input.has_data
+ * \pre \p input.is_valid
*/
template <typename I, typename V>
mln_trait_op_minus(I, V)
@@ -165,7 +165,7 @@ namespace mln
* \param[in] f Function.
* \result The result image.
*
- * \pre \p input.has_data
+ * \pre \p input.is_valid
*/
template <typename I, typename V, typename F>
mln_ch_value(I, mln_result(F))
@@ -177,7 +177,7 @@ namespace mln
* \param[in,out] input The image.
* \param[in] val The value.
*
- * \pre \p input.has_data
+ * \pre \p input.is_valid
*/
template <typename I, typename V>
I&
@@ -228,7 +228,7 @@ namespace mln
{
trace::entering("operator::minus");
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
mln_trait_op_minus(I,S) output = arith::minus_cst(ima, exact(s));
trace::exiting("operator::minus");
@@ -242,7 +242,7 @@ namespace mln
{
trace::entering("operator::minus_eq");
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
arith::minus_cst_inplace(ima, exact(s));
trace::exiting("operator::minus_eq");
@@ -391,7 +391,7 @@ namespace mln
{
trace::entering("arith::minus_cst");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// Calls the previous version.
mln_trait_op_minus(I, V) output = minus(input,
@@ -409,7 +409,7 @@ namespace mln
{
trace::entering("arith::minus_cst");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// Calls the previous version.
mln_ch_value(I, mln_result(F)) output = minus(input,
@@ -444,7 +444,7 @@ namespace mln
{
trace::entering("arith::minus_cst_inplace");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// Calls the previous version.
minus_inplace(input,
diff --git a/milena/mln/arith/plus.hh b/milena/mln/arith/plus.hh
index b4f7b2f..a62522c 100644
--- a/milena/mln/arith/plus.hh
+++ b/milena/mln/arith/plus.hh
@@ -151,7 +151,7 @@ namespace mln
* \param[in] val The value.
* \result The result image.
*
- * \pre \p input.has_data
+ * \pre \p input.is_valid
*/
template <typename I, typename V>
mln_trait_op_plus(I, V)
@@ -165,7 +165,7 @@ namespace mln
* \param[in] f Function.
* \result The result image.
*
- * \pre \p input.has_data
+ * \pre \p input.is_valid
*/
template <typename I, typename V, typename F>
mln_ch_value(I, mln_result(F))
@@ -178,7 +178,7 @@ namespace mln
* \param[in] val The value.
* \result The result image.
*
- * \pre \p input.has_data
+ * \pre \p input.is_valid
*/
template <typename W, typename I, typename V>
mln_ch_value(I, W)
@@ -190,7 +190,7 @@ namespace mln
* \param[in,out] input The image.
* \param[in] val The value.
*
- * \pre \p input.has_data
+ * \pre \p input.is_valid
*/
template <typename I, typename V>
I&
@@ -243,7 +243,7 @@ namespace mln
{
trace::entering("operator::plus");
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
mln_trait_op_plus(I,S) output = arith::plus_cst(ima, exact(s));
@@ -258,7 +258,7 @@ namespace mln
{
trace::entering("operator::plus_eq");
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
arith::plus_cst_inplace(ima, exact(s));
@@ -408,7 +408,7 @@ namespace mln
{
trace::entering("arith::plus_cst");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// Calls the previous version.
mln_trait_op_plus(I, V) output = plus(input,
@@ -426,7 +426,7 @@ namespace mln
{
trace::entering("arith::plus_cst");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// Calls the previous version.
mln_ch_value(I, mln_result(F)) output = plus(input,
@@ -445,7 +445,7 @@ namespace mln
{
trace::entering("arith::plus_cst");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// Calls the previous version.
mln_ch_value(I, W) output = plus_cst(input, val,
@@ -479,7 +479,7 @@ namespace mln
{
trace::entering("arith::plus_cst_inplace");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// Calls the previous version.
plus_inplace(input,
diff --git a/milena/mln/arith/revert.hh b/milena/mln/arith/revert.hh
index ee0a386..21a3962 100644
--- a/milena/mln/arith/revert.hh
+++ b/milena/mln/arith/revert.hh
@@ -57,7 +57,7 @@ namespace mln
* \param[in] input the input image.
* \result The result image.
*
- * \pre \p input.has_data
+ * \pre \p input.is_valid
*
* It performs: \n
* for all p of input.domain \n
@@ -71,7 +71,7 @@ namespace mln
/*!
* \param[in,out] input The target image.
*
- * \pre \p input.has_data
+ * \pre \p input.is_valid
*
* It performs: \n
* for all p of input.domain \n
@@ -116,7 +116,7 @@ namespace mln
{
trace::entering("arith::revert");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output;
initialize(output, input);
@@ -132,7 +132,7 @@ namespace mln
{
trace::entering("arith::revert_inplace");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
impl::revert_(mln_trait_image_speed(I)(), exact(input), exact(input));
diff --git a/milena/mln/arith/times.hh b/milena/mln/arith/times.hh
index eedab41..0ac8a98 100644
--- a/milena/mln/arith/times.hh
+++ b/milena/mln/arith/times.hh
@@ -163,7 +163,7 @@ namespace mln
mln_trait_op_times(I,S)
operator*(const Image<I>& ima, const value::Scalar<S>& s)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
mln_trait_op_times(I,S) tmp;
initialize(tmp, ima);
arith::times_cst(ima, exact(s), tmp);
@@ -175,7 +175,7 @@ namespace mln
I&
operator*=(Image<I>& ima, const value::Scalar<S>& s)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
arith::times_cst(ima, exact(s), ima);
return exact(ima);
}
@@ -271,7 +271,7 @@ namespace mln
{
trace::entering("arith::times_cst_inplace");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
times_inplace(input, pw::cst(val) | exact(input).domain());
// Calls the previous version.
diff --git a/milena/mln/binarization/binarization.hh
b/milena/mln/binarization/binarization.hh
index 0c8d2bd..a333ef2 100644
--- a/milena/mln/binarization/binarization.hh
+++ b/milena/mln/binarization/binarization.hh
@@ -85,7 +85,7 @@ namespace mln
binarization(const Image<I>& input, const Function_v2b<F>& fun)
{
trace::entering("binarization::binarization");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mlc_is(mln_trait_value_nature(mln_value(I)),
trait::value::nature::scalar)::check();
diff --git a/milena/mln/binarization/threshold.hh b/milena/mln/binarization/threshold.hh
index 3607699..104d40e 100644
--- a/milena/mln/binarization/threshold.hh
+++ b/milena/mln/binarization/threshold.hh
@@ -67,7 +67,7 @@ namespace mln
{
trace::entering("binarization::threshold");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mlc_is(mln_trait_value_nature(mln_value(I)),
trait::value::nature::scalar)::check();
diff --git a/milena/mln/border/adjust.hh b/milena/mln/border/adjust.hh
index aa878da..2d3b02c 100644
--- a/milena/mln/border/adjust.hh
+++ b/milena/mln/border/adjust.hh
@@ -66,7 +66,7 @@ namespace mln
{
trace::entering("border::adjust");
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
if (border::get(ima) < min_thickness)
border::resize(ima, min_thickness);
diff --git a/milena/mln/border/duplicate.hh b/milena/mln/border/duplicate.hh
index cb02f92..cae556d 100644
--- a/milena/mln/border/duplicate.hh
+++ b/milena/mln/border/duplicate.hh
@@ -131,7 +131,7 @@ namespace mln
{
trace::entering("border::impl::duplicate_3D");
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
typedef mln_psite(I) P;
mln_box_runstart_piter(I) pl(ima.domain());
@@ -252,7 +252,7 @@ namespace mln
void duplicate(const Image<I>& ima)
{
trace::entering("border::duplicate");
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
if (border::get(ima) != 0)
internal::duplicate_dispatch(ima);
diff --git a/milena/mln/border/equalize.hh b/milena/mln/border/equalize.hh
index a18112c..d80a8bd 100644
--- a/milena/mln/border/equalize.hh
+++ b/milena/mln/border/equalize.hh
@@ -121,7 +121,7 @@ namespace mln
//mlc_is(mln_trait_image_border(J), trait::image::border::some)::check();
const I& ima1 = exact(ima1_);
const J& ima2 = exact(ima2_);
- mln_precondition(ima1.has_data() && ima2.has_data());
+ mln_precondition(ima1.is_valid() && ima2.is_valid());
impl::equalize_(ima1, ima2, min_thickness);
diff --git a/milena/mln/border/fill.hh b/milena/mln/border/fill.hh
index 2b837eb..d622f3b 100644
--- a/milena/mln/border/fill.hh
+++ b/milena/mln/border/fill.hh
@@ -70,7 +70,7 @@ namespace mln
inline
void fill_tests(const Image<I>& ima, const mln_value(I)&)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
(void) ima;
}
diff --git a/milena/mln/border/find.hh b/milena/mln/border/find.hh
index 0665e8a..24ee48a 100644
--- a/milena/mln/border/find.hh
+++ b/milena/mln/border/find.hh
@@ -98,7 +98,7 @@ namespace mln
{
trace::entering("border::find");
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
unsigned res = border::impl::find_(mln_trait_image_speed(I)(), exact(ima));
trace::exiting("border::find");
diff --git a/milena/mln/border/get.hh b/milena/mln/border/get.hh
index 9d752fa..c156a07 100644
--- a/milena/mln/border/get.hh
+++ b/milena/mln/border/get.hh
@@ -94,7 +94,7 @@ namespace mln
{
trace::entering("border::get");
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
unsigned res = border::impl::get_(mln_trait_image_ext_domain(I)(),
mln_trait_image_category(I)(),
exact(ima));
diff --git a/milena/mln/border/mirror.hh b/milena/mln/border/mirror.hh
index 130e3a6..fd203a8 100644
--- a/milena/mln/border/mirror.hh
+++ b/milena/mln/border/mirror.hh
@@ -202,7 +202,7 @@ namespace mln
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
mlc_is(mln_trait_image_speed(I), trait::image::speed::fastest)::check();
typedef mln_psite(I) P;
diff --git a/milena/mln/border/resize.hh b/milena/mln/border/resize.hh
index b2a2a22..fcdfad8 100644
--- a/milena/mln/border/resize.hh
+++ b/milena/mln/border/resize.hh
@@ -130,7 +130,7 @@ namespace mln
{
trace::entering("border::resize");
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
// Try to resize the primary image behind ima.
internal::resize_dispatch(primary(ima), thickness);
diff --git a/milena/mln/canvas/browsing/fwd.hh b/milena/mln/canvas/browsing/fwd.hh
index 79a07d5..fe98e42 100644
--- a/milena/mln/canvas/browsing/fwd.hh
+++ b/milena/mln/canvas/browsing/fwd.hh
@@ -90,7 +90,7 @@ namespace mln
fwd_t::operator()(F& f) const
{
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();
diff --git a/milena/mln/canvas/browsing/snake_fwd.hh
b/milena/mln/canvas/browsing/snake_fwd.hh
index 04565e4..0627be1 100644
--- a/milena/mln/canvas/browsing/snake_fwd.hh
+++ b/milena/mln/canvas/browsing/snake_fwd.hh
@@ -104,7 +104,7 @@ namespace mln
// mlc_equal(mln_trait_image_dimension(I)(),
// trait::image::dimension::two_d)::check();
trace::entering("canvas::browsing::snake_fwd");
- mln_precondition(f.input.has_data());
+ mln_precondition(f.input.is_valid());
def::coord
min_row = geom::min_row(f.input), max_row = geom::max_row(f.input),
min_col = geom::min_col(f.input), max_col = geom::max_col(f.input);
diff --git a/milena/mln/canvas/browsing/snake_generic.hh
b/milena/mln/canvas/browsing/snake_generic.hh
index 0bc951d..906ca5a 100644
--- a/milena/mln/canvas/browsing/snake_generic.hh
+++ b/milena/mln/canvas/browsing/snake_generic.hh
@@ -95,7 +95,7 @@ namespace mln
snake_generic_t::operator()(F& f) const
{
trace::entering("canvas::browsing::snake_generic");
- mln_precondition(f.input.has_data());
+ mln_precondition(f.input.is_valid());
// p init
f.p = f.input.bbox().pmin();// - f.dps[0];
diff --git a/milena/mln/canvas/browsing/snake_vert.hh
b/milena/mln/canvas/browsing/snake_vert.hh
index 36b1ceb..ea0d20f 100644
--- a/milena/mln/canvas/browsing/snake_vert.hh
+++ b/milena/mln/canvas/browsing/snake_vert.hh
@@ -104,7 +104,7 @@ namespace mln
// mlc_equal(mln_trait_image_dimension(I)(),
// trait::image::dimension::two_d)::check();
trace::entering("canvas::browsing::snake_vert");
- mln_precondition(f.input.has_data());
+ mln_precondition(f.input.is_valid());
int
min_row = geom::min_row(f.input), max_row = geom::max_row(f.input),
min_col = geom::min_col(f.input), max_col = geom::max_col(f.input);
diff --git a/milena/mln/canvas/distance_front.hh b/milena/mln/canvas/distance_front.hh
index e0eb8a6..caefa91 100644
--- a/milena/mln/canvas/distance_front.hh
+++ b/milena/mln/canvas/distance_front.hh
@@ -74,7 +74,7 @@ namespace mln
const N& nbh = exact(nbh_);
const W& w_win = exact(w_win_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// mln_precondition(w_win.is_valid());
typedef mln_site(I) P;
diff --git a/milena/mln/canvas/distance_geodesic.hh
b/milena/mln/canvas/distance_geodesic.hh
index 8abd850..7d7362b 100644
--- a/milena/mln/canvas/distance_geodesic.hh
+++ b/milena/mln/canvas/distance_geodesic.hh
@@ -67,7 +67,7 @@ namespace mln
const I& input = exact(input_);
const N& nbh = exact(nbh_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// mln_precondition(nbh.is_valid());
mln_ch_value(I, D) dmap; // Distance map is aux data.
diff --git a/milena/mln/canvas/labeling.hh b/milena/mln/canvas/labeling.hh
index fb539f7..e0333c6 100644
--- a/milena/mln/canvas/labeling.hh
+++ b/milena/mln/canvas/labeling.hh
@@ -69,7 +69,7 @@ namespace mln
const I& input = exact(input_);
const N& nbh = exact(nbh_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// mln_precondition(nbh.is_valid());
(void) input;
diff --git a/milena/mln/convert/from_to.hh b/milena/mln/convert/from_to.hh
index e86e73a..e10276c 100644
--- a/milena/mln/convert/from_to.hh
+++ b/milena/mln/convert/from_to.hh
@@ -77,7 +77,7 @@ namespace mln
{
mlc_is(mln_trait_site_set_contents(S),
mln::trait::site_set::contents::dynamic)::check();
- mln_precondition(exact(from).has_data());
+ mln_precondition(exact(from).is_valid());
mln::convert::impl::from_image_to_site_set(from, to);
}
diff --git a/milena/mln/convert/to_p_set.hh b/milena/mln/convert/to_p_set.hh
index 0c08d03..db246f2 100644
--- a/milena/mln/convert/to_p_set.hh
+++ b/milena/mln/convert/to_p_set.hh
@@ -100,7 +100,7 @@ namespace mln
to_p_set(const Image<I>& ima_)
{
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
// FIXME: Check that ima is binary!
// mln::metal::templated_by<mln_value(I), bool >::check();
diff --git a/milena/mln/convert/to_window.hh b/milena/mln/convert/to_window.hh
index 95cdf2b..a706675 100644
--- a/milena/mln/convert/to_window.hh
+++ b/milena/mln/convert/to_window.hh
@@ -97,7 +97,7 @@ namespace mln
window<mln_site(I)::dpsite> to_window(const Image<I>& ima_)
{
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
// FIXME: Check that ima is binary!
typedef mln_site(I) P;
typedef mln_dpsite(P) D;
diff --git a/milena/mln/core/concept/doc/image.hh b/milena/mln/core/concept/doc/image.hh
index cc8c949..a3c7bac 100644
--- a/milena/mln/core/concept/doc/image.hh
+++ b/milena/mln/core/concept/doc/image.hh
@@ -73,7 +73,7 @@ namespace mln
/*! \brief Test if the image have been initialized.
*/
- bool has_data() const;
+ bool is_valid() const;
/*! \brief Test if the image owns the point site \p p.
*
diff --git a/milena/mln/core/concept/image.hh b/milena/mln/core/concept/image.hh
index 88a5582..3cf738c 100644
--- a/milena/mln/core/concept/image.hh
+++ b/milena/mln/core/concept/image.hh
@@ -88,7 +88,7 @@ namespace mln
bool has(const psite& p) const;
unsigned nsites() const; // If relevant.
- bool has_data() const;
+ bool is_valid() const;
// to be provided in concrete image classes:
@@ -202,7 +202,7 @@ namespace mln
// unsigned (E::*m2)() const = & E::nsites;
// m2 = 0;
- bool (E::*m3)() const = & E::has_data;
+ bool (E::*m3)() const = & E::is_valid;
m3 = 0;
// to be provided in concrete image classes:
@@ -263,7 +263,7 @@ namespace mln
metal::bool_<(mlc_pow_int(s, d) == S)>::check();
I& to = exact(to_);
- mln_precondition(! to.has_data());
+ mln_precondition(! to.is_valid());
box<P> b(all_to(0), all_to(s - 1));
to.init_(b);
diff --git a/milena/mln/core/concept/window.hh b/milena/mln/core/concept/window.hh
index 0b6ba51..158e5dd 100644
--- a/milena/mln/core/concept/window.hh
+++ b/milena/mln/core/concept/window.hh
@@ -328,7 +328,7 @@ namespace mln
I& ima = exact(ima_);
// mln_precondition(win.is_valid());
- mln_precondition(! ima.has_data());
+ mln_precondition(! ima.is_valid());
// Hack (below) to avoid circular dependency.
ima.init_(mln::internal::geom_bbox(win));
diff --git a/milena/mln/core/dpoints_pixter.hh b/milena/mln/core/dpoints_pixter.hh
index 7b570d2..1056a21 100644
--- a/milena/mln/core/dpoints_pixter.hh
+++ b/milena/mln/core/dpoints_pixter.hh
@@ -227,7 +227,7 @@ namespace mln
const Pref& p_ref)
: super_(image)
{
- mln_precondition(image.has_data());
+ mln_precondition(image.is_valid());
mlc_converts_to(Pref, const mln_psite(I)&)::check();
p_ref_ = & static_cast< const mln_psite(I)& >(p_ref);
@@ -244,7 +244,7 @@ namespace mln
: super_(internal::force_exact<Pref>(pxl_ref_).ima())
{
const Pref& pxl_ref = internal::force_exact<Pref>(pxl_ref_);
- mln_precondition(pxl_ref.ima().has_data());
+ mln_precondition(pxl_ref.ima().is_valid());
p_ref_ = 0;
// Potential promotion from (T**) to (const T**) shall be forced.
value_ref_ = const_cast<mln_qlf_value(I)**>(pxl_ref.address_());
@@ -341,7 +341,7 @@ namespace mln
const Pref& p_ref)
: super_(image)
{
- mln_precondition(image.has_data());
+ mln_precondition(image.is_valid());
internal::get_adr(p_ref_, p_ref);
value_ref_ = 0;
init_(dps);
@@ -355,7 +355,7 @@ namespace mln
: super_(internal::force_exact<Pref>(pxl_ref_).ima())
{
const Pref& pxl_ref = internal::force_exact<Pref>(pxl_ref_);
- mln_precondition(pxl_ref.ima().has_data());
+ mln_precondition(pxl_ref.ima().is_valid());
p_ref_ = 0;
// Potential promotion from (T**) to (const T**) shall be forced.
value_ref_ = const_cast<mln_qlf_value(I)**>(pxl_ref.address_());
diff --git a/milena/mln/core/image/bgraph_image.hh
b/milena/mln/core/image/bgraph_image.hh
index c0a71e1..a59c1de 100644
--- a/milena/mln/core/image/bgraph_image.hh
+++ b/milena/mln/core/image/bgraph_image.hh
@@ -259,7 +259,7 @@ namespace mln
const p_bgraph<P>&
bgraph_image<P, V>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->pg_;
}
diff --git a/milena/mln/core/image/cast_image.hh b/milena/mln/core/image/cast_image.hh
index 1d3dbfc..91e5339 100644
--- a/milena/mln/core/image/cast_image.hh
+++ b/milena/mln/core/image/cast_image.hh
@@ -150,7 +150,7 @@ namespace mln
cast_image_<T,I>
cast_image(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
cast_image_<T,I> tmp(ima);
return tmp;
}
@@ -179,7 +179,7 @@ namespace mln
inline
cast_image_<T,I>::cast_image_(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
this->data_ = new internal::data< cast_image_<T,I> >(exact(ima));
}
@@ -188,7 +188,7 @@ namespace mln
void
cast_image_<T,I>::init_(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
this->data_ = new internal::data<cast_image_<T,I> >(exact(ima));
}
diff --git a/milena/mln/core/image/ch_piter.hh b/milena/mln/core/image/ch_piter.hh
index bf498cf..10787fa 100644
--- a/milena/mln/core/image/ch_piter.hh
+++ b/milena/mln/core/image/ch_piter.hh
@@ -134,7 +134,7 @@ namespace mln
inline
ch_piter_image<I,Fwd>::ch_piter_image(I& ima)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
init_(ima);
}
@@ -143,7 +143,7 @@ namespace mln
void
ch_piter_image<I,Fwd>::init_(I& ima)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
this->data_ = new internal::data< ch_piter_image<I,Fwd> >(ima);
}
diff --git a/milena/mln/core/image/complex_image.hh
b/milena/mln/core/image/complex_image.hh
index 0e98c4e..b5303a4 100644
--- a/milena/mln/core/image/complex_image.hh
+++ b/milena/mln/core/image/complex_image.hh
@@ -260,7 +260,7 @@ namespace mln
complex_image<D, G, V>::init_(const p_complex<D, G>& pc,
const metal::vec< D + 1, std::vector<V> >& values)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ =
new internal::data< complex_image<D, G, V> >(pc, values);
}
@@ -300,7 +300,7 @@ namespace mln
const p_complex<D, G>&
complex_image<D, G, V>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->pc_;
}
diff --git a/milena/mln/core/image/decorated_image.hh
b/milena/mln/core/image/decorated_image.hh
index 0ef3c28..f97eceb 100644
--- a/milena/mln/core/image/decorated_image.hh
+++ b/milena/mln/core/image/decorated_image.hh
@@ -169,7 +169,7 @@ namespace mln
inline
decorated_image<I,D>::decorated_image(I& ima, const D& deco)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
this->data_ = new internal::data< decorated_image<I,D> >(ima, deco);
}
@@ -178,7 +178,7 @@ namespace mln
void
decorated_image<I,D>::init_(I& ima, const D& deco)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
this->data_ = new internal::data<decorated_image<I,D> >(ima, deco);
}
diff --git a/milena/mln/core/image/extended.hh b/milena/mln/core/image/extended.hh
index bd5f142..c6451a0 100644
--- a/milena/mln/core/image/extended.hh
+++ b/milena/mln/core/image/extended.hh
@@ -179,7 +179,7 @@ namespace mln
void
extended<I>::init_(I& ima, const box<mln_site(I)>& b)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ = new internal::data< extended<I> >(ima, b);
}
@@ -200,7 +200,7 @@ namespace mln
{
mlc_not_equal(mln_trait_image_ext_domain(I),
trait::image::ext_domain::none)::check();
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
extended<const I> tmp(exact(ima), exact(b));
return tmp;
}
@@ -211,7 +211,7 @@ namespace mln
{
mlc_not_equal(mln_trait_image_ext_domain(I),
trait::image::ext_domain::none)::check();
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
extended<I> tmp(exact(ima), exact(b));
return tmp;
}
diff --git a/milena/mln/core/image/extension_fun.hh
b/milena/mln/core/image/extension_fun.hh
index 202a256..c140283 100644
--- a/milena/mln/core/image/extension_fun.hh
+++ b/milena/mln/core/image/extension_fun.hh
@@ -209,7 +209,7 @@ namespace mln
mln_value(I)
extension_fun<I, F>::operator()(const mln_psite(I)& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
// if-else is preferred to the ternary op to allow for the
// function result to convert towards the expected return type.
if (this->data_->ima_.domain().has(p))
@@ -224,7 +224,7 @@ namespace mln
extension_fun<I, F>::operator()(const mln_psite(I)& p)
{
static mln_value(I) cpy;
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
// See the above comment about if-else v. ternary.
if (this->data_->ima_.domain().has(p))
return this->data_->ima_(p);
@@ -243,7 +243,7 @@ namespace mln
const F&
extension_fun<I, F>::extension() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->fun_;
}
diff --git a/milena/mln/core/image/extension_ima.hh
b/milena/mln/core/image/extension_ima.hh
index c092187..bb11b8a 100644
--- a/milena/mln/core/image/extension_ima.hh
+++ b/milena/mln/core/image/extension_ima.hh
@@ -210,8 +210,8 @@ namespace mln
bool
extension_ima<I, J>::has(const P& p) const
{
- mln_precondition(this->has_data());
- mln_precondition(this->data_->ext_.has_data());
+ mln_precondition(this->is_valid());
+ mln_precondition(this->data_->ext_.is_valid());
return
this->data_->ima_.domain().has(p)
|| this->data_->ext_.has(p);
@@ -222,7 +222,7 @@ namespace mln
mln_value(I)
extension_ima<I, J>::operator()(const mln_psite(I)& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
mln_precondition(has(p));
// if-else is preferred to the ternary op to allow for the
// function result to convert towards the expected return type.
@@ -238,7 +238,7 @@ namespace mln
extension_ima<I, J>::operator()(const mln_psite(I)& p)
{
static mln_value(I) cpy;
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
mln_precondition(has(p));
// See the above comment about if-else v. ternary.
if (this->data_->ima_.domain().has(p))
@@ -258,7 +258,7 @@ namespace mln
mlc_const(J)&
extension_ima<I, J>::extension() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->ext_;
}
@@ -267,7 +267,7 @@ namespace mln
J&
extension_ima<I, J>::extension()
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->ext_;
}
diff --git a/milena/mln/core/image/extension_val.hh
b/milena/mln/core/image/extension_val.hh
index 3605df6..63dbeb7 100644
--- a/milena/mln/core/image/extension_val.hh
+++ b/milena/mln/core/image/extension_val.hh
@@ -204,7 +204,7 @@ namespace mln
mln_value(I)
extension_val<I>::operator()(const mln_psite(I)& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
// if-else is preferred to the ternary op to allow conversions.
if (this->data_->ima_.domain().has(p))
return this->data_->ima_(p);
@@ -218,7 +218,7 @@ namespace mln
extension_val<I>::operator()(const mln_psite(I)& p)
{
static mln_value(I) cpy;
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
// See the above comment about if-else v. ternary.
if (this->data_->ima_.domain().has(p))
return this->data_->ima_(p);
@@ -235,7 +235,7 @@ namespace mln
const mln_value(I)&
extension_val<I>::extension() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->val_;
}
@@ -244,7 +244,7 @@ namespace mln
void
extension_val<I>::change_extension(const mln_value(I)& val)
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
this->data_->val_ = val;
}
diff --git a/milena/mln/core/image/flat_image.hh b/milena/mln/core/image/flat_image.hh
index 77f7f4b..3cff361 100644
--- a/milena/mln/core/image/flat_image.hh
+++ b/milena/mln/core/image/flat_image.hh
@@ -207,7 +207,7 @@ namespace mln
void
flat_image<T,S>::init_(const T& val, const S& pset)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ = new internal::data< flat_image<T,S> >(val, pset);
}
@@ -232,7 +232,7 @@ namespace mln
const T&
flat_image<T,S>::operator()(const mln_psite(S)&) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->val_;
}
@@ -241,7 +241,7 @@ namespace mln
const T&
flat_image<T,S>::operator()(const mln_psite(S)&)
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->val_;
}
@@ -250,7 +250,7 @@ namespace mln
void
flat_image<T,S>::change_value(const T& old_val, const T& new_val)
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
mln_precondition(old_val == this->data_->val_);
this->data_->val_ = new_val;
@@ -263,7 +263,7 @@ namespace mln
const T&
flat_image<T,S>::val() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->val_;
}
@@ -272,7 +272,7 @@ namespace mln
T&
flat_image<T,S>::val()
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->val_;
}
diff --git a/milena/mln/core/image/fun_image.hh b/milena/mln/core/image/fun_image.hh
index f338d08..acf2716 100644
--- a/milena/mln/core/image/fun_image.hh
+++ b/milena/mln/core/image/fun_image.hh
@@ -147,7 +147,7 @@ namespace mln
inline
fun_image<F,I>::fun_image(Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
this->data_ = new internal::data< fun_image<F,I> >(exact(ima));
}
@@ -157,7 +157,7 @@ namespace mln
void
fun_image<F,I>::init_(Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
this->data_ = new internal::data<fun_image<F,I> >(exact(ima));
}
diff --git a/milena/mln/core/image/hexa.hh b/milena/mln/core/image/hexa.hh
index 433907b..66ccdb1 100644
--- a/milena/mln/core/image/hexa.hh
+++ b/milena/mln/core/image/hexa.hh
@@ -205,7 +205,7 @@ namespace mln
void
hexa<I>::init_(I& ima)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
box2d b_in = ima.bbox();
box2d_h b = make::box2d_h(b_in.pmin()[0] * 2, b_in.pmin()[1],
b_in.pmax()[0] * 2, (b_in.pmax()[1] + 1) * 2 - 1);
@@ -232,7 +232,7 @@ namespace mln
typename hexa<I>::rvalue
hexa<I>::operator()(const point2d_h& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
mln_precondition(this->has(p));
return this->data_->ima_(point2d(p[0] / 2, p[1] / 2));
}
@@ -242,7 +242,7 @@ namespace mln
typename hexa<I>::lvalue
hexa<I>::operator()(const point2d_h& p)
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
mln_precondition(this->has(p));
return this->data_->ima_(point2d(p[0] / 2, p[1] / 2));
}
@@ -252,7 +252,7 @@ namespace mln
const box2d_h&
hexa<I>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_;
}
@@ -261,7 +261,7 @@ namespace mln
bool
hexa<I>::has(const psite& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->ima_.has(point2d(p[0] / 2, p[1] / 2));
}
diff --git a/milena/mln/core/image/image1d.hh b/milena/mln/core/image/image1d.hh
index 28c8953..d86bc53 100644
--- a/milena/mln/core/image/image1d.hh
+++ b/milena/mln/core/image/image1d.hh
@@ -356,7 +356,7 @@ namespace mln
void
image1d<T>::init_(const box1d& b, unsigned bdr)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ = new internal::data< image1d<T> >(b, bdr);
}
@@ -365,7 +365,7 @@ namespace mln
const box1d&
image1d<T>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_;
}
@@ -374,7 +374,7 @@ namespace mln
const box1d&
image1d<T>::bbox() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_;
}
@@ -383,7 +383,7 @@ namespace mln
unsigned
image1d<T>::border() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->bdr_;
}
@@ -392,7 +392,7 @@ namespace mln
unsigned
image1d<T>::nelements() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->vb_.nsites();
}
@@ -401,7 +401,7 @@ namespace mln
bool
image1d<T>::has(const point1d& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->vb_.has(p);
}
@@ -465,7 +465,7 @@ namespace mln
const T*
image1d<T>::buffer() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->buffer_;
}
@@ -474,7 +474,7 @@ namespace mln
T*
image1d<T>::buffer()
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->buffer_;
}
@@ -483,7 +483,7 @@ namespace mln
int
image1d<T>::delta_index(const dpoint1d& dp) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
int o = dp[0];
return o;
}
diff --git a/milena/mln/core/image/image2d.hh b/milena/mln/core/image/image2d.hh
index a9b8df6..3146b14 100644
--- a/milena/mln/core/image/image2d.hh
+++ b/milena/mln/core/image/image2d.hh
@@ -408,7 +408,7 @@ namespace mln
void
image2d<T>::init_(const box2d& b, unsigned bdr)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ = new internal::data< image2d<T> >(b, bdr);
}
@@ -417,7 +417,7 @@ namespace mln
const box2d&
image2d<T>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_;
}
@@ -426,7 +426,7 @@ namespace mln
const box2d&
image2d<T>::bbox() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_;
}
@@ -435,7 +435,7 @@ namespace mln
bool
image2d<T>::has(const point2d& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->vb_.has(p);
}
@@ -483,7 +483,7 @@ namespace mln
unsigned
image2d<T>::nrows() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_.len(0);
}
@@ -492,7 +492,7 @@ namespace mln
unsigned
image2d<T>::ncols() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->b_.len(1);
}
@@ -504,7 +504,7 @@ namespace mln
unsigned
image2d<T>::border() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->bdr_;
}
@@ -513,7 +513,7 @@ namespace mln
unsigned
image2d<T>::nelements() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->vb_.nsites();
}
@@ -540,7 +540,7 @@ namespace mln
const T*
image2d<T>::buffer() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->buffer_;
}
@@ -549,7 +549,7 @@ namespace mln
T*
image2d<T>::buffer()
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->buffer_;
}
@@ -558,7 +558,7 @@ namespace mln
int
image2d<T>::delta_index(const dpoint2d& dp) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
int o = dp[0] * this->data_->vb_.len(1) + dp[1];
return o;
}
@@ -584,7 +584,7 @@ namespace mln
void
image2d<T>::resize_(unsigned new_border)
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
this->data_->reallocate_(new_border);
}
diff --git a/milena/mln/core/image/image3d.hh b/milena/mln/core/image/image3d.hh
index eebe251..839f8d4 100644
--- a/milena/mln/core/image/image3d.hh
+++ b/milena/mln/core/image/image3d.hh
@@ -396,7 +396,7 @@ namespace mln
void
image3d<T>::init_(const box3d& b, unsigned bdr)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ = new internal::data< image3d<T> >(b, bdr);
}
@@ -405,7 +405,7 @@ namespace mln
const box3d&
image3d<T>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return data_->b_;
}
@@ -414,7 +414,7 @@ namespace mln
const box3d&
image3d<T>::bbox() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return data_->b_;
}
@@ -423,7 +423,7 @@ namespace mln
unsigned
image3d<T>::border() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return data_->bdr_;
}
@@ -432,7 +432,7 @@ namespace mln
unsigned
image3d<T>::nelements() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return data_->vb_.nsites();
}
@@ -441,7 +441,7 @@ namespace mln
bool
image3d<T>::has(const point3d& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return data_->vb_.has(p);
}
@@ -504,7 +504,7 @@ namespace mln
const T*
image3d<T>::buffer() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return data_->buffer_;
}
@@ -513,7 +513,7 @@ namespace mln
T*
image3d<T>::buffer()
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return data_->buffer_;
}
@@ -522,7 +522,7 @@ namespace mln
int
image3d<T>::delta_index(const dpoint3d& dp) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
int o = dp[0];
return o;
}
diff --git a/milena/mln/core/image/image_if.hh b/milena/mln/core/image/image_if.hh
index ce07f35..a867c3d 100644
--- a/milena/mln/core/image/image_if.hh
+++ b/milena/mln/core/image/image_if.hh
@@ -199,7 +199,7 @@ namespace mln
void
image_if<I,F>::init_(I& ima, const F& f)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ = new internal::data< image_if<I,F> >(ima, f);
}
@@ -208,7 +208,7 @@ namespace mln
const p_if<mln_pset(I), F>&
image_if<I,F>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->pset_;
}
@@ -216,7 +216,7 @@ namespace mln
inline
image_if<I,F>::operator image_if<const I,F>() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
image_if<const I,F> tmp(this->data_->ima_,
this->data_->pset_.predicate());
return tmp;
diff --git a/milena/mln/core/image/interpolated.hh
b/milena/mln/core/image/interpolated.hh
index 1d6dff1..5b37eb5 100644
--- a/milena/mln/core/image/interpolated.hh
+++ b/milena/mln/core/image/interpolated.hh
@@ -113,7 +113,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;
@@ -154,7 +154,7 @@ namespace mln
interpolated<I,F>::interpolated(I& ima)
: fun_(ima)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
init_(ima);
}
@@ -169,15 +169,15 @@ namespace mln
void
interpolated<I, F >::init_(I& ima)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
this->data_ = new internal::data< interpolated<I,F> >(ima);
}
template <typename I, template <class> class F>
inline
- bool interpolated<I,F>::has_data() const
+ bool interpolated<I,F>::is_valid() const
{
- mln_invariant(this->data_->ima_.has_data());
+ mln_invariant(this->data_->ima_.is_valid());
return true;
}
diff --git a/milena/mln/core/image/lazy_image.hh b/milena/mln/core/image/lazy_image.hh
index 965b15f..0c6aa5f 100644
--- a/milena/mln/core/image/lazy_image.hh
+++ b/milena/mln/core/image/lazy_image.hh
@@ -108,7 +108,7 @@ namespace mln
typedef lazy_image< tag::image_<I>, F, B > skeleton;
/// Test if a pixel value is accessible at \p p.
- using super_::has_data;
+ using super_::is_valid;
/// Constructors.
lazy_image();
diff --git a/milena/mln/core/image/mono_obased_rle_image.hh
b/milena/mln/core/image/mono_obased_rle_image.hh
index 7fcb95c..caad8ed 100644
--- a/milena/mln/core/image/mono_obased_rle_image.hh
+++ b/milena/mln/core/image/mono_obased_rle_image.hh
@@ -138,7 +138,7 @@ namespace mln
T& operator()(const mln_psite(pset)& site);
/// Test if this image has been initialized.
- bool has_data() const;
+ bool is_valid() const;
/// Give the definition domain.
const pset& domain() const;
@@ -202,7 +202,7 @@ namespace mln
template <typename P, typename T>
inline
bool
- mono_obased_rle_image<P, T>::has_data() const
+ mono_obased_rle_image<P, T>::is_valid() const
{
return this->data_->ima_.size() != 0;
}
diff --git a/milena/mln/core/image/mono_rle_image.hh
b/milena/mln/core/image/mono_rle_image.hh
index 0a0f491..d322948 100644
--- a/milena/mln/core/image/mono_rle_image.hh
+++ b/milena/mln/core/image/mono_rle_image.hh
@@ -137,7 +137,7 @@ namespace mln
lvalue operator() (const mln_psite(pset)& site);
/// Test if this image has been initialized.
- bool has_data() const;
+ bool is_valid() const;
/// Give the uniq value of the image.
rvalue get_value() const;
@@ -198,7 +198,7 @@ namespace mln
template <typename P, typename T>
inline
bool
- mono_rle_image<P, T>::has_data() const
+ mono_rle_image<P, T>::is_valid() const
{
return true;
}
diff --git a/milena/mln/core/image/obased_rle_image.hh
b/milena/mln/core/image/obased_rle_image.hh
index 624c181..43868cd 100644
--- a/milena/mln/core/image/obased_rle_image.hh
+++ b/milena/mln/core/image/obased_rle_image.hh
@@ -143,7 +143,7 @@ namespace mln
lvalue operator() (const mln_psite(pset)& site);
/// Test if this image has been initialized.
- bool has_data() const;
+ bool is_valid() const;
/// Give the definition domain.
const pset& domain() const;
@@ -212,7 +212,7 @@ namespace mln
template <typename P, typename T>
inline
bool
- obased_rle_image<P, T>::has_data() const
+ obased_rle_image<P, T>::is_valid() const
{
return this->data_->values_.size() != 0;
}
diff --git a/milena/mln/core/image/plain.hh b/milena/mln/core/image/plain.hh
index 5d39ce0..cd184ba 100644
--- a/milena/mln/core/image/plain.hh
+++ b/milena/mln/core/image/plain.hh
@@ -146,7 +146,7 @@ namespace mln
plain<I>::plain(const plain<I>& rhs)
: super_()
{
- mln_precondition(rhs.has_data());
+ mln_precondition(rhs.is_valid());
init_(rhs.data_->ima_);
}
@@ -154,7 +154,7 @@ namespace mln
inline
plain<I>::plain(const I& ima)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
init_(ima);
}
@@ -163,7 +163,7 @@ namespace mln
void
plain<I>::init_(const I& ima)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
this->data_ = new internal::data< plain<I> >(ima);
}
@@ -172,7 +172,7 @@ namespace mln
plain<I>&
plain<I>::operator=(const plain<I>& rhs)
{
- mln_precondition(rhs.has_data());
+ mln_precondition(rhs.is_valid());
if (&rhs == this)
return *this;
this->destroy();
@@ -185,7 +185,7 @@ namespace mln
plain<I>&
plain<I>::operator=(const I& ima)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
this->destroy();
init_(ima);
return *this;
@@ -195,7 +195,7 @@ namespace mln
inline
plain<I>::operator I () const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return duplicate(this->data_->ima_);
}
diff --git a/milena/mln/core/image/rle_image.hh b/milena/mln/core/image/rle_image.hh
index 91a4b66..8c5e21d 100644
--- a/milena/mln/core/image/rle_image.hh
+++ b/milena/mln/core/image/rle_image.hh
@@ -129,7 +129,7 @@ namespace mln
lvalue operator() (const mln_psite(pset)& site);
/// Test if this image has been initialized.
- bool has_data() const;
+ bool is_valid() const;
/// Give the definition domain.
const pset& domain() const;
@@ -178,7 +178,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->data_->values_.size() != 0;
}
@@ -188,7 +188,7 @@ namespace mln
void
rle_image<P, T>::insert(const p_run<P>& pr, T value)
{
- if (!this->has_data())
+ if (!this->is_valid())
this->data_ = new internal::data< rle_image<P,T> >();
mln_assertion(this->data_->values_.size() == 0 ||
pr[0] > this->data_->domain_[this->data_->domain_.nsites() -
1].start());
diff --git a/milena/mln/core/image/safe.hh b/milena/mln/core/image/safe.hh
index 92815e2..69fd854 100644
--- a/milena/mln/core/image/safe.hh
+++ b/milena/mln/core/image/safe.hh
@@ -145,7 +145,7 @@ namespace mln
inline
safe_image<I>::safe_image(I& ima, const mln_value(I)& default_value)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
init_(ima, default_value);
}
@@ -153,7 +153,7 @@ namespace mln
inline
safe_image<I>::safe_image(I& ima)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
init_(ima, mln_value(I)());
}
@@ -162,8 +162,8 @@ namespace mln
void
safe_image<I>::init_(I& ima, const mln_value(I)& default_value)
{
- mln_precondition(! this->has_data());
- mln_precondition(ima.has_data());
+ mln_precondition(! this->is_valid());
+ mln_precondition(ima.is_valid());
this->data_ = new internal::data< safe_image<I> >(ima,
default_value);
}
@@ -172,7 +172,7 @@ namespace mln
mln_rvalue(I)
safe_image<I>::operator()(const mln_psite(I)& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
if (! this->has(p))
return this->data_->default_value_;
return this->data_->ima_(p);
@@ -183,7 +183,7 @@ namespace mln
mln_morpher_lvalue(I)
safe_image<I>::operator()(const mln_psite(I)& p)
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
static mln_value(I) forget_it_;
if (this->has(p))
return this->data_->ima_(p);
diff --git a/milena/mln/core/image/sparse_image.hh
b/milena/mln/core/image/sparse_image.hh
index e38529e..02da185 100644
--- a/milena/mln/core/image/sparse_image.hh
+++ b/milena/mln/core/image/sparse_image.hh
@@ -212,7 +212,7 @@ namespace mln
sparse_image<P,T>::insert(const p_run<P>& r, const
std::vector<T>& vals)
{
mln_precondition(r.nsites() == vals.size());
- if (! this->has_data())
+ if (! this->is_valid())
this->data_ = new internal::data< sparse_image<P,T> >();
this->data_->domain_.insert(r);
this->data_->values_.push_back(vals);
@@ -223,7 +223,7 @@ namespace mln
bool
sparse_image<P,T>::has(const psite& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->domain_.has(p);
}
@@ -250,7 +250,7 @@ namespace mln
const p_set_of< p_run<P> >&
sparse_image<P,T>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->domain_;
}
diff --git a/milena/mln/core/image/sub_image.hh b/milena/mln/core/image/sub_image.hh
index 507983c..025d9d9 100644
--- a/milena/mln/core/image/sub_image.hh
+++ b/milena/mln/core/image/sub_image.hh
@@ -195,7 +195,7 @@ namespace mln
void
sub_image<I,S>::init_(I& ima, const S& pset)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ = new internal::data< sub_image<I,S> >(ima, pset);
}
diff --git a/milena/mln/core/image/sub_image_if.hh
b/milena/mln/core/image/sub_image_if.hh
index 4de0425..773e268 100644
--- a/milena/mln/core/image/sub_image_if.hh
+++ b/milena/mln/core/image/sub_image_if.hh
@@ -194,7 +194,7 @@ namespace mln
void
sub_image_if<I,S>::init_(I& ima, const S& s)
{
- mln_precondition(! this->has_data());
+ mln_precondition(! this->is_valid());
this->data_ = new internal::data< sub_image_if<I,S> >(ima, s);
}
diff --git a/milena/mln/core/image/t_image.hh b/milena/mln/core/image/t_image.hh
index 75b03fd..7fcc449 100644
--- a/milena/mln/core/image/t_image.hh
+++ b/milena/mln/core/image/t_image.hh
@@ -125,7 +125,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.
bool has(const mln_psite(I)& p) const;
@@ -195,7 +195,7 @@ namespace mln
void
t_image<I>::init_(I& ima, unsigned dim1, unsigned dim2)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
/* FIXME: Add a precondition on the fact that the domain of ima is
a box. */
// We don't use mln::t_image::transpose here, since one its
@@ -209,9 +209,9 @@ namespace mln
template <typename I>
inline
- bool t_image<I>::has_data() const
+ bool t_image<I>::is_valid() const
{
- mln_invariant(this->delegatee_()->has_data());
+ mln_invariant(this->delegatee_()->is_valid());
return true;
}
@@ -220,7 +220,7 @@ namespace mln
bool
t_image<I>::has(const mln_psite(I)& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->delegatee_()->has(transpose_(p));
}
@@ -229,7 +229,7 @@ namespace mln
mln_psite(I)
t_image<I>::transpose_(const mln_psite(I)& p) const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return exchange_coords_(p, this->data_->dim1_, this->data_->dim2_);
}
@@ -250,7 +250,7 @@ namespace mln
const box<mln_psite(I)>&
t_image<I>::domain() const
{
- mln_precondition(this->has_data());
+ mln_precondition(this->is_valid());
return this->data_->box_;
}
diff --git a/milena/mln/core/image/tr_image.hh b/milena/mln/core/image/tr_image.hh
index 6459750..2ace346 100644
--- a/milena/mln/core/image/tr_image.hh
+++ b/milena/mln/core/image/tr_image.hh
@@ -121,7 +121,7 @@ namespace mln
void init_(const S& s, I& ima, const T& tr);
/// 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;
@@ -171,16 +171,16 @@ namespace mln
void
tr_image<S,I,T>::init_(const S& s, I& ima, const T& tr)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
this->data_ = new internal::data< tr_image<S,I,T> >(s, ima, tr);
}
template <typename S, typename I, typename T>
inline
bool
- tr_image<S,I,T>::has_data() const
+ tr_image<S,I,T>::is_valid() const
{
- mln_invariant(this->delegatee_()->has_data());
+ mln_invariant(this->delegatee_()->is_valid());
return true;
}
diff --git a/milena/mln/core/image/value_enc_image.hh
b/milena/mln/core/image/value_enc_image.hh
index d0a5a54..205e28d 100644
--- a/milena/mln/core/image/value_enc_image.hh
+++ b/milena/mln/core/image/value_enc_image.hh
@@ -134,7 +134,7 @@ namespace mln
lvalue operator() (const psite& site);
/// Test if this image has been initialized.
- bool has_data() const;
+ bool is_valid() const;
/// Give the definition domain.
const pset& domain() const;
@@ -167,7 +167,7 @@ namespace mln
template <typename P, typename T>
inline
bool
- value_enc_image<P, T>::has_data() const
+ value_enc_image<P, T>::is_valid() const
{
return this->data_->values_.size() != 0;
}
@@ -177,7 +177,7 @@ namespace mln
void
value_enc_image<P, T>::insert(const p_set_of<p_run<P> >& ps, T
value)
{
- if (!this->has_data())
+ if (!this->is_valid())
this->data_ = new internal::data< value_enc_image<P,T> >();
this->data_->domain_.insert(ps);
diff --git a/milena/mln/core/image/violent_cast_image.hh
b/milena/mln/core/image/violent_cast_image.hh
index a992a36..b9808f0 100644
--- a/milena/mln/core/image/violent_cast_image.hh
+++ b/milena/mln/core/image/violent_cast_image.hh
@@ -145,7 +145,7 @@ namespace mln
violent_cast_image<T,I>
violent_cast_image_(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
violent_cast_image<T,I> tmp(ima);
return tmp;
}
@@ -175,7 +175,7 @@ namespace mln
violent_cast_image<T,I>::violent_cast_image(const Image<I>& ima)
{
metal::bool_<sizeof(T) == sizeof(typename I::value)>::check();
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
this->data_ = new internal::data< violent_cast_image<T,I>
>(exact(ima));
}
@@ -184,7 +184,7 @@ namespace mln
void
violent_cast_image<T,I>::init_(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
this->data_ = new internal::data<violent_cast_image<T,I>
>(exact(ima));
}
diff --git a/milena/mln/core/internal/check/image_fastest.hh
b/milena/mln/core/internal/check/image_fastest.hh
index f225c1e..d668575 100644
--- a/milena/mln/core/internal/check/image_fastest.hh
+++ b/milena/mln/core/internal/check/image_fastest.hh
@@ -134,7 +134,7 @@ namespace mln
image_fastest_<E,B>::index_of_point(const P& p) const
{
const E* this_ = & internal::force_exact<E>(*this);
- mln_precondition(this_->has_data());
+ mln_precondition(this_->is_valid());
mln_precondition(this_->has(p));
unsigned i = & this_->operator()(p) - this_->buffer();
diff --git a/milena/mln/core/internal/image_base.hh
b/milena/mln/core/internal/image_base.hh
index d940291..74be188 100644
--- a/milena/mln/core/internal/image_base.hh
+++ b/milena/mln/core/internal/image_base.hh
@@ -131,7 +131,7 @@ namespace mln
std::size_t nsites() const;
/// Test if this image has been initialized; default impl.
- bool has_data() const;
+ bool is_valid() const;
// FIXME: Add void init_data(..);
@@ -178,7 +178,7 @@ namespace mln
image_base<T, S, E>::image_base(const image_base& rhs)
: image_checked_<E>()
{
- mln_precondition(exact(rhs).has_data()); // FIXME: Is-it too restrictive?
+ mln_precondition(exact(rhs).is_valid()); // FIXME: Is-it too restrictive?
this->data_ = rhs.data_;
}
@@ -187,8 +187,8 @@ namespace mln
image_base<T, S, E>&
image_base<T, S, E>::operator=(const image_base<T, S, E>& rhs)
{
- mln_precondition(exact(rhs).has_data()); // FIXME: Is-it too restrictive?
- if (& rhs == this) // || ! exact(rhs).has_data())
+ mln_precondition(exact(rhs).is_valid()); // FIXME: Is-it too restrictive?
+ if (& rhs == this) // || ! exact(rhs).is_valid())
return *this;
this->data_ = rhs.data_;
return *this;
@@ -205,7 +205,7 @@ namespace mln
template <typename T, typename S, typename E>
inline
bool
- image_base<T, S, E>::has_data() const
+ image_base<T, S, E>::is_valid() const
{
return data_ != 0;
}
@@ -215,7 +215,7 @@ namespace mln
bool
image_base<T, S, E>::has(const psite& p) const
{
- mln_precondition(exact(this)->has_data());
+ mln_precondition(exact(this)->is_valid());
return exact(this)->domain().has(p);
}
@@ -226,7 +226,7 @@ namespace mln
{
mlc_equal(mln_trait_site_set_nsites(S),
mln::trait::site_set::nsites::known)::check();
- mln_precondition(exact(this)->has_data());
+ mln_precondition(exact(this)->is_valid());
return exact(this)->domain().nsites();
}
diff --git a/milena/mln/core/internal/image_morpher.hh
b/milena/mln/core/internal/image_morpher.hh
index 66ab68d..ab50ea8 100644
--- a/milena/mln/core/internal/image_morpher.hh
+++ b/milena/mln/core/internal/image_morpher.hh
@@ -78,7 +78,7 @@ namespace mln
* image_base because it also tests that the morphed image is
* also initialized.
*/
- bool has_data() const;
+ bool is_valid() const;
/// Conversion to the underlying (morphed) image.
operator I() const; // FIXME: Very dangerous? Remove?
@@ -170,19 +170,19 @@ namespace mln
inline
image_morpher<I, T, S, E>::operator I() const
{
- mln_precondition(exact(this)->has_data());
+ mln_precondition(exact(this)->is_valid());
return * this->delegatee_();
}
template <typename I, typename T, typename S, typename E>
inline
bool
- image_morpher<I, T, S, E>::has_data() const
+ image_morpher<I, T, S, E>::is_valid() const
{
return
this->data_ != 0 &&
this->delegatee_() != 0 &&
- this->delegatee_()->has_data();
+ this->delegatee_()->is_valid();
}
template <typename I, typename T, typename S, typename E>
diff --git a/milena/mln/core/internal/pixel_iterator_base.hh
b/milena/mln/core/internal/pixel_iterator_base.hh
index 6995bdf..951a134 100644
--- a/milena/mln/core/internal/pixel_iterator_base.hh
+++ b/milena/mln/core/internal/pixel_iterator_base.hh
@@ -130,7 +130,7 @@ namespace mln
pixel_iterator_base_<I, E>::pixel_iterator_base_(I& image)
: super_(image)
{
- mln_precondition(image.has_data());
+ mln_precondition(image.is_valid());
I& ima = this->image_;
boi_ = & ima( ima.domain().pmin() ) - 1;
eoi_ = & ima( ima.domain().pmax() ) + 1;
diff --git a/milena/mln/core/internal/run_image.hh
b/milena/mln/core/internal/run_image.hh
index ff36bd9..adbd45f 100644
--- a/milena/mln/core/internal/run_image.hh
+++ b/milena/mln/core/internal/run_image.hh
@@ -130,7 +130,7 @@ namespace mln
run_image_<T, P, E>::has(const mln_psite(p_set_of< p_run<P> >)&
ps) const
{
const E* ima = exact(this);
- if (!ima->has_data())
+ if (!ima->is_valid())
return false;
else
return (ps.index() < ima->data_->domain_.nsites()
diff --git a/milena/mln/core/pixel.hh b/milena/mln/core/pixel.hh
index 54598c8..bc4df1a 100644
--- a/milena/mln/core/pixel.hh
+++ b/milena/mln/core/pixel.hh
@@ -99,7 +99,7 @@ namespace mln
bool
pixel<I>::is_valid() const
{
- if (this->value_ptr_ == 0 || ! this->image_.has_data())
+ if (this->value_ptr_ == 0 || ! this->image_.is_valid())
return false;
int o = this->value_ptr_ - this->image_.buffer();
mln_psite(I) p = this->image_.point_at_index(o);
diff --git a/milena/mln/core/pixter1d.hh b/milena/mln/core/pixter1d.hh
index eaf169b..2993e67 100644
--- a/milena/mln/core/pixter1d.hh
+++ b/milena/mln/core/pixter1d.hh
@@ -99,7 +99,7 @@ namespace mln
fwd_pixter1d<I>::fwd_pixter1d(I& image)
: super_(image)
{
- mln_precondition(image.has_data());
+ mln_precondition(image.is_valid());
}
template <typename I>
@@ -120,7 +120,7 @@ namespace mln
bkd_pixter1d<I>::bkd_pixter1d(I& image)
: super_(image)
{
- mln_precondition(image.has_data());
+ mln_precondition(image.is_valid());
}
template <typename I>
diff --git a/milena/mln/core/pixter2d.hh b/milena/mln/core/pixter2d.hh
index ce84316..344a212 100644
--- a/milena/mln/core/pixter2d.hh
+++ b/milena/mln/core/pixter2d.hh
@@ -120,7 +120,7 @@ namespace mln
row_offset_(image.bbox().ncols() + border_x2_),
eor_(& opt::at(image, geom::min_row(image), geom::max_col(image)) + 1)
{
- mln_precondition(image.has_data());
+ mln_precondition(image.is_valid());
}
template <typename I>
@@ -149,7 +149,7 @@ namespace mln
row_offset_(image.bbox().ncols() + border_x2_),
bor_(& opt::at(image, geom::max_row(image), geom::min_col(image)) - 1)
{
- mln_precondition(image.has_data());
+ mln_precondition(image.is_valid());
}
template <typename I>
diff --git a/milena/mln/core/pixter3d.hh b/milena/mln/core/pixter3d.hh
index e66693c..f81d76c 100644
--- a/milena/mln/core/pixter3d.hh
+++ b/milena/mln/core/pixter3d.hh
@@ -145,7 +145,7 @@ namespace mln
geom::max_row(image),
geom::max_col(image)) + 1)
{
- mln_precondition(image.has_data());
+ mln_precondition(image.is_valid());
}
template <typename I>
@@ -189,7 +189,7 @@ namespace mln
geom::min_row(image),
geom::min_col(image)) - 1)
{
- mln_precondition(image.has_data());
+ mln_precondition(image.is_valid());
}
template <typename I>
diff --git a/milena/mln/core/routine/duplicate.hh b/milena/mln/core/routine/duplicate.hh
index 579cf1e..54e556a 100644
--- a/milena/mln/core/routine/duplicate.hh
+++ b/milena/mln/core/routine/duplicate.hh
@@ -47,7 +47,7 @@ namespace mln
/// \param[in] model The image to be duplicated.
/// \result The duplicate.
///
- /// \pre model.has_data
+ /// \pre model.is_valid
template <typename I>
mln_concrete(I) duplicate(const Image<I>& model);
diff --git a/milena/mln/core/routine/initialize.hh
b/milena/mln/core/routine/initialize.hh
index 37d6d58..9bc51c6 100644
--- a/milena/mln/core/routine/initialize.hh
+++ b/milena/mln/core/routine/initialize.hh
@@ -44,7 +44,7 @@ namespace mln
* \param[in, out] target The image to be initialized.
* \param[in] model The image to provide data for the initialization.
*
- * \pre (not target.has_data) and model.has_data
+ * \pre (not target.is_valid) and model.is_valid
*/
template <typename I, typename J>
void initialize(Image<I>& target, const Image<J>& model);
@@ -58,14 +58,14 @@ namespace mln
void initialize(Image<I>& target, const Image<J>& model)
{
trace::entering("core::initialize");
- mln_precondition(! exact(target).has_data());
- mln_precondition(exact(model).has_data());
+ mln_precondition(! exact(target).is_valid());
+ mln_precondition(exact(model).is_valid());
trace::stop();
init_(tag::image, exact(target), exact(model));
trace::resume();
- mln_postcondition(exact(target).has_data());
+ mln_postcondition(exact(target).is_valid());
trace::exiting("core::initialize");
}
diff --git a/milena/mln/core/routine/primary.hh b/milena/mln/core/routine/primary.hh
index 89279fe..340a92b 100644
--- a/milena/mln/core/routine/primary.hh
+++ b/milena/mln/core/routine/primary.hh
@@ -130,7 +130,7 @@ namespace mln
const typename internal::primary_type<I>::ret&
primary(const Image<I>& input)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
return internal::primary_(input);
}
diff --git a/milena/mln/core/site_set/p_image.hh b/milena/mln/core/site_set/p_image.hh
index 630c40c..dff9ae5 100644
--- a/milena/mln/core/site_set/p_image.hh
+++ b/milena/mln/core/site_set/p_image.hh
@@ -174,7 +174,7 @@ namespace mln
inline
p_image<I>::p_image(const I& ima)
{
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
ima_ = ima;
clear();
}
@@ -193,7 +193,7 @@ namespace mln
bool
p_image<I>::is_valid() const
{
- return ima_.has_data();
+ return ima_.is_valid();
}
template <typename I>
diff --git a/milena/mln/core/w_window.hh b/milena/mln/core/w_window.hh
index 5a3c364..ac55e2a 100644
--- a/milena/mln/core/w_window.hh
+++ b/milena/mln/core/w_window.hh
@@ -347,7 +347,7 @@ namespace mln
mlc_converts_to(W, mln_value(I))::check();
I& ima = exact(ima_);
- mln_precondition(! ima.has_data());
+ mln_precondition(! ima.is_valid());
// mln_precondition(w_win.is_valid());
ima.init_(geom::bbox(w_win));
diff --git a/milena/mln/data/fill.hh b/milena/mln/data/fill.hh
index cefdbe8..c868b4a 100644
--- a/milena/mln/data/fill.hh
+++ b/milena/mln/data/fill.hh
@@ -77,7 +77,7 @@ namespace mln
(void) ima;
mlc_is(mln_trait_image_value_io(I), trait::image::value_io::read_write)::check();
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
// FIXME: check for ambiguities...
}
diff --git a/milena/mln/data/fill_with_image.hh b/milena/mln/data/fill_with_image.hh
index 1c1d4e7..3b79e72 100644
--- a/milena/mln/data/fill_with_image.hh
+++ b/milena/mln/data/fill_with_image.hh
@@ -81,8 +81,8 @@ namespace mln
mlc_is(mln_trait_image_pw_io(I),
mln::trait::image::pw_io::read_write)::check();
mlc_converts_to(mln_value(J), mln_value(I))::check();
- mln_precondition(exact(ima).has_data());
- mln_precondition(exact(data).has_data());
+ mln_precondition(exact(ima).is_valid());
+ mln_precondition(exact(data).is_valid());
mln_precondition(exact(ima).domain() <= exact(data).domain());
}
diff --git a/milena/mln/data/fill_with_value.hh b/milena/mln/data/fill_with_value.hh
index 4a3442c..f6d0597 100644
--- a/milena/mln/data/fill_with_value.hh
+++ b/milena/mln/data/fill_with_value.hh
@@ -78,7 +78,7 @@ namespace mln
void fill_with_value_tests(Image<I>& ima, const V&)
{
mlc_converts_to(mln_exact(V), mln_value(I))::check();
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
// Avoid a warning about an undefined variable when NDEBUG
(void) ima;
diff --git a/milena/mln/data/memcpy_.hh b/milena/mln/data/memcpy_.hh
index 1c3b7ad..56b7d58 100644
--- a/milena/mln/data/memcpy_.hh
+++ b/milena/mln/data/memcpy_.hh
@@ -123,8 +123,8 @@ namespace mln
Ps& src = mln::internal::force_exact<Ps>(src_);
mln_precondition(sizeof(mln_value(Id)) == sizeof(mln_value(Is)));
- mln_precondition(dest.ima().has_data());
- mln_precondition(src.ima().has_data());
+ mln_precondition(dest.ima().is_valid());
+ mln_precondition(src.ima().is_valid());
mln_precondition(&dest.val() >= &dest.ima().element(0));
mln_precondition(&dest.val() < &dest.ima().element(0) +
diff --git a/milena/mln/data/memset_.hh b/milena/mln/data/memset_.hh
index 838f0d9..ef6ca5e 100644
--- a/milena/mln/data/memset_.hh
+++ b/milena/mln/data/memset_.hh
@@ -130,7 +130,7 @@ namespace mln
metal::is_not_const<I>::check();
P& pix = mln::internal::force_exact<P>(pix_);
- mln_precondition(pix.ima().has_data());
+ mln_precondition(pix.ima().is_valid());
mln_precondition(& pix.val() >= & pix.ima()[0]);
mln_precondition(& pix.val() < & pix.ima()[0] + pix.ima().nelements());
mln_precondition(& pix.val() + n <= & pix.ima()[0] +
pix.ima().nelements());
@@ -149,7 +149,7 @@ namespace mln
mlc_is(mln_trait_image_speed(I), trait::image::speed::fastest)::check();
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_precondition(input.has(p));
mln_precondition(input.index_of_point(p) + n <= input.nelements());
diff --git a/milena/mln/data/paste.hh b/milena/mln/data/paste.hh
index a9c72e0..9cd5954 100644
--- a/milena/mln/data/paste.hh
+++ b/milena/mln/data/paste.hh
@@ -80,7 +80,7 @@ namespace mln
check();
mlc_converts_to(mln_value(I), mln_value(J))::check();
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(exact(input).domain() <= exact(output).domain());
// Avoid warning when compiling with NDEBUG
diff --git a/milena/mln/debug/colorize.hh b/milena/mln/debug/colorize.hh
index a015f9b..544a755 100644
--- a/milena/mln/debug/colorize.hh
+++ b/milena/mln/debug/colorize.hh
@@ -105,7 +105,7 @@ namespace mln
const mln_value(L)& nlabels)
{
trace::entering("debug::colorize");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// FIXME: check that V is a color type.
// FIXME: we want to be sure that this is a label.
mlc_is_a(mln_value(L), mln::value::Symbolic)::check();
diff --git a/milena/mln/debug/iota.hh b/milena/mln/debug/iota.hh
index e6c7e4b..83bdcdc 100644
--- a/milena/mln/debug/iota.hh
+++ b/milena/mln/debug/iota.hh
@@ -79,7 +79,7 @@ namespace mln
iota(Image<I>& input)
{
trace::entering("debug::iota");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
impl::iota(mln_trait_image_speed(I)(), exact(input));
trace::exiting("debug::iota");
}
diff --git a/milena/mln/draw/box.hh b/milena/mln/draw/box.hh
index 3788801..877fdce 100644
--- a/milena/mln/draw/box.hh
+++ b/milena/mln/draw/box.hh
@@ -72,7 +72,7 @@ namespace mln
const Box<B>& b,
const mln_value(I)& v)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
mln_psite(I) pmin = exact(b).pmin();
mln_psite(I) pmax = exact(b).pmax();
diff --git a/milena/mln/draw/line.hh b/milena/mln/draw/line.hh
index e28e88b..096b041 100644
--- a/milena/mln/draw/line.hh
+++ b/milena/mln/draw/line.hh
@@ -75,7 +75,7 @@ namespace mln
const mln_value(I)& v)
{
I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
// if (! ima.has(beg) || ! ima.has(end)) trace::warning("out");
data::paste(pw::cst(v) | p_line2d(beg, end),
safe(ima).rw());
diff --git a/milena/mln/draw/plot.hh b/milena/mln/draw/plot.hh
index d1d2131..33e9f3f 100644
--- a/milena/mln/draw/plot.hh
+++ b/milena/mln/draw/plot.hh
@@ -70,7 +70,7 @@ namespace mln
const mln_psite(I)& p,
const mln_value(I)& v)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
mln_precondition(exact(ima).has(p));
for (unsigned i = 0; i < I::point::dim; i++)
diff --git a/milena/mln/estim/mean.hh b/milena/mln/estim/mean.hh
index 25457f8..6abc4c3 100644
--- a/milena/mln/estim/mean.hh
+++ b/milena/mln/estim/mean.hh
@@ -70,7 +70,7 @@ namespace mln
inline
mln_sum(mln_value(I)) mean(const Image<I>& input)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
return level::compute(accu::meta::mean(), input);
}
@@ -78,7 +78,7 @@ namespace mln
inline
void mean(const Image<I>& input, M& result)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
accu::mean<mln_value(I), S, M> a;
result = level::compute(a, input);
}
diff --git a/milena/mln/estim/min_max.hh b/milena/mln/estim/min_max.hh
index 14e1581..15397f0 100644
--- a/milena/mln/estim/min_max.hh
+++ b/milena/mln/estim/min_max.hh
@@ -63,7 +63,7 @@ namespace mln
void min_max(const Image<I>& input,
mln_value(I)& min, mln_value(I)& max)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
typedef mln_value(I) V;
std::pair<V, V> mm = level::compute(accu::meta::min_max(), input);
min = mm.first;
diff --git a/milena/mln/estim/sum.hh b/milena/mln/estim/sum.hh
index 1df276d..5e1eb1c 100644
--- a/milena/mln/estim/sum.hh
+++ b/milena/mln/estim/sum.hh
@@ -69,7 +69,7 @@ namespace mln
inline
mln_sum(mln_value(I)) sum(const Image<I>& input)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
return level::compute(accu::meta::sum(), input);
}
@@ -77,7 +77,7 @@ namespace mln
inline
void sum(const Image<I>& input, S& result)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
accu::sum<mln_value(I), S> a;
result = level::compute(a, input);
}
diff --git a/milena/mln/extension/adjust.hh b/milena/mln/extension/adjust.hh
index c81a0fe..6c86d0a 100644
--- a/milena/mln/extension/adjust.hh
+++ b/milena/mln/extension/adjust.hh
@@ -77,7 +77,7 @@ namespace mln
template <typename I>
void adjust(const I& ima, unsigned delta)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
// FIXME: Is-it right?
border::adjust(ima, delta);
}
diff --git a/milena/mln/extension/fill.hh b/milena/mln/extension/fill.hh
index 98f95ac..345ea4a 100644
--- a/milena/mln/extension/fill.hh
+++ b/milena/mln/extension/fill.hh
@@ -177,7 +177,7 @@ namespace mln
{
trace::entering("extension::fill");
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
internal::fill_dispatch(ima, val);
trace::exiting("extension::fill");
diff --git a/milena/mln/geom/bbox.hh b/milena/mln/geom/bbox.hh
index 12624dc..9a7d5bc 100644
--- a/milena/mln/geom/bbox.hh
+++ b/milena/mln/geom/bbox.hh
@@ -136,7 +136,7 @@ namespace mln
box<mln_site(I)> bbox(const Image<I>& ima_)
{
const I& ima = exact(ima_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
return geom::bbox(ima.domain());
}
diff --git a/milena/mln/geom/max_col.hh b/milena/mln/geom/max_col.hh
index ca7c305..6152e5d 100644
--- a/milena/mln/geom/max_col.hh
+++ b/milena/mln/geom/max_col.hh
@@ -57,7 +57,7 @@ namespace mln
inline
mln_deduce(I, site, coord) max_col(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
return geom::bbox(ima).pmax().col();
}
diff --git a/milena/mln/geom/max_ind.hh b/milena/mln/geom/max_ind.hh
index 9a794e0..6d5baf0 100644
--- a/milena/mln/geom/max_ind.hh
+++ b/milena/mln/geom/max_ind.hh
@@ -53,7 +53,7 @@ namespace mln
inline
mln_deduce(I, site, coord) max_ind(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
return exact(ima).bbox().pmax().ind();
}
diff --git a/milena/mln/geom/max_row.hh b/milena/mln/geom/max_row.hh
index ba6bc00..cf33984 100644
--- a/milena/mln/geom/max_row.hh
+++ b/milena/mln/geom/max_row.hh
@@ -58,7 +58,7 @@ namespace mln
inline
mln_deduce(I, site, coord) max_row(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
return geom::bbox(ima).pmax().row();
}
diff --git a/milena/mln/geom/max_sli.hh b/milena/mln/geom/max_sli.hh
index 2556d78..07920d6 100644
--- a/milena/mln/geom/max_sli.hh
+++ b/milena/mln/geom/max_sli.hh
@@ -53,7 +53,7 @@ namespace mln
inline
mln_deduce(I, site, coord) max_sli(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
return exact(ima).bbox().pmax().sli();
}
diff --git a/milena/mln/geom/min_col.hh b/milena/mln/geom/min_col.hh
index 1e01a93..cf66a3d 100644
--- a/milena/mln/geom/min_col.hh
+++ b/milena/mln/geom/min_col.hh
@@ -58,7 +58,7 @@ namespace mln
inline
mln_deduce(I, site, coord) min_col(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
return geom::bbox(ima).pmin().col();
}
diff --git a/milena/mln/geom/min_ind.hh b/milena/mln/geom/min_ind.hh
index abf4ecd..892b2fc 100644
--- a/milena/mln/geom/min_ind.hh
+++ b/milena/mln/geom/min_ind.hh
@@ -53,7 +53,7 @@ namespace mln
inline
mln_deduce(I, site, coord) min_ind(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
return exact(ima).bbox().pmin().ind();
}
diff --git a/milena/mln/geom/min_row.hh b/milena/mln/geom/min_row.hh
index e0878de..0d991ca 100644
--- a/milena/mln/geom/min_row.hh
+++ b/milena/mln/geom/min_row.hh
@@ -61,7 +61,7 @@ namespace mln
inline
mln_deduce(I, site, coord) min_row(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
return geom::bbox(ima).pmin().row();
}
diff --git a/milena/mln/geom/min_sli.hh b/milena/mln/geom/min_sli.hh
index a01de7d..9d186fe 100644
--- a/milena/mln/geom/min_sli.hh
+++ b/milena/mln/geom/min_sli.hh
@@ -53,7 +53,7 @@ namespace mln
inline
mln_deduce(I, site, coord) min_sli(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
return exact(ima).bbox().pmin().sli();
}
diff --git a/milena/mln/geom/ncols.hh b/milena/mln/geom/ncols.hh
index 577cb7d..76c2d5a 100644
--- a/milena/mln/geom/ncols.hh
+++ b/milena/mln/geom/ncols.hh
@@ -58,7 +58,7 @@ namespace mln
inline
unsigned ncols(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
return geom::max_col(ima) - geom::min_col(ima) + 1;
}
diff --git a/milena/mln/geom/ninds.hh b/milena/mln/geom/ninds.hh
index 12fd520..a331748 100644
--- a/milena/mln/geom/ninds.hh
+++ b/milena/mln/geom/ninds.hh
@@ -54,7 +54,7 @@ namespace mln
inline
unsigned ninds(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
return geom::max_ind(ima) - geom::min_ind(ima) + 1;
}
diff --git a/milena/mln/geom/nrows.hh b/milena/mln/geom/nrows.hh
index 39e750d..c7f3e9a 100644
--- a/milena/mln/geom/nrows.hh
+++ b/milena/mln/geom/nrows.hh
@@ -58,7 +58,7 @@ namespace mln
inline
unsigned nrows(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
return geom::max_row(ima) - geom::min_row(ima) + 1;
}
diff --git a/milena/mln/geom/nsites.hh b/milena/mln/geom/nsites.hh
index f161910..2996f26 100644
--- a/milena/mln/geom/nsites.hh
+++ b/milena/mln/geom/nsites.hh
@@ -56,7 +56,7 @@ namespace mln
trace::entering("geom::nsites");
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_precondition(input.domain().is_valid());
// Relies on the card routine on a site set.
diff --git a/milena/mln/geom/nslis.hh b/milena/mln/geom/nslis.hh
index 7d90865..3e6aa77 100644
--- a/milena/mln/geom/nslis.hh
+++ b/milena/mln/geom/nslis.hh
@@ -54,7 +54,7 @@ namespace mln
inline
unsigned nslis(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
return geom::max_sli(ima) - geom::min_sli(ima) + 1;
}
diff --git a/milena/mln/geom/seeds2tiling.hh b/milena/mln/geom/seeds2tiling.hh
index 4844c26..0dc8eef 100644
--- a/milena/mln/geom/seeds2tiling.hh
+++ b/milena/mln/geom/seeds2tiling.hh
@@ -128,7 +128,7 @@ namespace mln
{
trace::entering("geom::seed2tiling");
- mln_precondition(exact(ima_).has_data());
+ mln_precondition(exact(ima_).is_valid());
I output = impl::seeds2tiling(ima_, nbh);
trace::exiting("geom::seed2tiling");
diff --git a/milena/mln/geom/seeds2tiling_roundness.hh
b/milena/mln/geom/seeds2tiling_roundness.hh
index a5c1f68..865198b 100644
--- a/milena/mln/geom/seeds2tiling_roundness.hh
+++ b/milena/mln/geom/seeds2tiling_roundness.hh
@@ -132,7 +132,7 @@ namespace mln
{
trace::entering("geom::seed2tiling_roundness");
- mln_precondition(exact(ima_).has_data());
+ mln_precondition(exact(ima_).is_valid());
I output = impl::seeds2tiling_roundness(ima_, w_win, max, nbh);
trace::exiting("geom::seed2tiling_roundness");
diff --git a/milena/mln/histo/compute.hh b/milena/mln/histo/compute.hh
index af5b8c4..14bf3a3 100644
--- a/milena/mln/histo/compute.hh
+++ b/milena/mln/histo/compute.hh
@@ -82,7 +82,7 @@ namespace mln
{
trace::entering("histo::compute");
mlc_equal(mln_trait_image_quant(I), mln::trait::image::quant::low)::check();
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
data<mln_value(I)> h = impl::compute_(mln_trait_image_speed(I)(),
exact(input));
diff --git a/milena/mln/io/txt/save.hh b/milena/mln/io/txt/save.hh
index 597e07c..4cc4e39 100644
--- a/milena/mln/io/txt/save.hh
+++ b/milena/mln/io/txt/save.hh
@@ -66,7 +66,7 @@ namespace mln
{
trace::entering("mln::io::txt::save");
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
std::ofstream ostr(filename.c_str());
unsigned col = 0;
typedef image2d<char> I;
diff --git a/milena/mln/labeling/background.hh b/milena/mln/labeling/background.hh
index c6f1905..30187bd 100644
--- a/milena/mln/labeling/background.hh
+++ b/milena/mln/labeling/background.hh
@@ -76,7 +76,7 @@ namespace mln
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());
// mln_precondition(exact(nbh).is_valid());
mln_ch_value(I, L) output = labeling::level(input, false, nbh, nlabels);
diff --git a/milena/mln/labeling/blobs.hh b/milena/mln/labeling/blobs.hh
index c7175f1..789eec4 100644
--- a/milena/mln/labeling/blobs.hh
+++ b/milena/mln/labeling/blobs.hh
@@ -153,7 +153,7 @@ namespace mln
mln::trait::image::kind::binary)::check();
const I& input = exact(input_);
const N& nbh = exact(nbh_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_ch_value(I, L) output = impl::blobs_(input, nbh, nlabels);
diff --git a/milena/mln/labeling/compute.hh b/milena/mln/labeling/compute.hh
index ececa18..439a7b0 100644
--- a/milena/mln/labeling/compute.hh
+++ b/milena/mln/labeling/compute.hh
@@ -126,7 +126,7 @@ namespace mln
const Image<L>& label,
const mln_value(L)& nlabels)
{
- mln_precondition(exact(label).has_data());
+ mln_precondition(exact(label).is_valid());
mlc_is_a(mln_value(L), mln::value::Symbolic)::check();
(void) a;
(void) label;
@@ -142,8 +142,8 @@ namespace mln
const Image<L>& label,
const mln_value(L)& nlabels)
{
- mln_precondition(exact(input).has_data());
- mln_precondition(exact(label).has_data());
+ mln_precondition(exact(input).is_valid());
+ mln_precondition(exact(label).is_valid());
mlc_is_a(mln_value(L), mln::value::Symbolic)::check();
(void) a;
(void) input;
diff --git a/milena/mln/labeling/flat_zones.hh b/milena/mln/labeling/flat_zones.hh
index 7b90278..0f6a49c 100644
--- a/milena/mln/labeling/flat_zones.hh
+++ b/milena/mln/labeling/flat_zones.hh
@@ -137,7 +137,7 @@ namespace mln
const I& input = exact(input_);
const N& nbh = exact(nbh_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// Calls the only (generic) impl.
mln_ch_value(I, L) output = impl::generic::flat_zones(input, nbh, nlabels);
diff --git a/milena/mln/labeling/foreground.hh b/milena/mln/labeling/foreground.hh
index d001be4..b5a28e4 100644
--- a/milena/mln/labeling/foreground.hh
+++ b/milena/mln/labeling/foreground.hh
@@ -76,7 +76,7 @@ namespace mln
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());
// mln_precondition(exact(nbh).is_valid());
mln_ch_value(I, L) output = labeling::level(input, true, nbh, nlabels);
diff --git a/milena/mln/labeling/level.hh b/milena/mln/labeling/level.hh
index 3bcd41e..8e373ea 100644
--- a/milena/mln/labeling/level.hh
+++ b/milena/mln/labeling/level.hh
@@ -78,7 +78,7 @@ namespace mln
level_tests(const Image<I>& input, const mln_value(I)& val, const
Neighborhood<N>& nbh,
L& nlabels)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
(void) input;
diff --git a/milena/mln/labeling/regional_maxima.hh
b/milena/mln/labeling/regional_maxima.hh
index c61dc89..40ed488 100644
--- a/milena/mln/labeling/regional_maxima.hh
+++ b/milena/mln/labeling/regional_maxima.hh
@@ -152,7 +152,7 @@ namespace mln
const I& input = exact(input_);
const N& nbh = exact(nbh_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// Calls the only (generic) impl.
mln_ch_value(I, L) output = impl::generic::regional_maxima(input, nbh, nlabels);
diff --git a/milena/mln/labeling/regional_minima.hh
b/milena/mln/labeling/regional_minima.hh
index b941130..3812471 100644
--- a/milena/mln/labeling/regional_minima.hh
+++ b/milena/mln/labeling/regional_minima.hh
@@ -157,7 +157,7 @@ namespace mln
const I& input = exact(input_);
const N& nbh = exact(nbh_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// Calls the only (generic) impl.
mln_ch_value(I, L) output = impl::generic::regional_minima(input, nbh, nlabels);
diff --git a/milena/mln/labeling/relabel.hh b/milena/mln/labeling/relabel.hh
index 660e25b..71e4d05 100644
--- a/milena/mln/labeling/relabel.hh
+++ b/milena/mln/labeling/relabel.hh
@@ -116,7 +116,7 @@ namespace mln
{
// FIXME: we may want to check that it is exactly a label.
mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
- mln_precondition(exact(label).has_data());
+ mln_precondition(exact(label).is_valid());
(void) label;
(void) nlabels;
(void) new_nlabels;
@@ -132,7 +132,7 @@ namespace mln
{
// FIXME: we may want to check that it is exactly a label.
mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
- mln_precondition(exact(label).has_data());
+ mln_precondition(exact(label).is_valid());
(void) label;
(void) nlabels;
(void) f;
diff --git a/milena/mln/level/abs.hh b/milena/mln/level/abs.hh
index 9a544d7..d2b48b4 100644
--- a/milena/mln/level/abs.hh
+++ b/milena/mln/level/abs.hh
@@ -83,7 +83,7 @@ namespace mln
{
trace::entering("level::abs_inplace");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
level::apply(input, fun::v2v::abs<mln_value(I)>());
trace::exiting("level::abs_inplace");
diff --git a/milena/mln/level/apply.hh b/milena/mln/level/apply.hh
index 22aa880..c5189c4 100644
--- a/milena/mln/level/apply.hh
+++ b/milena/mln/level/apply.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/mln/level/convert.hh b/milena/mln/level/convert.hh
index 68d900d..3c7a827 100644
--- a/milena/mln/level/convert.hh
+++ b/milena/mln/level/convert.hh
@@ -67,7 +67,7 @@ namespace mln
{
trace::entering("level::convert");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
fun::v2v::convert<V> f;
mln_ch_value(I, V) output = level::transform(input, f);
diff --git a/milena/mln/level/fast_median.hh b/milena/mln/level/fast_median.hh
index bf1b9d0..4321da3 100644
--- a/milena/mln/level/fast_median.hh
+++ b/milena/mln/level/fast_median.hh
@@ -80,8 +80,8 @@ namespace mln
const W& win,
O& output)
{
- mln_precondition(input.has_data());
- mln_precondition(output.has_data());
+ mln_precondition(input.is_valid());
+ mln_precondition(output.is_valid());
def::coord
min_row = geom::min_row(input), max_row = geom::max_row(input),
diff --git a/milena/mln/level/replace.hh b/milena/mln/level/replace.hh
index efa9d50..fdb7352 100644
--- a/milena/mln/level/replace.hh
+++ b/milena/mln/level/replace.hh
@@ -93,7 +93,7 @@ namespace mln
{
trace::entering("level::replace");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
impl::generic::replace_<I>(exact(input), old_value, new_value);
diff --git a/milena/mln/level/saturate.hh b/milena/mln/level/saturate.hh
index c3a01e2..320aa65 100644
--- a/milena/mln/level/saturate.hh
+++ b/milena/mln/level/saturate.hh
@@ -91,7 +91,7 @@ namespace mln
{
trace::entering("level::saturate");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
fun::v2v::saturate<V> f;
mln_ch_value(I, V) output = level::transform(input, f);
@@ -108,7 +108,7 @@ namespace mln
{
trace::entering("level::saturate");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
fun::v2v::saturate<V> f(min, max);
mln_ch_value(I, V) output = level::transform(input, f);
@@ -124,7 +124,7 @@ namespace mln
{
trace::entering("level::saturate_inplace");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
fun::v2v::saturate<mln_value(I)> f(min, max);
level::apply(input, f);
diff --git a/milena/mln/level/sort_psites.hh b/milena/mln/level/sort_psites.hh
index 41deb80..ef920cd 100644
--- a/milena/mln/level/sort_psites.hh
+++ b/milena/mln/level/sort_psites.hh
@@ -54,7 +54,7 @@ namespace mln
*
* \param[in] input The input image.
*
- * \pre \p input.has_data
+ * \pre \p input.is_valid
*/
template <typename I>
p_array<mln_psite(I)> sort_psites_increasing(const Image<I>& input);
@@ -64,7 +64,7 @@ namespace mln
*
* \param[in] input The input image.
*
- * \pre \p input.has_data
+ * \pre \p input.is_valid
*/
template <typename I>
p_array<mln_psite(I)> sort_psites_decreasing(const Image<I>& input);
@@ -220,7 +220,7 @@ namespace mln
p_array<mln_psite(I)>
sort_psites_increasing(const Image<I>& input)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
return impl::sort_psites_increasing_(mln_trait_image_quant(I)(),
exact(input));
}
@@ -230,7 +230,7 @@ namespace mln
p_array<mln_psite(I)>
sort_psites_decreasing(const Image<I>& input)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
return impl::sort_psites_decreasing_(mln_trait_image_quant(I)(),
exact(input));
}
diff --git a/milena/mln/level/stretch.hh b/milena/mln/level/stretch.hh
index 9be600c..e91dbe7 100644
--- a/milena/mln/level/stretch.hh
+++ b/milena/mln/level/stretch.hh
@@ -57,7 +57,7 @@ namespace mln
* \param[in] input The input image.
* \param[out] output The result image.
*
- * \pre input.has_data
+ * \pre input.is_valid
*/
template <typename V, typename I>
mln_ch_value(I, V)
@@ -115,7 +115,7 @@ namespace mln
{
trace::entering("level::stretch");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_ch_value(I, V) output = impl::stretch(V(), input);
diff --git a/milena/mln/level/transform.hh b/milena/mln/level/transform.hh
index 67e06b5..07ed377 100644
--- a/milena/mln/level/transform.hh
+++ b/milena/mln/level/transform.hh
@@ -92,7 +92,7 @@ namespace mln
const Function_v2v<F>& f)
{
// Dynamic test.
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// Avoid a warning about an undefined variable when NDEBUG
// is not defined.
@@ -105,8 +105,8 @@ namespace mln
const Function_vv2v<F>& f)
{
// Dynamic tests.
- mln_precondition(exact(input1).has_data());
- mln_precondition(exact(input2).has_data());
+ mln_precondition(exact(input1).is_valid());
+ mln_precondition(exact(input2).is_valid());
mln_precondition(exact(input2).domain() == exact(input1).domain());
// Avoid a warning about an undefined variable when NDEBUG
diff --git a/milena/mln/level/transform_inplace.hh
b/milena/mln/level/transform_inplace.hh
index ea211d6..2a848aa 100644
--- a/milena/mln/level/transform_inplace.hh
+++ b/milena/mln/level/transform_inplace.hh
@@ -98,7 +98,7 @@ namespace mln
mlc_converts_to(mln_result(F), mln_value(I))::check();
// Dynamic test.
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
// Avoid a warning.
(void) ima;
@@ -119,8 +119,8 @@ namespace mln
mlc_converts_to(mln_result(F), mln_value(I1))::check();
// Dynamic test.
- mln_precondition(exact(ima).has_data());
- mln_precondition(exact(aux).has_data());
+ mln_precondition(exact(ima).is_valid());
+ mln_precondition(exact(aux).is_valid());
mln_precondition(exact(aux).domain() == exact(ima).domain());
// Avoid warnings.
diff --git a/milena/mln/level/update.hh b/milena/mln/level/update.hh
index bc52d58..10632a5 100644
--- a/milena/mln/level/update.hh
+++ b/milena/mln/level/update.hh
@@ -71,7 +71,7 @@ namespace mln
{
A& a = exact(a_);
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// sizeof(a.take(mln_value(I)()));
(void) a;
diff --git a/milena/mln/level/was.median.hh b/milena/mln/level/was.median.hh
index 0d19ed1..0579ce6 100644
--- a/milena/mln/level/was.median.hh
+++ b/milena/mln/level/was.median.hh
@@ -66,8 +66,8 @@ namespace mln
const W& win,
O& output)
{
- mln_precondition(input.has_data());
- mln_precondition(output.has_data());
+ mln_precondition(input.is_valid());
+ mln_precondition(output.is_valid());
int
min_row = geom::min_row(input), max_row = geom::max_row(input),
diff --git a/milena/mln/linear/convolve.hh b/milena/mln/linear/convolve.hh
index 7be8140..1996f76 100644
--- a/milena/mln/linear/convolve.hh
+++ b/milena/mln/linear/convolve.hh
@@ -54,7 +54,7 @@ namespace mln
* \warning The weighted window is used as-is, considering that
* its symmetrization is handled by the client.
*
- * \pre input.has_data
+ * \pre input.is_valid
*/
template <typename I, typename W>
mln_ch_convolve(I, W)
@@ -74,7 +74,7 @@ namespace mln
convolve_tests(const Image<I>& input,
const Weighted_Window<W>& w_win)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(w_win).is_valid());
(void) input;
(void) w_win;
diff --git a/milena/mln/linear/convolve_2x1d.hh b/milena/mln/linear/convolve_2x1d.hh
index 0d0b96c..94f3797 100644
--- a/milena/mln/linear/convolve_2x1d.hh
+++ b/milena/mln/linear/convolve_2x1d.hh
@@ -51,7 +51,7 @@ namespace mln
* \warning The weighted window is used as-is, considering that
* its symmetrization is handled by the client.
*
- * \pre input.has_data
+ * \pre input.is_valid
*/
template <typename I,
typename W, unsigned Sh, unsigned Sv>
@@ -75,7 +75,7 @@ namespace mln
mlc_bool(Sh % 2 == 1)::check();
mlc_bool(Sv % 2 == 1)::check();
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
extension::adjust(input, util::max(Sh / 2, Sv / 2));
diff --git a/milena/mln/linear/convolve_directional.hh
b/milena/mln/linear/convolve_directional.hh
index ca7af6b..1f241d2 100644
--- a/milena/mln/linear/convolve_directional.hh
+++ b/milena/mln/linear/convolve_directional.hh
@@ -55,7 +55,7 @@ namespace mln
* \warning The weighted window is used as-is, considering that
* its symmetrization is handled by the client.
*
- * \pre input.has_data
+ * \pre input.is_valid
*/
template <typename I, typename W, unsigned S>
mln_ch_convolve(I, W)
@@ -73,7 +73,7 @@ namespace mln
mlc_bool(S % 2 == 1)::check();
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
typedef mln_site(I) P;
mln_precondition(dir < P::dim);
diff --git a/milena/mln/linear/gaussian.hh b/milena/mln/linear/gaussian.hh
index 4b5be0c..0181e61 100644
--- a/milena/mln/linear/gaussian.hh
+++ b/milena/mln/linear/gaussian.hh
@@ -634,7 +634,7 @@ namespace mln
* if \p dir = 1, the filter is applied on the second image dimension.
* And so on...
*
- * \pre input.has_data
+ * \pre input.is_valid
* \pre dir < dimension(input)
*/
template <class I>
@@ -642,7 +642,7 @@ namespace mln
mln_concrete(I)
gaussian(const Image<I>& input, float sigma, int dir)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(dir < I::site::dim);
mln_concrete(I) output;
@@ -666,7 +666,7 @@ namespace mln
* if \p dir = 1, the filter is applied on the second image dimension.
* And so on...
*
- * \pre input.has_data
+ * \pre input.is_valid
* \pre dir < dimension(input)
*/
template <class I>
@@ -674,7 +674,7 @@ namespace mln
mln_concrete(I)
gaussian_1st_derivative(const Image<I>& input, float sigma, int dir)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(dir < I::site::dim);
mln_concrete(I) output;
@@ -699,7 +699,7 @@ namespace mln
* if \p dir = 1, the filter is applied on the second image dimension.
* And so on...
*
- * \pre input.has_data
+ * \pre input.is_valid
* \pre dir < dimension(input)
*/
template <class I>
@@ -707,7 +707,7 @@ namespace mln
mln_concrete(I)
gaussian_2nd_derivative(const Image<I>& input, float sigma, int dir)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(dir < I::site::dim);
mln_concrete(I) output;
@@ -732,14 +732,14 @@ namespace mln
/*! Apply an approximated gaussian filter of \p sigma on \p input.
* This filter is applied in all the input image direction.
*
- * \pre input.has_data
+ * \pre input.is_valid
*/
template <class I>
inline
mln_concrete(I)
gaussian(const Image<I>& input, float sigma)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output;
initialize(output, input);
@@ -761,14 +761,14 @@ namespace mln
* \p input
* This filter is applied in all the input image direction.
*
- * \pre input.has_data
+ * \pre input.is_valid
*/
template <class I>
inline
mln_concrete(I)
gaussian_1st_derivative(const Image<I>& input, float sigma)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output;
initialize(output, input);
@@ -789,14 +789,14 @@ namespace mln
* \p input
* This filter is applied in all the input image direction.
*
- * \pre input.has_data
+ * \pre input.is_valid
*/
template <class I>
inline
mln_concrete(I)
gaussian_2nd_derivative(const Image<I>& input, float sigma)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output;
initialize(output, input);
diff --git a/milena/mln/linear/lap.hh b/milena/mln/linear/lap.hh
index 746b7ea..327096f 100644
--- a/milena/mln/linear/lap.hh
+++ b/milena/mln/linear/lap.hh
@@ -74,7 +74,7 @@ namespace mln
lap_4(const Image<I>& input)
{
trace::entering("linear::lap_4");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
int ws[] = { 0, 1, 0,
1, -4, 1,
0, 1, 0 };
@@ -89,7 +89,7 @@ namespace mln
lap_8(const Image<I>& input)
{
trace::entering("linear::lap_8");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
int ws[] = { 1, 1, 1,
1, -8, 1,
1, 1, 1 };
@@ -104,7 +104,7 @@ namespace mln
lap_x(const Image<I>& input)
{
trace::entering("linear::lap_x");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
int ws[] = { +2, -1, +2,
-1, -4, -1,
+2, -1, +2 };
@@ -119,7 +119,7 @@ namespace mln
lap_o(const Image<I>& input)
{
trace::entering("linear::lap_o");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
int ws[] = { -1, +2, -1,
+2, -4, +2,
-1, +2, -1 };
diff --git a/milena/mln/linear/local/convolve.hh b/milena/mln/linear/local/convolve.hh
index 522800a..ccb2be0 100644
--- a/milena/mln/linear/local/convolve.hh
+++ b/milena/mln/linear/local/convolve.hh
@@ -154,7 +154,7 @@ namespace mln
const Weighted_Window<W>& w_win,
R& result)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
impl::convolve(mln_trait_image_speed(I)(), exact(input),
p, exact(w_win), result);
}
diff --git a/milena/mln/linear/log.hh b/milena/mln/linear/log.hh
index 51594aa..e975aba 100644
--- a/milena/mln/linear/log.hh
+++ b/milena/mln/linear/log.hh
@@ -72,7 +72,7 @@ namespace mln
LoG_5x5(const Image<I>& input)
{
trace::entering("linear::LoG_5x5");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
int ws[] = { +0, 0, -1, 0, 0,
+0, -1, -2, -1, 0,
-1, -2, 16, -2, -1,
@@ -91,7 +91,7 @@ namespace mln
LoG_7x7(const Image<I>& input)
{
trace::entering("linear::LoG_7x7");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
int ws[] = { +0, 0, -1, -1, -1, 0, 0,
+0, -1, -3, -3, -3, -1, 0,
-1, -3, 0, 7, 0, -3, -1,
@@ -112,7 +112,7 @@ namespace mln
LoG_13x13(const Image<I>& input)
{
trace::entering("linear::LoG_13x13");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
int ws[] = { +0, 0, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0,
+0, 0, 0, -1, -1, -2, -2, -2, -1, -1, 0, 0, 0,
+0, 0, -2, -2, -3, -3, -4, -3, -3, -2, -2, 0, 0,
@@ -139,7 +139,7 @@ namespace mln
LoG_17x17(const Image<I>& input)
{
trace::entering("linear::LoG_17x17");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
int ws[] = { +0, 0, 0, 0, 0, 0,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0,
+0, 0,-1,-1,-1,-2,-3,-3,-3,-3,-3,-2,-1,-1,-1, 0, 0,
diff --git a/milena/mln/linear/sobel_2d.hh b/milena/mln/linear/sobel_2d.hh
index b4cb1ff..1e74e98 100644
--- a/milena/mln/linear/sobel_2d.hh
+++ b/milena/mln/linear/sobel_2d.hh
@@ -91,7 +91,7 @@ namespace mln
sobel_2d_h(const Image<I>& input)
{
trace::entering("linear::sobel_2d_h");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
int wh[] = { -1, 0, 1 };
int wv[] = { 1,
@@ -110,7 +110,7 @@ namespace mln
sobel_2d_v(const Image<I>& input)
{
trace::entering("linear::sobel_2d_v");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
int wh[] = { 1, 2, 1 };
int wv[] = { -1,
@@ -128,7 +128,7 @@ namespace mln
sobel_2d(const Image<I>& input)
{
trace::entering("linear::sobel_2d");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
typedef mln_ch_convolve(I, int) J;
J h = sobel_2d_h(input),
@@ -146,7 +146,7 @@ namespace mln
sobel_2d_l1_norm(const Image<I>& input)
{
trace::entering("linear::sobel_2d_norm_l1");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
typedef mln_ch_convolve_grad(I, int) G;
G grad = sobel_2d(input);
diff --git a/milena/mln/logical/includes.hh b/milena/mln/logical/includes.hh
index edc336e..7ee1bda 100644
--- a/milena/mln/logical/includes.hh
+++ b/milena/mln/logical/includes.hh
@@ -57,8 +57,8 @@ namespace mln
const L& lhs = exact(lhs_);
const R& rhs = exact(rhs_);
- mln_precondition(lhs.has_data());
- mln_precondition(rhs.has_data());
+ mln_precondition(lhs.is_valid());
+ mln_precondition(rhs.is_valid());
mln_precondition(rhs.domain() == lhs.domain());
(void) lhs;
diff --git a/milena/mln/logical/not.hh b/milena/mln/logical/not.hh
index 6925c4d..2e15949 100644
--- a/milena/mln/logical/not.hh
+++ b/milena/mln/logical/not.hh
@@ -48,7 +48,7 @@ namespace mln
* \param[in] input the input image.
* \result The result image.
*
- * \pre \p input.has_data
+ * \pre \p input.is_valid
*/
template <typename I>
mln_concrete(I) not_(const Image<I>& input);
@@ -62,7 +62,7 @@ namespace mln
* for all p of input.domain \n
* input(p) = not input(p)
*
- * \pre \p input.has_data
+ * \pre \p input.is_valid
*/
template <typename I>
void not_inplace(Image<I>& input);
@@ -77,7 +77,7 @@ namespace mln
{
trace::entering("logical::not_");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
fun::v2b::lnot<mln_value(I)> f;
mln_concrete(I) output = level::transform(input, f);
@@ -92,7 +92,7 @@ namespace mln
{
trace::entering("logical::not_inplace");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
fun::v2b::lnot<mln_value(I)> f;
level::transform_inplace(input, f);
diff --git a/milena/mln/make/dual_neighb.hh b/milena/mln/make/dual_neighb.hh
index 99490d3..5f4e66f 100644
--- a/milena/mln/make/dual_neighb.hh
+++ b/milena/mln/make/dual_neighb.hh
@@ -70,7 +70,7 @@ namespace mln
const I& ima = exact(ima_);
const N& nbh_true = exact(nbh_true_);
const N& nbh_false = exact(nbh_false_);
- mln_precondition(ima.has_data());
+ mln_precondition(ima.is_valid());
typedef win::multiple_size< 2, mln_window(N), pw::value_<I> > W;
W win(pw::value(ima));
diff --git a/milena/mln/make/graph.hh b/milena/mln/make/graph.hh
index ac232e8..df76416 100644
--- a/milena/mln/make/graph.hh
+++ b/milena/mln/make/graph.hh
@@ -63,7 +63,7 @@ namespace mln
void
graph_tests(const Image<I>& iz, mln_value(I))
{
- mln_precondition(exact(iz).has_data());
+ mln_precondition(exact(iz).is_valid());
(void) iz;
}
diff --git a/milena/mln/morpho/closing.hh b/milena/mln/morpho/closing.hh
index e275760..6b9e843 100644
--- a/milena/mln/morpho/closing.hh
+++ b/milena/mln/morpho/closing.hh
@@ -57,7 +57,7 @@ namespace mln
mln_concrete(I) closing(const Image<I>& input, const Window<W>&
win)
{
trace::entering("morpho::closing");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = erosion(dilation(input, win), win::sym(win));
diff --git a/milena/mln/morpho/closing_area.hh b/milena/mln/morpho/closing_area.hh
index cf140d1..bdd231f 100644
--- a/milena/mln/morpho/closing_area.hh
+++ b/milena/mln/morpho/closing_area.hh
@@ -61,7 +61,7 @@ namespace mln
trace::entering("morpho::closing_area");
typedef util::pix<I> pix_t;
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output;
output = closing_attribute< accu::count<pix_t> >(input, nbh, lambda);
diff --git a/milena/mln/morpho/closing_area_on_vertices.hh
b/milena/mln/morpho/closing_area_on_vertices.hh
index f05067c..f0655e0 100644
--- a/milena/mln/morpho/closing_area_on_vertices.hh
+++ b/milena/mln/morpho/closing_area_on_vertices.hh
@@ -65,7 +65,7 @@ namespace mln
unsigned lambda)
{
trace::entering("morpho::closing_area_on_vertices");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
typedef p_edges<G, V2P> pe_t;
typedef accu::count_adjacent_vertices<P2V, pe_t> attribute_t;
diff --git a/milena/mln/morpho/closing_attribute.hh
b/milena/mln/morpho/closing_attribute.hh
index f991e26..6cee789 100644
--- a/milena/mln/morpho/closing_attribute.hh
+++ b/milena/mln/morpho/closing_attribute.hh
@@ -108,7 +108,7 @@ namespace mln
{
trace::entering("morpho::closing_attribute");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output;
initialize(output, input);
diff --git a/milena/mln/morpho/closing_height.hh b/milena/mln/morpho/closing_height.hh
index e699a94..0a6e55f 100644
--- a/milena/mln/morpho/closing_height.hh
+++ b/milena/mln/morpho/closing_height.hh
@@ -62,7 +62,7 @@ namespace mln
{
trace::entering("morpho::closing_height");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output;
output = closing_attribute< accu::height<I> >(input, nbh, lambda);
diff --git a/milena/mln/morpho/closing_volume.hh b/milena/mln/morpho/closing_volume.hh
index 27993a1..61a4e50 100644
--- a/milena/mln/morpho/closing_volume.hh
+++ b/milena/mln/morpho/closing_volume.hh
@@ -60,7 +60,7 @@ namespace mln
{
trace::entering("morpho::closing_volume");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output;
output = closing_attribute< accu::volume<I> >(input, nbh, lambda);
diff --git a/milena/mln/morpho/complementation.hh b/milena/mln/morpho/complementation.hh
index 2bb63e3..3e3e1df 100644
--- a/milena/mln/morpho/complementation.hh
+++ b/milena/mln/morpho/complementation.hh
@@ -118,7 +118,7 @@ namespace mln
mln_concrete(I) complementation(const Image<I>& input)
{
trace::entering("morpho::complementation");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output = impl::complementation_(mln_trait_image_kind(I)(),
input);
@@ -132,7 +132,7 @@ namespace mln
void complementation_inplace(Image<I>& input)
{
trace::entering("morpho::complementation_inplace");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
impl::complementation_inplace_(mln_trait_image_kind(I)(),
input);
diff --git a/milena/mln/morpho/contrast.hh b/milena/mln/morpho/contrast.hh
index e3dc90f..7065aca 100644
--- a/milena/mln/morpho/contrast.hh
+++ b/milena/mln/morpho/contrast.hh
@@ -59,7 +59,7 @@ namespace mln
mln_concrete(I) contrast(const Image<I>& input, const Window<W>&
win)
{
trace::entering("morpho::contrast");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output =
diff --git a/milena/mln/morpho/dilation.hh b/milena/mln/morpho/dilation.hh
index 5d0b325..75cf97a 100644
--- a/milena/mln/morpho/dilation.hh
+++ b/milena/mln/morpho/dilation.hh
@@ -165,7 +165,7 @@ namespace mln
dilation(const Image<I>& input, const Window<W>& win)
{
trace::entering("morpho::dilation");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = general(dilation_op(), input, win);
diff --git a/milena/mln/morpho/elementary/closing.hh
b/milena/mln/morpho/elementary/closing.hh
index 44f565f..fef94c5 100644
--- a/milena/mln/morpho/elementary/closing.hh
+++ b/milena/mln/morpho/elementary/closing.hh
@@ -61,7 +61,7 @@ namespace mln
{
trace::entering("morpho::elementary::closing");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
mln_concrete(I) output = erosion(dilation(input, nbh), nbh);
diff --git a/milena/mln/morpho/elementary/dilation.hh
b/milena/mln/morpho/elementary/dilation.hh
index c68442e..8488100 100644
--- a/milena/mln/morpho/elementary/dilation.hh
+++ b/milena/mln/morpho/elementary/dilation.hh
@@ -99,7 +99,7 @@ namespace mln
{
trace::entering("morpho::elementary::dilation");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
mln_concrete(I) output = internal::dilation_dispatch(input, nbh);
diff --git a/milena/mln/morpho/elementary/erosion.hh
b/milena/mln/morpho/elementary/erosion.hh
index 1993d8f..765dabe 100644
--- a/milena/mln/morpho/elementary/erosion.hh
+++ b/milena/mln/morpho/elementary/erosion.hh
@@ -99,7 +99,7 @@ namespace mln
{
trace::entering("morpho::elementary::erosion");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
mln_concrete(I) output = internal::erosion_dispatch(input, nbh);
diff --git a/milena/mln/morpho/elementary/gradient.hh
b/milena/mln/morpho/elementary/gradient.hh
index 9ec7126..9939f6d 100644
--- a/milena/mln/morpho/elementary/gradient.hh
+++ b/milena/mln/morpho/elementary/gradient.hh
@@ -61,7 +61,7 @@ namespace mln
void
gradient_tests(const Image<I>& input, const Neighborhood<N>& nbh)
{
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
(void) input;
(void) nbh;
diff --git a/milena/mln/morpho/elementary/gradient_external.hh
b/milena/mln/morpho/elementary/gradient_external.hh
index 0e9906e..6403845 100644
--- a/milena/mln/morpho/elementary/gradient_external.hh
+++ b/milena/mln/morpho/elementary/gradient_external.hh
@@ -110,7 +110,7 @@ namespace mln
{
trace::entering("morpho::elementary::gradient_external");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
mln_concrete(I) output = internal::gradient_external_dispatch(input, nbh);
diff --git a/milena/mln/morpho/elementary/gradient_internal.hh
b/milena/mln/morpho/elementary/gradient_internal.hh
index c3d9b4a..5bc3f3e 100644
--- a/milena/mln/morpho/elementary/gradient_internal.hh
+++ b/milena/mln/morpho/elementary/gradient_internal.hh
@@ -110,7 +110,7 @@ namespace mln
{
trace::entering("morpho::elementary::gradient_internal");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
mln_concrete(I) output = internal::gradient_internal_dispatch(input, nbh);
diff --git a/milena/mln/morpho/elementary/laplacian.hh
b/milena/mln/morpho/elementary/laplacian.hh
index 4882d22..87b0d92 100644
--- a/milena/mln/morpho/elementary/laplacian.hh
+++ b/milena/mln/morpho/elementary/laplacian.hh
@@ -65,7 +65,7 @@ namespace mln
{
trace::entering("morpho::elementary::laplacian");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
mln_trait_op_minus_twice(mln_concrete(I)) output;
diff --git a/milena/mln/morpho/elementary/opening.hh
b/milena/mln/morpho/elementary/opening.hh
index f778fa2..9b19087 100644
--- a/milena/mln/morpho/elementary/opening.hh
+++ b/milena/mln/morpho/elementary/opening.hh
@@ -61,7 +61,7 @@ namespace mln
{
trace::entering("morpho::elementary::opening");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
mln_concrete(I) output = dilation(erosion(input, nbh), nbh);
diff --git a/milena/mln/morpho/elementary/top_hat.hh
b/milena/mln/morpho/elementary/top_hat.hh
index 70e75c7..4bce465 100644
--- a/milena/mln/morpho/elementary/top_hat.hh
+++ b/milena/mln/morpho/elementary/top_hat.hh
@@ -88,7 +88,7 @@ namespace mln
const Neighborhood<N>& nbh)
{
trace::entering("morpho::elementary::top_hat_white");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
mln_concrete(I) output = morpho::minus(input,
@@ -106,7 +106,7 @@ namespace mln
const Neighborhood<N>& nbh)
{
trace::entering("morpho::elementary::top_hat_black");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
mln_concrete(I) output = morpho::minus(closing(input, nbh),
@@ -124,7 +124,7 @@ namespace mln
const Neighborhood<N>& nbh)
{
trace::entering("morpho::elementary::top_hat_self_complementary");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
mln_concrete(I) output = morpho::minus(closing(input, nbh),
diff --git a/milena/mln/morpho/erosion.hh b/milena/mln/morpho/erosion.hh
index 2ec8d50..bc9aa64 100644
--- a/milena/mln/morpho/erosion.hh
+++ b/milena/mln/morpho/erosion.hh
@@ -165,7 +165,7 @@ namespace mln
erosion(const Image<I>& input, const Window<W>& win)
{
trace::entering("morpho::erosion");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = general(erosion_op(), input, win);
diff --git a/milena/mln/morpho/general.hh b/milena/mln/morpho/general.hh
index 31905f0..5ece056 100644
--- a/milena/mln/morpho/general.hh
+++ b/milena/mln/morpho/general.hh
@@ -80,7 +80,7 @@ namespace mln
const I& input = exact(input_);
const W& win = exact(win_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_precondition(! win.is_empty());
// mln_precondition(win.is_valid());
@@ -171,7 +171,7 @@ namespace mln
general(const Op& op, const Image<I>& input, const Window<W>&
win)
{
trace::entering("morpho::general");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
internal::general_tests(op, input, win);
diff --git a/milena/mln/morpho/gradient.hh b/milena/mln/morpho/gradient.hh
index 824da06..aec9f40 100644
--- a/milena/mln/morpho/gradient.hh
+++ b/milena/mln/morpho/gradient.hh
@@ -79,7 +79,7 @@ namespace mln
mln_concrete(I) gradient(const Image<I>& input, const Window<W>&
win)
{
trace::entering("morpho::gradient");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = morpho::minus(dilation(input, win),
@@ -96,7 +96,7 @@ namespace mln
mln_concrete(I) gradient_internal(const Image<I>& input, const
Window<W>& win)
{
trace::entering("morpho::gradient_internal");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = morpho::minus(input,
@@ -113,7 +113,7 @@ namespace mln
mln_concrete(I) gradient_external(const Image<I>& input, const
Window<W>& win)
{
trace::entering("morpho::gradient_external");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = morpho::minus(dilation(input, win),
diff --git a/milena/mln/morpho/hit_or_miss.hh b/milena/mln/morpho/hit_or_miss.hh
index 3b74d8b..044db91 100644
--- a/milena/mln/morpho/hit_or_miss.hh
+++ b/milena/mln/morpho/hit_or_miss.hh
@@ -122,7 +122,7 @@ namespace mln
const Wm& win_miss = exact(win_miss_);
// Tests.
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_precondition((win_hit && win_miss).is_empty());
// Avoid warnings.
diff --git a/milena/mln/morpho/laplacian.hh b/milena/mln/morpho/laplacian.hh
index 6a3e83c..ae6898c 100644
--- a/milena/mln/morpho/laplacian.hh
+++ b/milena/mln/morpho/laplacian.hh
@@ -82,7 +82,7 @@ namespace mln
laplacian(const Image<I>& input, const Window<W>& win)
{
trace::entering("morpho::laplacian");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_trait_op_minus_twice(mln_concrete(I)) output;
diff --git a/milena/mln/morpho/opening.hh b/milena/mln/morpho/opening.hh
index 7691f4a..20d68f7 100644
--- a/milena/mln/morpho/opening.hh
+++ b/milena/mln/morpho/opening.hh
@@ -56,7 +56,7 @@ namespace mln
mln_concrete(I) opening(const Image<I>& input, const Window<W>&
win)
{
trace::entering("morpho::opening");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = dilation(erosion(input, win), win::sym(win));
diff --git a/milena/mln/morpho/opening_area.hh b/milena/mln/morpho/opening_area.hh
index 211af4c..3bdd76d 100644
--- a/milena/mln/morpho/opening_area.hh
+++ b/milena/mln/morpho/opening_area.hh
@@ -61,7 +61,7 @@ namespace mln
trace::entering("morpho::opening_area");
typedef util::pix<I> pix_t;
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output;
output= opening_attribute< accu::count<pix_t> >(input, nbh, lambda);
diff --git a/milena/mln/morpho/opening_area_on_vertices.hh
b/milena/mln/morpho/opening_area_on_vertices.hh
index a1d3b72..3dd1e12 100644
--- a/milena/mln/morpho/opening_area_on_vertices.hh
+++ b/milena/mln/morpho/opening_area_on_vertices.hh
@@ -65,7 +65,7 @@ namespace mln
{
trace::entering("morpho::opening_area_on_vertices");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
typedef p_edges<G, V2P> pe_t;
typedef accu::count_adjacent_vertices<P2V, pe_t> attribute_t;
diff --git a/milena/mln/morpho/opening_attribute.hh
b/milena/mln/morpho/opening_attribute.hh
index 97dc514..f3cc148 100644
--- a/milena/mln/morpho/opening_attribute.hh
+++ b/milena/mln/morpho/opening_attribute.hh
@@ -110,7 +110,7 @@ namespace mln
{
trace::entering("morpho::opening_attribute");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output;
initialize(output, input);
diff --git a/milena/mln/morpho/opening_height.hh b/milena/mln/morpho/opening_height.hh
index 36ace8f..a51ec00 100644
--- a/milena/mln/morpho/opening_height.hh
+++ b/milena/mln/morpho/opening_height.hh
@@ -59,7 +59,7 @@ namespace mln
unsigned lambda)
{
trace::entering("morpho::opening_height");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output;
output = opening_attribute< accu::height<I> >(input, nbh, lambda);
diff --git a/milena/mln/morpho/opening_volume.hh b/milena/mln/morpho/opening_volume.hh
index 127ae2c..ff61be1 100644
--- a/milena/mln/morpho/opening_volume.hh
+++ b/milena/mln/morpho/opening_volume.hh
@@ -59,7 +59,7 @@ namespace mln
unsigned lambda)
{
trace::entering("morpho::opening_volume");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output;
output = opening_attribute< accu::volume<I> >(input, nbh, lambda);
diff --git a/milena/mln/morpho/rank_filter.hh b/milena/mln/morpho/rank_filter.hh
index eb24567..fe99eb9 100644
--- a/milena/mln/morpho/rank_filter.hh
+++ b/milena/mln/morpho/rank_filter.hh
@@ -62,7 +62,7 @@ namespace mln
const I& input = exact(input_);
const W& win = exact(win_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_precondition(! win.is_empty());
(void) input;
(void) win;
@@ -168,7 +168,7 @@ namespace mln
rank_filter(const Image<I>& input, const Window<W>& win, unsigned
k)
{
trace::entering("morpho::rank_filter");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = internal::rank_filter_dispatch(exact(input), exact(win),
k);
diff --git a/milena/mln/morpho/thickening.hh b/milena/mln/morpho/thickening.hh
index 13d7877..31a8791 100644
--- a/milena/mln/morpho/thickening.hh
+++ b/milena/mln/morpho/thickening.hh
@@ -70,7 +70,7 @@ namespace mln
const Wbg& win_bg = exact(win_bg_);
// Tests.
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_precondition(win_bg.is_centered());
mln_precondition(! win_fg.is_empty());
mln_precondition((win_fg && win_bg).is_empty());
diff --git a/milena/mln/morpho/thin_fit.hh b/milena/mln/morpho/thin_fit.hh
index cc83e50..52ed0f8 100644
--- a/milena/mln/morpho/thin_fit.hh
+++ b/milena/mln/morpho/thin_fit.hh
@@ -70,7 +70,7 @@ namespace mln
const Wbg& win_bg = exact(win_bg_);
// Tests.
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_precondition(win_fg.is_centered());
mln_precondition((win_fg && win_bg).is_empty());
diff --git a/milena/mln/morpho/thinning.hh b/milena/mln/morpho/thinning.hh
index 94c550c..a8b862d 100644
--- a/milena/mln/morpho/thinning.hh
+++ b/milena/mln/morpho/thinning.hh
@@ -73,7 +73,7 @@ namespace mln
const Wbg& win_bg = exact(win_bg_);
// Tests.
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
mln_precondition(win_bg.is_centered());
mln_precondition(! win_bg.is_empty());
mln_precondition((win_fg && win_bg).is_empty());
diff --git a/milena/mln/morpho/top_hat.hh b/milena/mln/morpho/top_hat.hh
index 4f789ba..f76897a 100644
--- a/milena/mln/morpho/top_hat.hh
+++ b/milena/mln/morpho/top_hat.hh
@@ -82,7 +82,7 @@ namespace mln
mln_concrete(I) top_hat_white(const Image<I>& input, const
Window<W>& win)
{
trace::entering("morpho::top_hat_white");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = morpho::minus(input,
@@ -98,7 +98,7 @@ namespace mln
mln_concrete(I) top_hat_black(const Image<I>& input, const
Window<W>& win)
{
trace::entering("morpho::top_hat_black");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = morpho::minus(closing(input, win),
@@ -114,7 +114,7 @@ namespace mln
mln_concrete(I) top_hat_self_complementary(const Image<I>& input, const
Window<W>& win)
{
trace::entering("morpho::top_hat_self_complementary");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_precondition(! exact(win).is_empty());
mln_concrete(I) output = morpho::minus(closing(input, win),
diff --git a/milena/mln/morpho/tree/compute_parent.hh
b/milena/mln/morpho/tree/compute_parent.hh
index b2d42aa..7cfc1d6 100644
--- a/milena/mln/morpho/tree/compute_parent.hh
+++ b/milena/mln/morpho/tree/compute_parent.hh
@@ -91,7 +91,7 @@ namespace mln
const N& nbh = exact(nbh_);
const S& s = exact(s_);
- mln_precondition(f.has_data());
+ mln_precondition(f.is_valid());
// mln_precondition(nbh.is_valid());
mln_precondition(s == f.domain());
diff --git a/milena/mln/morpho/tree/data.hh b/milena/mln/morpho/tree/data.hh
index dd23160..c7c7f86 100644
--- a/milena/mln/morpho/tree/data.hh
+++ b/milena/mln/morpho/tree/data.hh
@@ -88,7 +88,7 @@ namespace mln
bool is_valid() const
{
- return parent_.has_data(); // FIXME: and... (?)
+ return parent_.is_valid(); // FIXME: and... (?)
}
bool is_root(const mln_psite(I)& p) const
diff --git a/milena/mln/morpho/tree/max.hh b/milena/mln/morpho/tree/max.hh
index 708375c..b904fff 100644
--- a/milena/mln/morpho/tree/max.hh
+++ b/milena/mln/morpho/tree/max.hh
@@ -68,7 +68,7 @@ namespace mln
const I& f = exact(f_);
const N& nbh = exact(nbh_);
- mln_precondition(f.has_data());
+ mln_precondition(f.is_valid());
// mln_precondition(nbh.is_valid());
// For the max-tree, childhood maps "increasing level":
diff --git a/milena/mln/morpho/tree/utils.hh b/milena/mln/morpho/tree/utils.hh
index 8bc37ff..f9f09a0 100644
--- a/milena/mln/morpho/tree/utils.hh
+++ b/milena/mln/morpho/tree/utils.hh
@@ -79,8 +79,8 @@ namespace mln
const T& parent = exact(parent_);
const I& f = exact(f_);
- mln_precondition(parent.has_data());
- mln_precondition(f.has_data());
+ mln_precondition(parent.is_valid());
+ mln_precondition(f.is_valid());
mln_precondition(parent.domain() == f.domain());
return parent(p) == p;
@@ -98,8 +98,8 @@ namespace mln
const T& parent = exact(parent_);
const I& f = exact(f_);
- mln_precondition(parent.has_data());
- mln_precondition(f.has_data());
+ mln_precondition(parent.is_valid());
+ mln_precondition(f.is_valid());
mln_precondition(parent.domain() == f.domain());
return parent(p) == p || f(parent(p)) != f(p);
@@ -117,8 +117,8 @@ namespace mln
const I& f = exact(f_);
const S& s = exact(s_);
- mln_precondition(parent.has_data());
- mln_precondition(f.has_data());
+ mln_precondition(parent.is_valid());
+ mln_precondition(f.is_valid());
mln_precondition(f.domain() == parent.domain());
mln_precondition(s == f.domain());
diff --git a/milena/mln/pw/value.hh b/milena/mln/pw/value.hh
index c237653..82238dc 100644
--- a/milena/mln/pw/value.hh
+++ b/milena/mln/pw/value.hh
@@ -107,7 +107,7 @@ namespace mln
value_<I>
value(const Image<I>& ima)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
value_<I> tmp(exact(ima));
return tmp;
}
diff --git a/milena/mln/subsampling/gaussian_subsampling.hh
b/milena/mln/subsampling/gaussian_subsampling.hh
index 4e20a1b..41e966e 100644
--- a/milena/mln/subsampling/gaussian_subsampling.hh
+++ b/milena/mln/subsampling/gaussian_subsampling.hh
@@ -67,7 +67,7 @@ namespace mln
const mln_deduce(I, site, coord)& 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/mln/subsampling/subsampling.hh
b/milena/mln/subsampling/subsampling.hh
index 11a5944..fee6f97 100644
--- a/milena/mln/subsampling/subsampling.hh
+++ b/milena/mln/subsampling/subsampling.hh
@@ -92,7 +92,7 @@ namespace mln
const mln_deduce(I, site, coord)& gap)
{
trace::entering("subsampling::subsampling");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
mln_concrete(I) output(geom::nrows(input) / gap,
geom::ncols(input) / gap); // FIXME: only 2d here
diff --git a/milena/mln/test/positive.hh b/milena/mln/test/positive.hh
index e796952..641d728 100644
--- a/milena/mln/test/positive.hh
+++ b/milena/mln/test/positive.hh
@@ -57,7 +57,7 @@ namespace mln
bool positive(const Image<I>& input_)
{
const I& input = exact(input_);
- mln_precondition(input.has_data());
+ mln_precondition(input.is_valid());
// FIXME: Below the '>=' op should properly work with signed/unsigned
without
// FIXME: warnings; so we really need to overload ops for functions when literals
// FIXME: are involved.
diff --git a/milena/mln/test/predicate.hh b/milena/mln/test/predicate.hh
index 5dd110e..25db39e 100644
--- a/milena/mln/test/predicate.hh
+++ b/milena/mln/test/predicate.hh
@@ -148,7 +148,7 @@ namespace mln
inline
bool predicate(const Image<I>& ima, const Function_v2b<F>& f)
{
- mln_precondition(exact(ima).has_data());
+ mln_precondition(exact(ima).is_valid());
return impl::predicate_(mln_trait_image_speed(I)(), exact(ima),
exact(f));
}
@@ -161,8 +161,8 @@ namespace mln
const I& lhs = exact(lhs_);
const J& rhs = exact(rhs_);
- mln_precondition(lhs.has_data());
- mln_precondition(rhs.has_data());
+ mln_precondition(lhs.is_valid());
+ mln_precondition(rhs.is_valid());
mln_precondition(lhs.domain() == rhs.domain());
return impl::predicate_(mln_trait_image_speed(I)(),
diff --git a/milena/mln/transform/distance_front.hh
b/milena/mln/transform/distance_front.hh
index 817082e..4e9feb9 100644
--- a/milena/mln/transform/distance_front.hh
+++ b/milena/mln/transform/distance_front.hh
@@ -60,7 +60,7 @@ namespace mln
{
trace::entering("transform::distance_front");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
// mln_precondition(exact(w_win).is_valid());
diff --git a/milena/mln/transform/distance_geodesic.hh
b/milena/mln/transform/distance_geodesic.hh
index 1564911..e076309 100644
--- a/milena/mln/transform/distance_geodesic.hh
+++ b/milena/mln/transform/distance_geodesic.hh
@@ -58,7 +58,7 @@ namespace mln
{
trace::entering("transform::distance_geodesic");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
mln_ch_value(I, D) output;
diff --git a/milena/mln/transform/influence_zone_front.hh
b/milena/mln/transform/influence_zone_front.hh
index f25b463..014f5d6 100644
--- a/milena/mln/transform/influence_zone_front.hh
+++ b/milena/mln/transform/influence_zone_front.hh
@@ -64,7 +64,7 @@ namespace mln
{
trace::entering("transform::influence_zone_front");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
// mln_precondition(exact(w_win).is_valid());
diff --git a/milena/mln/transform/influence_zone_geodesic.hh
b/milena/mln/transform/influence_zone_geodesic.hh
index 2f73139..ca8e56b 100644
--- a/milena/mln/transform/influence_zone_geodesic.hh
+++ b/milena/mln/transform/influence_zone_geodesic.hh
@@ -65,7 +65,7 @@ namespace mln
{
trace::entering("transform::influence_zone_geodesic");
- mln_precondition(exact(input).has_data());
+ mln_precondition(exact(input).is_valid());
// mln_precondition(exact(nbh).is_valid());
internal::influence_zone_functor<I> f;
diff --git a/milena/mln/value/stack.hh b/milena/mln/value/stack.hh
index 877f74c..c1df060 100644
--- a/milena/mln/value/stack.hh
+++ b/milena/mln/value/stack.hh
@@ -182,7 +182,7 @@ namespace mln
void init_(const algebra::vec<n,I>& imas);
/// Test if this image has been initialized.
- bool has_data() const;
+ bool is_valid() const;
/// Read-only access of pixel value at point site \p p.
rvalue operator()(const psite& p) const;
@@ -248,16 +248,16 @@ namespace mln
this->data_ = new mln::internal::data< stack_image<n, I> >(imas);
for (unsigned i = 0; i < n; ++i)
{
- mln_precondition(imas[i].has_data());
+ mln_precondition(imas[i].is_valid());
}
}
template <unsigned n, typename I>
inline
- bool stack_image<n,I>::has_data() const
+ bool stack_image<n,I>::is_valid() const
{
for (unsigned i = 0; i < n; ++i)
- mln_invariant(this->data_->imas_[i].has_data());
+ mln_invariant(this->data_->imas_[i].is_valid());
return true;
}
--
1.5.6.5