https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Get rid of owns_.
* tests/border/resize_sub_image.cc,
* tests/border/get.cc,
* tests/border/resize_image_if.cc,
* tests/fun/x2x/rotation.cc,
* mln/core/translate_image.hh,
* mln/core/internal/image_if_base.hh,
* mln/core/internal/image_identity.hh,
* mln/core/internal/image_value_morpher.hh,
* mln/core/internal/check/image_fastest.hh,
* mln/core/interpolated.hh,
* mln/core/cast_image.hh,
* mln/core/pixel.hh,
* mln/core/t_image.hh,
* mln/core/image1d.hh,
* mln/core/fi_adaptor.hh,
* mln/core/image3d.hh,
* mln/core/hexa.hh,
* mln/core/tr_image.hh,
* mln/core/safe.hh,
* mln/core/concept/doc/image.hh,
* mln/level/memset_.hh,
* mln/value/stack.hh,
* mln/pw/image.hh,
* mln/pw/value.hh,
* sandbox/duhamel/translate_image.hh,
* sandbox/nivault/rotation.cc,
* sandbox/nivault/plugin-gimp/src/gimp-image.hh,
* sandbox/jardonnet/subsampling/sub_sampled_image.hh,
* sandbox/geraud/cs2d/cs2d_morpho.hh,
* sandbox/garrigues/level_set.hh,
* sandbox/garrigues/fllt/compute_level_set_fast2.hh,
* sandbox/garrigues/fllt/compute_level_set_fast.hh,
* sandbox/garrigues/fllt/compute_level_set.hh,
* sandbox/garrigues/tiled_image2d/tiled_image2d.hh,
* sandbox/garrigues/image_identity/image_value_morpher.hh,
* sandbox/garrigues/image_identity/interpolated.hh,
* sandbox/ballas/refactorization/p_run.hh,
* sandbox/ballas/refactorization/rle_image.hh,
* sandbox/ballas/refactorization/image2d.hh,
* sandbox/ballas/refactorization/concept.hh,
* sandbox/ballas/refactorization/rle_pset.hh,
* sandbox/ballas/refactorization/internal/pset_base.hh,
* sandbox/ballas/refactorization/internal/image_base.hh,
* sandbox/ballas/refactorization/box2d.hh (owns_): Rename as...
(has): ...this.
* mln/trait/image/status.txt (image2d): Set OK.
mln/core/cast_image.hh | 2 +-
mln/core/concept/doc/image.hh | 4 ++--
mln/core/fi_adaptor.hh | 8 ++++----
mln/core/hexa.hh | 4 ++--
mln/core/image1d.hh | 12 ++++++------
mln/core/image3d.hh | 12 ++++++------
mln/core/internal/check/image_fastest.hh | 2 +-
mln/core/internal/image_identity.hh | 6 +++---
mln/core/internal/image_if_base.hh | 6 +++---
mln/core/internal/image_value_morpher.hh | 6 +++---
mln/core/interpolated.hh | 10 +++++-----
mln/core/pixel.hh | 6 +++---
mln/core/safe.hh | 4 ++--
mln/core/t_image.hh | 10 +++++-----
mln/core/tr_image.hh | 10 +++++-----
mln/core/translate_image.hh | 10 +++++-----
mln/level/memset_.hh | 2 +-
mln/pw/image.hh | 4 ++--
mln/pw/value.hh | 2 +-
mln/trait/image/status.txt | 2 +-
mln/value/stack.hh | 4 ++--
sandbox/ballas/refactorization/box2d.hh | 4 ++--
sandbox/ballas/refactorization/concept.hh | 2 +-
sandbox/ballas/refactorization/image2d.hh | 2 +-
sandbox/ballas/refactorization/internal/image_base.hh | 2 +-
sandbox/ballas/refactorization/internal/pset_base.hh | 2 +-
sandbox/ballas/refactorization/p_run.hh | 4 ++--
sandbox/ballas/refactorization/rle_image.hh | 8 ++++----
sandbox/ballas/refactorization/rle_pset.hh | 4 ++--
sandbox/duhamel/translate_image.hh | 10 +++++-----
sandbox/garrigues/fllt/compute_level_set.hh | 2 +-
sandbox/garrigues/fllt/compute_level_set_fast.hh | 2 +-
sandbox/garrigues/fllt/compute_level_set_fast2.hh | 2 +-
sandbox/garrigues/image_identity/image_value_morpher.hh | 6 +++---
sandbox/garrigues/image_identity/interpolated.hh | 10 +++++-----
sandbox/garrigues/level_set.hh | 2 +-
sandbox/garrigues/tiled_image2d/tiled_image2d.hh | 8 ++++----
sandbox/geraud/cs2d/cs2d_morpho.hh | 2 +-
sandbox/jardonnet/subsampling/sub_sampled_image.hh | 10 +++++-----
sandbox/nivault/plugin-gimp/src/gimp-image.hh | 12 ++++++------
sandbox/nivault/rotation.cc | 2 +-
tests/border/get.cc | 4 ++--
tests/border/resize_image_if.cc | 2 +-
tests/border/resize_sub_image.cc | 2 +-
tests/fun/x2x/rotation.cc | 2 +-
45 files changed, 116 insertions(+), 116 deletions(-)
Index: tests/border/resize_sub_image.cc
--- tests/border/resize_sub_image.cc (revision 2011)
+++ tests/border/resize_sub_image.cc (working copy)
@@ -68,7 +68,7 @@
mln_assertion(border::get(ima) == border);
sub_image<I, box2d> sub(ima, b);
mln_assertion( sub.has (point2d(2,2)) == false &&
- sub.owns_(point2d(2,2)) == false );
+ sub.has(point2d(2,2)) == false );
// A subimage has no border so it cannot be resized => we get a compilation error as
expected.
// border::resize(sub, new_border);
Index: tests/border/get.cc
--- tests/border/get.cc (revision 2011)
+++ tests/border/get.cc (working copy)
@@ -70,12 +70,12 @@
sub_image<I, box2d> sub(ima, b);
mln_assertion( sub.has (point2d(2,2)) == false &&
- sub.owns_(point2d(2,2)) == false );
+ sub.has(point2d(2,2)) == false );
mln_assertion(border::get(sub) == 0);
image_if<I, f_box2d_t> imaif(ima, f_b);
mln_assertion( imaif.has (point2d(2,2)) == false &&
- imaif.owns_(point2d(2,2)) == true );
+ imaif.has(point2d(2,2)) == true );
mln_assertion(border::get(imaif) == 51);
mln_assertion(border::get( (ima | b) | f_b ) == 0);
Index: tests/border/resize_image_if.cc
--- tests/border/resize_image_if.cc (revision 2011)
+++ tests/border/resize_image_if.cc (working copy)
@@ -71,7 +71,7 @@
my_box2d f_b(b);
image_if<I, my_box2d> imaif(ima, f_b);
mln_assertion( imaif.has (point2d(2,2)) == false &&
- imaif.owns_(point2d(2,2)) == true );
+ imaif.has(point2d(2,2)) == true );
mln_assertion(border::get(imaif) == border);
Index: tests/fun/x2x/rotation.cc
--- tests/fun/x2x/rotation.cc (revision 2011)
+++ tests/fun/x2x/rotation.cc (working copy)
@@ -60,7 +60,7 @@
for_all(p)
{
algebra::vec<2,float> v = rot1.inv()((point2d::vec_t)(point2d)p);
- if (inter.owns_(v))
+ if (inter.has(v))
out(p) = inter(v);
else
out(p) = 255;
Index: mln/trait/image/status.txt
--- mln/trait/image/status.txt (revision 2011)
+++ mln/trait/image/status.txt (working copy)
@@ -5,7 +5,7 @@
KO graph_image
KO hexa
KO image1d
-KO image2d
+ok image2d
KO image3d
KO image_if
KO image_if_interval
Index: mln/core/translate_image.hh
--- mln/core/translate_image.hh (revision 2011)
+++ mln/core/translate_image.hh (working copy)
@@ -121,7 +121,7 @@
const box2d& domain() const;
/// Test if a pixel value is accessible at \p p.
- bool owns_(const mln_psite(I)& ) const;
+ bool has(const mln_psite(I)& ) const;
/// Read-only access of pixel value at point site \p p.
mln_rvalue(I) operator()(const mln_psite(I)& p) const;
@@ -173,10 +173,10 @@
template <typename I>
inline
- bool translate_image<I>::owns_(const mln_psite(I)& p) const
+ bool translate_image<I>::has(const mln_psite(I)& p) const
{
mln_point(I) np = p - this->data_->dp_;
- return this->data_->ima_.owns_(np);
+ return this->data_->ima_.has(np);
}
template <typename I>
@@ -184,7 +184,7 @@
mln_rvalue(I)
translate_image<I>::operator()(const mln_psite(I)& p) const
{
- mln_assertion(this->owns_(p));
+ mln_assertion(this->has(p));
mln_point(I) np = p - this->data_->dp_;
return this->data_->ima_(np);
}
@@ -195,7 +195,7 @@
typename translate_image<I>::lvalue
translate_image<I>::operator()(const mln_psite(I)& p)
{
- mln_assertion(this->owns_(p));
+ mln_assertion(this->has(p));
mln_point(I) np = p - this->data_->dp_;
return this->data_->ima_(np);
}
Index: mln/core/internal/image_if_base.hh
--- mln/core/internal/image_if_base.hh (revision 2011)
+++ mln/core/internal/image_if_base.hh (working copy)
@@ -109,7 +109,7 @@
/// Test if the image owns the point site \p p.
/// The result is the same than over the underlying image.
- bool owns_(const mln_psite(I)& p) const; // Overload the def "owns_ ->
has".
+ bool has(const mln_psite(I)& p) const;
protected:
@@ -169,10 +169,10 @@
template <typename I, typename F, typename E>
inline
bool
- image_if_base_<I,F,E>::owns_(const mln_psite(I)& p) const
+ image_if_base_<I,F,E>::has(const mln_psite(I)& p) const
{
mln_precondition(this->has_data());
- return this->data_->ima_.owns_(p);
+ return this->data_->ima_.has(p);
}
template <typename I, typename F, typename E>
Index: mln/core/internal/image_identity.hh
--- mln/core/internal/image_identity.hh (revision 2011)
+++ mln/core/internal/image_identity.hh (working copy)
@@ -76,7 +76,7 @@
// FIXME Matthieu: Doc! Cf. core/concept/doc/image
const mln_pset(I)& domain() const;
- bool owns_(const mln_psite(I)& p) const;
+ bool has(const mln_psite(I)& p) const;
protected:
@@ -132,10 +132,10 @@
template <typename I, typename S, typename E>
inline
bool
- image_identity_<I,S,E>::owns_(const mln_psite(I)& p) const
+ image_identity_<I,S,E>::has(const mln_psite(I)& p) const
{
mln_precondition(this->delegatee_() != 0);
- return this->delegatee_()->owns_(p);
+ return this->delegatee_()->has(p);
}
# endif // ! MLN_INCLUDE_ONLY
Index: mln/core/internal/image_value_morpher.hh
--- mln/core/internal/image_value_morpher.hh (revision 2011)
+++ mln/core/internal/image_value_morpher.hh (working copy)
@@ -56,7 +56,7 @@
public:
const mln_pset(I)& domain() const;
- bool owns_(const mln_psite(I)& p) const;
+ bool has(const mln_psite(I)& p) const;
protected:
image_value_morpher_();
@@ -83,10 +83,10 @@
template <typename I, typename E>
inline
bool
- image_value_morpher_<I,E>::owns_(const mln_psite(I)& p) const
+ image_value_morpher_<I,E>::has(const mln_psite(I)& p) const
{
mln_precondition(this->delegatee_() != 0);
- return this->delegatee_()->owns_(p);
+ return this->delegatee_()->has(p);
}
# endif // ! MLN_INCLUDE_ONLY
Index: mln/core/internal/check/image_fastest.hh
--- mln/core/internal/check/image_fastest.hh (revision 2011)
+++ mln/core/internal/check/image_fastest.hh (working copy)
@@ -128,7 +128,7 @@
{
const E* this_ = & internal::force_exact<E>(*this);
mln_precondition(this_->has_data());
- mln_precondition(this_->owns_(p));
+ mln_precondition(this_->has(p));
unsigned o = & this_->operator()(p) - this_->buffer();
mln_postcondition(p == this_->point_at_offset(o));
Index: mln/core/interpolated.hh
--- mln/core/interpolated.hh (revision 2011)
+++ mln/core/interpolated.hh (working copy)
@@ -98,10 +98,10 @@
bool has_data() const;
/// Test if a pixel value is accessible at \p p.
- using super_::owns_;
+ using super_::has;
/// Test if a pixel value is accessible at \p v.
- bool owns_(const mln::algebra::vec<I::point::dim, float>& v) const;
+ bool has(const mln::algebra::vec<I::point::dim, float>& v) const;
/// Read-only access of pixel value at point site \p p.
/// Mutable access is only OK for reading (not writing).
@@ -156,12 +156,12 @@
template <typename I>
inline
- bool interpolated<I>::owns_(const mln::algebra::vec<I::point::dim,
float>& v) const
+ bool interpolated<I>::has(const mln::algebra::vec<I::point::dim,
float>& v) const
{
mln_point(I) p;
for (unsigned i = 0; i < I::point::dim; ++i)
p[i] = static_cast<int>(round(v[i]));
- return this->data_->ima_.owns_(p);
+ return this->data_->ima_.has(p);
}
template <typename I>
@@ -172,7 +172,7 @@
mln_point(I) p;
for (unsigned i = 0; i < I::point::dim; ++i)
p[i] = static_cast<int>(round(v[i]));
- mln_assertion(this->data_->ima_.owns_(p));
+ mln_assertion(this->data_->ima_.has(p));
return this->data_->ima_(p);
}
Index: mln/core/cast_image.hh
--- mln/core/cast_image.hh (revision 2011)
+++ mln/core/cast_image.hh (working copy)
@@ -159,7 +159,7 @@
T
cast_image_<T,I>::operator()(const mln_psite(I)& p) const
{
- mln_precondition(this->data_->ima_.owns_(p));
+ mln_precondition(this->data_->ima_.has(p));
return mln::value::cast<T>( this->data_->ima_(p) );
}
Index: mln/core/pixel.hh
--- mln/core/pixel.hh (revision 2011)
+++ mln/core/pixel.hh (working copy)
@@ -81,7 +81,7 @@
pixel<I>::pixel(I& image, const mln_point(I)& p)
: super(image)
{
- mln_precondition(this->image_.owns_(p));
+ mln_precondition(this->image_.has(p));
change_to(p);
}
@@ -90,7 +90,7 @@
void
pixel<I>::change_to(const mln_point(I)& p)
{
- mln_precondition(this->image_.owns_(p));
+ mln_precondition(this->image_.has(p));
this->value_ptr_ = & this->image_(p);
}
@@ -103,7 +103,7 @@
return false;
int o = this->value_ptr_ - this->image_.buffer();
mln_point(I) p = this->image_.point_at_offset(o);
- return this->image_.owns_(p);
+ return this->image_.has(p);
}
# endif // ! MLN_INCLUDE_ONLY
Index: mln/core/t_image.hh
--- mln/core/t_image.hh (revision 2011)
+++ mln/core/t_image.hh (working copy)
@@ -127,7 +127,7 @@
bool has_data() const;
/// Test if a pixel value is accessible at \p p.
- bool owns_(const mln_point(I)& p) const;
+ bool has(const mln_point(I)& p) const;
/// Give the definition domain.
const box_<mln_point(I)>& domain() const;
@@ -210,10 +210,10 @@
template <typename I>
inline
bool
- t_image<I>::owns_(const mln_point(I)& p) const
+ t_image<I>::has(const mln_point(I)& p) const
{
mln_precondition(this->has_data());
- return this->delegatee_()->owns_(transpose_(p));
+ return this->delegatee_()->has(transpose_(p));
}
template <typename I>
@@ -251,7 +251,7 @@
mln_rvalue(I)
t_image<I>::operator()(const mln_point(I)& p) const
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
return (*this->delegatee_())(transpose_(p));
}
@@ -260,7 +260,7 @@
typename internal::morpher_lvalue_<I>::ret
t_image<I>::operator()(const mln_point(I)& p)
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
return (*this->delegatee_())(transpose_(p));
}
Index: mln/core/image1d.hh
--- mln/core/image1d.hh (revision 2011)
+++ mln/core/image1d.hh (working copy)
@@ -159,7 +159,7 @@
/// Test if \p p is valid.
- bool owns_(const point1d& p) const;
+ bool has(const point1d& p) const;
/// Give the set of values of the image.
const vset& values() const;
@@ -389,7 +389,7 @@
template <typename T>
inline
bool
- image1d<T>::owns_(const point1d& p) const
+ image1d<T>::has(const point1d& p) const
{
mln_precondition(this->has_data());
return this->data_->vb_.has(p);
@@ -400,7 +400,7 @@
const T&
image1d<T>::operator()(const point1d& p) const
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
return this->data_->array_[p.ind()];
}
@@ -409,7 +409,7 @@
T&
image1d<T>::operator()(const point1d& p)
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
return this->data_->array_[p.ind()];
}
@@ -436,7 +436,7 @@
const T&
image1d<T>::at(int ind) const
{
- mln_precondition(this->owns_(make::point1d(ind)));
+ mln_precondition(this->has(make::point1d(ind)));
return this->data_->array_[ind];
}
@@ -445,7 +445,7 @@
T&
image1d<T>::at(int ind)
{
- mln_precondition(this->owns_(make::point1d(ind)));
+ mln_precondition(this->has(make::point1d(ind)));
return this->data_->array_[ind];
}
Index: mln/core/fi_adaptor.hh
--- mln/core/fi_adaptor.hh (revision 2011)
+++ mln/core/fi_adaptor.hh (working copy)
@@ -326,7 +326,7 @@
const mln_value(I)&
fi_adaptor<I>::operator()(const point2d& p) const
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
// Because Freeimage stores lena upside down.
return this->data_->array_[this->domain().len(0) - 1 - p.row()][p.col()];
@@ -336,7 +336,7 @@
mln_value(I)&
fi_adaptor<I>::operator()(const point2d& p)
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
// Because Freeimage stores lena upside down.
return this->data_->array_[this->domain().len(0) - 1 - p.row()][p.col()];
@@ -362,7 +362,7 @@
const mln_value(I)&
fi_adaptor<I>::at(int row, int col) const
{
- mln_precondition(this->owns_(make::point2d(row, col)));
+ mln_precondition(this->has(make::point2d(row, col)));
// Because Freeimage stores lena upside down.
return this->data_->array_[this->domain().len(0) - 1 - row][col];
@@ -372,7 +372,7 @@
mln_value(I)&
fi_adaptor<I>::at(int row, int col)
{
- mln_precondition(this->owns_(make::point2d(row, col)));
+ mln_precondition(this->has(make::point2d(row, col)));
// Because Freeimage stores lena upside down.
return this->data_->array_[this->domain().len(0) - 1 - row][col];
Index: mln/core/image3d.hh
--- mln/core/image3d.hh (revision 2011)
+++ mln/core/image3d.hh (working copy)
@@ -164,7 +164,7 @@
/// Test if \p p is valid.
- bool owns_(const point3d& p) const;
+ bool has(const point3d& p) const;
/// Give the set of values of the image.
const vset& values() const;
@@ -427,7 +427,7 @@
template <typename T>
inline
bool
- image3d<T>::owns_(const point3d& p) const
+ image3d<T>::has(const point3d& p) const
{
mln_precondition(this->has_data());
return data_->vb_.has(p);
@@ -438,7 +438,7 @@
const T&
image3d<T>::operator()(const point3d& p) const
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
return data_->array_[p.sli()][p.row()][p.col()];
}
@@ -447,7 +447,7 @@
T&
image3d<T>::operator()(const point3d& p)
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
return data_->array_[p.sli()][p.row()][p.col()];
}
@@ -474,7 +474,7 @@
const T&
image3d<T>::at(int sli, int row, int col) const
{
- mln_precondition(this->owns_(make::point3d(sli, row, col)));
+ mln_precondition(this->has(make::point3d(sli, row, col)));
return data_->array_[sli][row][col];
}
@@ -483,7 +483,7 @@
T&
image3d<T>::at(int sli, int row, int col)
{
- mln_precondition(this->owns_(make::point3d(sli, row, col)));
+ mln_precondition(this->has(make::point3d(sli, row, col)));
return data_->array_[sli][row][col];
}
Index: mln/core/hexa.hh
--- mln/core/hexa.hh (revision 2011)
+++ mln/core/hexa.hh (working copy)
@@ -156,7 +156,7 @@
/// Test if \p p belongs to the image domain.
bool has(const psite& p) const;
- bool owns_(const psite& p) const;
+ bool has(const psite& p) const;
/// Read-only access of pixel value at hexa point site \p p.
rvalue operator()(const point2d_h& p) const;
@@ -269,7 +269,7 @@
template <typename I>
inline
bool
- hexa<I>::owns_(const psite& p) const
+ hexa<I>::has(const psite& p) const
{
return this->has(p);
}
Index: mln/core/tr_image.hh
--- mln/core/tr_image.hh (revision 2011)
+++ mln/core/tr_image.hh (working copy)
@@ -111,10 +111,10 @@
bool has_data() const;
/// Test if a pixel value is accessible at \p p.
- using super_::owns_;
+ using super_::has;
/// Test if a pixel value is accessible at \p v.
- bool owns_(const mln::algebra::vec<I::point::dim, float>& v) const;
+ bool has(const mln::algebra::vec<I::point::dim, float>& v) const;
using super_::has;
@@ -173,13 +173,13 @@
template <typename T, typename I>
inline
- bool tr_image<T,I>::owns_(const algebra::vec<I::point::dim, float>& v)
const
+ bool tr_image<T,I>::has(const algebra::vec<I::point::dim, float>& v)
const
{
mln_point(I) p;
algebra::vec<I::point::dim, float> v2 = this->data_->tr_.inv()(v);
for (unsigned i = 0; i < I::point::dim; ++i)
p[i] = static_cast<int>(round(v2[i]));
- return this->delegatee_().owns_(p);
+ return this->delegatee_().has(p);
}
template <typename T, typename I>
@@ -202,7 +202,7 @@
algebra::vec<I::point::dim, float> v2 = this->data_->tr_.inv()(v);
for (unsigned i = 0; i < I::point::dim; ++i)
p[i] = static_cast<int>(round(v2[i]));
- mln_assertion(this->delegatee_()->owns_(p));
+ mln_assertion(this->delegatee_()->has(p));
return (*this->delegatee_())(p);
}
Index: mln/core/safe.hh
--- mln/core/safe.hh (revision 2011)
+++ mln/core/safe.hh (working copy)
@@ -135,7 +135,7 @@
mln_rvalue(I)
safe_image<I>::operator()(const mln_psite(I)& p) const
{
- if (! this->owns_(p))
+ if (! this->has(p))
return this->data_->default_value_;
return this->data_->ima_(p);
}
@@ -146,7 +146,7 @@
safe_image<I>::operator()(const mln_psite(I)& p)
{
static mln_value(I) forget_it_;
- if (! this->owns_(p))
+ if (! this->has(p))
// so data_->default_value_ is returned but cannot be modified
return forget_it_ = this->data_->default_value_;
return this->data_->ima_(p);
Index: mln/core/concept/doc/image.hh
--- mln/core/concept/doc/image.hh (revision 2011)
+++ mln/core/concept/doc/image.hh (working copy)
@@ -80,7 +80,7 @@
* \return True if accessing the image value at \p p is
* possible, that is, does not abort the execution.
*/
- bool owns_(const psite& p) const;
+ bool has(const psite& p) const;
/*! \brief Give the definition domain of the image.
*
@@ -159,7 +159,7 @@
*
* \return True if \p p belongs to the image domain.
*
- * \invariant has(p) is true => owns_(p) is also true.
+ * \invariant has(p) is true => has(p) is also true.
*/
bool has(const psite& p) const;
Index: mln/level/memset_.hh
--- mln/level/memset_.hh (revision 2011)
+++ mln/level/memset_.hh (working copy)
@@ -147,7 +147,7 @@
mlc_is(mln_trait_image_speed(I), trait::image::speed::fastest)::check();
mln_precondition(input.has_data());
- mln_precondition(input.owns_(p));
+ mln_precondition(input.has(p));
mln_precondition(input.offset_at(p) + n <= input.ncells());
pixel<I> pix(input, p);
Index: mln/value/stack.hh
--- mln/value/stack.hh (revision 2011)
+++ mln/value/stack.hh (working copy)
@@ -259,7 +259,7 @@
algebra::vec<n, mln_value(I)>
stack_image<n,I>::read_(const psite& p) const
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
algebra::vec<n, mln_value(I)> tmp;
for (unsigned i = 0; i < n; ++i)
tmp[i] = this->data_->imas_[i].operator()(p);
@@ -279,7 +279,7 @@
void
stack_image<n,I>::write_(const psite& p, const value& v)
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
// FIXME!!!
for (unsigned i = 0; i < n; ++i)
this->data_->imas_[i].operator()(p) = v[i];
Index: mln/pw/image.hh
--- mln/pw/image.hh (revision 2011)
+++ mln/pw/image.hh (working copy)
@@ -132,7 +132,7 @@
/// Test if a pixel value is accessible at \p p.
- bool owns_(const mln_psite(S)& p) const;
+ bool has(const mln_psite(S)& p) const;
/// Give the definition domain.
const S& domain() const;
@@ -199,7 +199,7 @@
template <typename F, typename S>
inline
- bool image<F,S>::owns_(const mln_psite(S)& p) const
+ bool image<F,S>::has(const mln_psite(S)& p) const
{
return this->data_->pset_.has(p);
}
Index: mln/pw/value.hh
--- mln/pw/value.hh (revision 2011)
+++ mln/pw/value.hh (working copy)
@@ -93,7 +93,7 @@
value_<I>::operator()(const mln_psite(I)& p) const
{
mln_precondition(ima_ != 0);
- mln_precondition(ima_->owns_(p));
+ mln_precondition(ima_->has(p));
return (*ima_)(p);
}
Index: sandbox/duhamel/translate_image.hh
--- sandbox/duhamel/translate_image.hh (revision 2011)
+++ sandbox/duhamel/translate_image.hh (working copy)
@@ -108,7 +108,7 @@
const box2d& domain() const;
/// Test if a pixel value is accessible at \p p.
- bool owns_(const mln_psite(I)& ) const;
+ bool has(const mln_psite(I)& ) const;
/// Read-only access of pixel value at point site \p p.
mln_rvalue(I) operator()(const mln_psite(I)& p) const;
@@ -156,17 +156,17 @@
}
template <typename I>
- bool translate_image<I>::owns_(const mln_psite(I)& p) const
+ bool translate_image<I>::has(const mln_psite(I)& p) const
{
mln_point(I) np = p - this->data_->dp_;
- return this->data_->ima_.owns_(np);
+ return this->data_->ima_.has(np);
}
template <typename I>
mln_rvalue(I)
translate_image<I>::operator()(const mln_psite(I)& p) const
{
- mln_assertion(this->owns_(p));
+ mln_assertion(this->has(p));
mln_point(I) np = p - this->data_->dp_;
return this->data_->ima_(np);
}
@@ -176,7 +176,7 @@
typename translate_image<I>::lvalue
translate_image<I>::operator()(const mln_psite(I)& p)
{
- mln_assertion(this->owns_(p));
+ mln_assertion(this->has(p));
mln_point(I) np = p - this->data_->dp_;
return this->data_->ima_(np);
}
Index: sandbox/nivault/rotation.cc
--- sandbox/nivault/rotation.cc (revision 2011)
+++ sandbox/nivault/rotation.cc (working copy)
@@ -60,7 +60,7 @@
{
q0 = cos10 * p[0] - sin10 * p[1];
q1 = sin10 * p[0] + cos10 * p[1];
- if (inter.owns_(make::vec(q0, q1)))
+ if (inter.has(make::vec(q0, q1)))
{
out(p) = inter(make::vec(q0, q1));
// std::cout << "GOOD" << std::endl;
Index: sandbox/nivault/plugin-gimp/src/gimp-image.hh
--- sandbox/nivault/plugin-gimp/src/gimp-image.hh (revision 2011)
+++ sandbox/nivault/plugin-gimp/src/gimp-image.hh (working copy)
@@ -182,7 +182,7 @@
void init_(box2d box);
/// Test if \p p is valid.
- bool owns_(const point2d& p) const;
+ bool has(const point2d& p) const;
/// Give the set of values of the image.
const vset& values() const;
@@ -399,7 +399,7 @@
template <GimpImageType t>
bool
- gimp_image<t>::owns_(const point2d& p) const
+ gimp_image<t>::has(const point2d& p) const
{
mln_precondition(this->has_data());
return this->data_->b_.has(p);
@@ -410,7 +410,7 @@
const mln_value(gimp_image<t>)&
gimp_image<t>::operator()(const point& p) const
{
- // mln_precondition(this->owns_(p));
+ // mln_precondition(this->has(p));
// FIXME HERE value*) this->data_->rgn->data
static mln::value::rgb8 c;
@@ -424,7 +424,7 @@
mln_value(gimp_image<t>)&
gimp_image<t>::operator()(const point& p)
{
- // mln_precondition(this->owns_(p));
+ // mln_precondition(this->has(p));
static mln::value::rgb8 c;
gimp_pixel_rgn_get_pixel(this->data_->rgn_,
(guchar *) &c,
@@ -456,7 +456,7 @@
// const mln_value(gimp_image<t>)&
// gimp_image<t>::at(int row, int col) const
// {
-// mln_precondition(this->owns_(make::point2d(row, col)));
+// mln_precondition(this->has(make::point2d(row, col)));
// return this->data_->array_[row][col];
// }
@@ -465,7 +465,7 @@
// mln_value(gimp_image<t>)&
// gimp_image<t>::at(int row, int col)
// {
-// mln_precondition(this->owns_(make::point2d(row, col)));
+// mln_precondition(this->has(make::point2d(row, col)));
// return this->data_->array_[row][col];
// }
Index: sandbox/jardonnet/subsampling/sub_sampled_image.hh
--- sandbox/jardonnet/subsampling/sub_sampled_image.hh (revision 2011)
+++ sandbox/jardonnet/subsampling/sub_sampled_image.hh (working copy)
@@ -101,7 +101,7 @@
bool has_data() const;
/// Test if a pixel value is accessible at \p p.
- bool owns_(const mln_point(I)& p) const;
+ bool has(const mln_point(I)& p) const;
/// Give the set of values of the image.
const vset& values() const;
@@ -184,10 +184,10 @@
template <typename I>
inline
bool
- sub_sampled_image<I>::owns_(const mln_point(I)& p) const
+ sub_sampled_image<I>::has(const mln_point(I)& p) const
{
mln_precondition(this->has_data());
- return this->delegatee_()->owns_(translate_coords_(p));
+ return this->delegatee_()->has(translate_coords_(p));
}
template <typename I>
@@ -195,7 +195,7 @@
mln_rvalue(I)
sub_sampled_image<I>::operator()(const mln_point(I)& p) const
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
return (*this->delegatee_())(translate_coords_(p));
}
@@ -204,7 +204,7 @@
typename internal::morpher_lvalue_<I>::ret
sub_sampled_image<I>::operator()(const mln_point(I)& p)
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
return (*this->delegatee_())(translate_coords_(p));
}
Index: sandbox/geraud/cs2d/cs2d_morpho.hh
--- sandbox/geraud/cs2d/cs2d_morpho.hh (revision 2011)
+++ sandbox/geraud/cs2d/cs2d_morpho.hh (working copy)
@@ -52,7 +52,7 @@
for_all(p)
{
m.init();
- for_all(n) if (input.owns_(n))
+ for_all(n) if (input.has(n))
m.take(input(n));
output(p) = m.second() - m.first();
}
Index: sandbox/garrigues/level_set.hh
--- sandbox/garrigues/level_set.hh (revision 2011)
+++ sandbox/garrigues/level_set.hh (working copy)
@@ -347,7 +347,7 @@
mln_piter(p_set<P>) z(env.N);
for_all(z)
{
- mln_assertion(border_ima.owns_(z));
+ mln_assertion(border_ima.has(z));
border_ima(z) = true;
}
unsigned n;
Index: sandbox/garrigues/fllt/compute_level_set_fast2.hh
--- sandbox/garrigues/fllt/compute_level_set_fast2.hh (revision 2011)
+++ sandbox/garrigues/fllt/compute_level_set_fast2.hh (working copy)
@@ -250,7 +250,7 @@
// mln_piter(p_image2d<P>) z(N);
// for_all(z)
// {
-// mln_assertion(border_ima.owns_(z));
+// mln_assertion(border_ima.has(z));
// border_ima(z) = true;
// }
// unsigned n;
Index: sandbox/garrigues/fllt/compute_level_set_fast.hh
--- sandbox/garrigues/fllt/compute_level_set_fast.hh (revision 2011)
+++ sandbox/garrigues/fllt/compute_level_set_fast.hh (working copy)
@@ -244,7 +244,7 @@
// mln_piter(p_image2d<P>) z(N);
// for_all(z)
// {
-// mln_assertion(border_ima.owns_(z));
+// mln_assertion(border_ima.has(z));
// border_ima(z) = true;
// }
// unsigned n;
Index: sandbox/garrigues/fllt/compute_level_set.hh
--- sandbox/garrigues/fllt/compute_level_set.hh (revision 2011)
+++ sandbox/garrigues/fllt/compute_level_set.hh (working copy)
@@ -185,7 +185,7 @@
mln_piter(p_set<P>) z(N);
for_all(z)
{
- mln_assertion(border_ima.owns_(z));
+ mln_assertion(border_ima.has(z));
border_ima(z) = true;
}
unsigned n;
Index: sandbox/garrigues/tiled_image2d/tiled_image2d.hh
--- sandbox/garrigues/tiled_image2d/tiled_image2d.hh (revision 2011)
+++ sandbox/garrigues/tiled_image2d/tiled_image2d.hh (working copy)
@@ -178,7 +178,7 @@
/// Test if \p p is valid.
- bool owns_(const point2d& p) const;
+ bool has(const point2d& p) const;
/// Give the set of values of the image.
const vset& values() const;
@@ -329,7 +329,7 @@
template <typename T>
inline
bool
- tiled_image2d<T>::owns_(const point2d& p) const
+ tiled_image2d<T>::has(const point2d& p) const
{
mln_precondition(this->has_data());
return this->data_->b_.has(p);
@@ -340,7 +340,7 @@
const T&
tiled_image2d<T>::operator()(const point2d& p) const
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
unsigned page_n = layout::image_layout::page_at(*this, p);
// note: although the page instance goes
// out of scope, the reference stays valid
@@ -354,7 +354,7 @@
T&
tiled_image2d<T>::operator()(const point2d& p)
{
- mln_precondition(this->owns_(p));
+ mln_precondition(this->has(p));
unsigned page_n = layout::image_layout::page_at(*this, p);
// note: although the page instance goes
// out of scope, the reference stays valid
Index: sandbox/garrigues/image_identity/image_value_morpher.hh
--- sandbox/garrigues/image_identity/image_value_morpher.hh (revision 2011)
+++ sandbox/garrigues/image_identity/image_value_morpher.hh (working copy)
@@ -55,7 +55,7 @@
public:
const mln_pset(I)& domain() const;
- bool owns_(const mln_psite(I)& p) const;
+ bool has(const mln_psite(I)& p) const;
protected:
image_value_morpher_();
@@ -79,10 +79,10 @@
template <typename I, typename E>
bool
- image_value_morpher_<I,E>::owns_(const mln_psite(I)& p) const
+ image_value_morpher_<I,E>::has(const mln_psite(I)& p) const
{
mln_precondition(this->delegatee_() != 0);
- return this->delegatee_()->owns_(p);
+ return this->delegatee_()->has(p);
}
# endif // ! MLN_INCLUDE_ONLY
Index: sandbox/garrigues/image_identity/interpolated.hh
--- sandbox/garrigues/image_identity/interpolated.hh (revision 2011)
+++ sandbox/garrigues/image_identity/interpolated.hh (working copy)
@@ -96,10 +96,10 @@
bool has_data() const;
/// Test if a pixel value is accessible at \p p.
- using super_::owns_;
+ using super_::has;
/// Test if a pixel value is accessible at \p v.
- bool owns_(const mln::algebra::vec<I::point::dim, float>& v) const;
+ bool has(const mln::algebra::vec<I::point::dim, float>& v) const;
/// Read-only access of pixel value at point site \p p.
/// Mutable access is only OK for reading (not writing).
@@ -149,12 +149,12 @@
}
template <typename I>
- bool interpolated<I>::owns_(const mln::algebra::vec<I::point::dim,
float>& v) const
+ bool interpolated<I>::has(const mln::algebra::vec<I::point::dim,
float>& v) const
{
mln_point(I) p;
for (unsigned i = 0; i < I::point::dim; ++i)
p[i] = static_cast<int>(round(v[i]));
- return this->data_->ima_.owns_(p);
+ return this->data_->ima_.has(p);
}
template <typename I>
@@ -164,7 +164,7 @@
mln_point(I) p;
for (unsigned i = 0; i < I::point::dim; ++i)
p[i] = static_cast<int>(round(v[i]));
- mln_assertion(this->data_->ima_.owns_(p));
+ mln_assertion(this->data_->ima_.has(p));
return this->data_->ima_(p);
}
Index: sandbox/ballas/refactorization/p_run.hh
--- sandbox/ballas/refactorization/p_run.hh (revision 2011)
+++ sandbox/ballas/refactorization/p_run.hh (working copy)
@@ -27,7 +27,7 @@
p_run(const P& start, std::size_t len);
void set_run(const P& start, std::size_t len);
- bool owns_(const P& p) const;
+ bool has(const P& p) const;
std::size_t nsites() const;
std::size_t length() const;
@@ -87,7 +87,7 @@
template <typename P>
inline
bool
- p_run<P>::owns_(const P& p) const
+ p_run<P>::has(const P& p) const
{
assert(is_valid_);
bool res = true;
Index: sandbox/ballas/refactorization/rle_image.hh
--- sandbox/ballas/refactorization/rle_image.hh (revision 2011)
+++ sandbox/ballas/refactorization/rle_image.hh (working copy)
@@ -35,7 +35,7 @@
lvalue operator() (const rle_psite<P>& psite);
bool has_data() const;
- bool owns_(const rle_psite<P>& ps) const;
+ bool has(const rle_psite<P>& ps) const;
const pset& domain() const;
protected:
@@ -75,7 +75,7 @@
rle_image<P, T>::operator() (const rle_psite<P>& psite)
const
{
- assert(this->owns_(psite));
+ assert(this->has(psite));
return this->values_[psite.p_of_run()];
}
@@ -84,7 +84,7 @@
typename rle_image<P, T>::lvalue
rle_image<P, T>::operator() (const rle_psite<P>& psite)
{
- assert(this->owns_(psite));
+ assert(this->has(psite));
return this->values_[psite.p_of_run()];
}
@@ -99,7 +99,7 @@
template <typename P, typename T>
inline
bool
- rle_image<P, T>::owns_(const rle_psite<P>& ps) const
+ rle_image<P, T>::has(const rle_psite<P>& ps) const
{
if (!this->has_data())
return false;
Index: sandbox/ballas/refactorization/image2d.hh
--- sandbox/ballas/refactorization/image2d.hh (revision 2011)
+++ sandbox/ballas/refactorization/image2d.hh (working copy)
@@ -32,7 +32,7 @@
// const vset& values() const;
bool is_ready() const;
- bool owns_(const point2d<int>& p) const;
+ bool has(const point2d<int>& p) const;
const box2d<int>& domain() const;
const T& operator()(const point2d<int>& p) const;
Index: sandbox/ballas/refactorization/concept.hh
--- sandbox/ballas/refactorization/concept.hh (revision 2011)
+++ sandbox/ballas/refactorization/concept.hh (working copy)
@@ -141,7 +141,7 @@
typedef psite;
rvalue operator() (const psite&) const;
lvalue operator() (const psite);
- bool owns_(const psite&) const;
+ bool has(const psite&) const;
bool has(const psite&) const;
typedef pset;
Index: sandbox/ballas/refactorization/rle_pset.hh
--- sandbox/ballas/refactorization/rle_pset.hh (revision 2011)
+++ sandbox/ballas/refactorization/rle_pset.hh (working copy)
@@ -60,7 +60,7 @@
rle_pset();
/// Test is \p p belongs to this point set.
- bool owns_(const rle_psite<P>& ps) const;
+ bool has(const rle_psite<P>& ps) const;
typename std::size_t nsites() const;
void insert(const p_run<P>& pr);
@@ -92,7 +92,7 @@
template <typename P>
inline
bool
- rle_pset<P>::owns_(const rle_psite<P>& ps) const
+ rle_pset<P>::has(const rle_psite<P>& ps) const
{
if (ps.p_of_run() < nruns()
&& ps.p_in_run() < con_[ps.p_of_run()].length())
Index: sandbox/ballas/refactorization/internal/pset_base.hh
--- sandbox/ballas/refactorization/internal/pset_base.hh (revision 2011)
+++ sandbox/ballas/refactorization/internal/pset_base.hh (working copy)
@@ -38,7 +38,7 @@
bool
pset_base_<P, E>::has(const P& ps) const
{
- return exact(this)->owns_(ps);
+ return exact(this)->has(ps);
}
# endif // ! MLN_INCLUDE_ONLY
Index: sandbox/ballas/refactorization/internal/image_base.hh
--- sandbox/ballas/refactorization/internal/image_base.hh (revision 2011)
+++ sandbox/ballas/refactorization/internal/image_base.hh (working copy)
@@ -38,7 +38,7 @@
bool
image_base_<S, E>::has(const psite& ps) const
{
- return exact(this)->owns_(ps);
+ return exact(this)->has(ps);
}
Index: sandbox/ballas/refactorization/box2d.hh
--- sandbox/ballas/refactorization/box2d.hh (revision 2011)
+++ sandbox/ballas/refactorization/box2d.hh (working copy)
@@ -36,7 +36,7 @@
box2d();
box2d(const site& pmin, const site& pmax);
- bool owns_(const site& p) const;
+ bool has(const site& p) const;
protected:
point2d<C> pmin_, pmax_;
@@ -98,7 +98,7 @@
template <typename C>
inline
bool
- box2d<C>::owns_(const site& p) const
+ box2d<C>::has(const site& p) const
{
for (unsigned i = 0; i < C::dim; ++i)
if (p[i] < pmin_[i] || p[i] > pmax_[i])