* mln/accu/line.hh,
* mln/accu/transform_line.hh,
* mln/border/duplicate.hh,
* mln/border/fill.hh,
* mln/convert/to_qimage.hh,
* mln/core/concept/doc/image_fastest.hh,
* mln/core/concept/window.hh,
* mln/core/dpoints_pixter.hh,
* mln/core/image/image1d.hh,
* mln/core/image/image2d.hh,
* mln/core/image/image3d.hh,
* mln/core/internal/check/image_fastest.hh,
* mln/core/internal/image_identity.hh,
* mln/core/internal/pixel_impl.hh,
* mln/core/pixel.hh,
* mln/data/fill_with_value.spe.hh,
* mln/data/memset_.hh,
* mln/io/magick/load.hh,
* mln/io/magick/save.hh,
* mln/labeling/value_and_compute.hh,
* mln/linear/gaussian_directional_2d.hh,
* mln/subsampling/antialiased.hh,
* mln/trait/image/props.hh,
* mln/transform/internal/closest_point_functor.hh,
* mln/world/binary_2d/subsample.hh: Rename point_at_index,
delta_index and index_of_point to point_at_offset, delta_offset
and offset_of_point.
---
milena/ChangeLog | 32 ++++++++++++++++++
milena/mln/accu/line.hh | 6 ++--
milena/mln/accu/transform_line.hh | 26 +++++++-------
milena/mln/border/duplicate.hh | 8 ++--
milena/mln/border/fill.hh | 8 ++--
milena/mln/convert/to_qimage.hh | 9 +++--
milena/mln/core/concept/doc/image_fastest.hh | 9 +++--
milena/mln/core/concept/window.hh | 6 ++--
milena/mln/core/dpoints_pixter.hh | 8 ++--
milena/mln/core/image/image1d.hh | 34 ++++++++++----------
milena/mln/core/image/image2d.hh | 27 +++++++---------
milena/mln/core/image/image3d.hh | 16 +++++-----
milena/mln/core/internal/check/image_fastest.hh | 20 ++++++------
milena/mln/core/internal/image_identity.hh | 11 +++---
milena/mln/core/internal/pixel_impl.hh | 6 ++--
milena/mln/core/pixel.hh | 5 ++-
milena/mln/data/fill_with_value.spe.hh | 5 ++-
milena/mln/data/memset_.hh | 4 +-
milena/mln/io/magick/load.hh | 6 ++--
milena/mln/io/magick/save.hh | 6 ++--
milena/mln/labeling/value_and_compute.hh | 2 +-
milena/mln/linear/gaussian_directional_2d.hh | 9 +++--
milena/mln/subsampling/antialiased.hh | 8 ++--
milena/mln/trait/image/props.hh | 11 +++---
.../transform/internal/closest_point_functor.hh | 5 ++-
milena/mln/world/binary_2d/subsample.hh | 6 ++--
26 files changed, 165 insertions(+), 128 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 96019b5..f610a5e 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,35 @@
+2012-05-11 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Rename point_at_index, delta_index and index_of_point.
+
+ * mln/accu/line.hh,
+ * mln/accu/transform_line.hh,
+ * mln/border/duplicate.hh,
+ * mln/border/fill.hh,
+ * mln/convert/to_qimage.hh,
+ * mln/core/concept/doc/image_fastest.hh,
+ * mln/core/concept/window.hh,
+ * mln/core/dpoints_pixter.hh,
+ * mln/core/image/image1d.hh,
+ * mln/core/image/image2d.hh,
+ * mln/core/image/image3d.hh,
+ * mln/core/internal/check/image_fastest.hh,
+ * mln/core/internal/image_identity.hh,
+ * mln/core/internal/pixel_impl.hh,
+ * mln/core/pixel.hh,
+ * mln/data/fill_with_value.spe.hh,
+ * mln/data/memset_.hh,
+ * mln/io/magick/load.hh,
+ * mln/io/magick/save.hh,
+ * mln/labeling/value_and_compute.hh,
+ * mln/linear/gaussian_directional_2d.hh,
+ * mln/subsampling/antialiased.hh,
+ * mln/trait/image/props.hh,
+ * mln/transform/internal/closest_point_functor.hh,
+ * mln/world/binary_2d/subsample.hh: Rename point_at_index,
+ delta_index and index_of_point to point_at_offset, delta_offset
+ and offset_of_point.
+
2012-05-10 Guillaume Lazzara <z(a)lrde.epita.fr>
Rely on Argument-Dependent Lookup (ADL) in from_to_ overloads.
diff --git a/milena/mln/accu/line.hh b/milena/mln/accu/line.hh
index 75be6b3..4ae2867 100644
--- a/milena/mln/accu/line.hh
+++ b/milena/mln/accu/line.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011, 2012 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -240,7 +240,7 @@ namespace mln
mln_delta(P) dp = literal::zero;
dp[Dir] = 1;
- unsigned offset = input.delta_index(dp);
+ unsigned offset = input.delta_offset(dp);
A a; // Accumulator.
a.init();
diff --git a/milena/mln/accu/transform_line.hh b/milena/mln/accu/transform_line.hh
index 67d97f9..2250c87 100644
--- a/milena/mln/accu/transform_line.hh
+++ b/milena/mln/accu/transform_line.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2008, 2009, 2012 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -230,18 +230,18 @@ namespace mln
P p = pmin; // Starting point.
def::coord& p_dir = p[dir];
-
+
// Step.
mln_delta(P) dp(literal::zero);
dp[dir] = 1;
- int step = input.delta_index(dp);
+ int step = input.delta_offset(dp);
do
{
// Start the line.
// ---------------
- unsigned o_p = input.index_of_point(p);
+ unsigned o_p = input.offset_of_point(p);
unsigned o_qt = o_p - (length / 2) * step;
unsigned o_qu = o_qt;
a.init();
@@ -293,7 +293,7 @@ namespace mln
}
} while (p != pmin);
-
+
trace::exiting("accu::impl::transform_line_fastest");
return output;
}
@@ -331,17 +331,17 @@ namespace mln
// Step.
mln_delta(P) dp(literal::zero);
dp[dir] = 1;
- int step = input.delta_index(dp);
+ int step = input.delta_offset(dp);
do
{
// Start the line.
// ---------------
- unsigned o_p = input.index_of_point(p);
+ unsigned o_p = input.offset_of_point(p);
unsigned o_qt = o_p;
unsigned o_qu = o_p;
-
+
a.init();
// Causal part.
@@ -363,7 +363,7 @@ namespace mln
{
a.take(input.element(o_qt));
o_qt += step;
-
+
++p_dir;
o_p += step;
output.element(o_p) = a.to_result();
@@ -397,7 +397,7 @@ namespace mln
{
a.untake(input.element(o_qu));
o_qu += step;
-
+
o_p += step;
output.element(o_p) = a.to_result();
}
@@ -420,7 +420,7 @@ namespace mln
}
} while (p != pmin);
-
+
trace::exiting("accu::impl::transform_line_fastest_without_border");
return output;
}
@@ -534,7 +534,7 @@ namespace mln
A_ a_ = accu::unmeta(exact(a), mln_value(I)());
internal::transform_line_tests(a_, input);
-
+
mln_ch_value(I, mln_result(A_)) output;
output = internal::transform_line_dispatch(a_, input, length, dir);
diff --git a/milena/mln/border/duplicate.hh b/milena/mln/border/duplicate.hh
index 059dc77..cbf8688 100644
--- a/milena/mln/border/duplicate.hh
+++ b/milena/mln/border/duplicate.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011, 2012 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -101,7 +101,7 @@ namespace mln
// Duplicate
for_all (pl)
{
- st = ima.index_of_point (pl);
+ st = ima.offset_of_point (pl);
for (unsigned i = 1; i <= border; ++i)
opt::element(ima, st - i) = opt::element(ima, st);
st = st + len_c - 1;
@@ -152,7 +152,7 @@ namespace mln
// Duplicate
for (unsigned j = 0; j < len_r; ++j)
{
- st = ima.index_of_point (pl);
+ st = ima.offset_of_point (pl);
for (unsigned i = 1; i <= border; ++i)
opt::element(ima, st - i) = opt::element(ima, st);
st = st + len_c - 1;
diff --git a/milena/mln/border/fill.hh b/milena/mln/border/fill.hh
index 5c04121..6a3ebab 100644
--- a/milena/mln/border/fill.hh
+++ b/milena/mln/border/fill.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011, 2012 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -97,7 +97,7 @@ namespace mln
for_all (pl)
{
- unsigned end = ima.index_of_point (pl);
+ unsigned end = ima.offset_of_point (pl);
if (st < end)
std::memset((void*)&opt::element(ima, st),
*(const int*)(&v),
@@ -129,7 +129,7 @@ namespace mln
for_all (pl)
{
- unsigned end = ima.index_of_point (pl);
+ unsigned end = ima.offset_of_point (pl);
for (unsigned i = st; i < end; ++i)
opt::element(ima, i) = v;
st = end + len_r;
diff --git a/milena/mln/convert/to_qimage.hh b/milena/mln/convert/to_qimage.hh
index a7c8512..f993fbc 100755
--- a/milena/mln/convert/to_qimage.hh
+++ b/milena/mln/convert/to_qimage.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010, 2012 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -97,7 +98,7 @@ namespace mln
# endif // ! QT_VERSION
const mln_value(I)* ptr_ima = &ima(ima.domain().pmin());
- unsigned offset = ima.delta_index(dpoint2d(+1, - ncols));
+ unsigned offset = ima.delta_offset(dpoint2d(+1, - ncols));
// Data is stored as ABGR so we skip the first value which is ignored.
for (unsigned row = 0; row < nrows; ++row, ptr_ima += offset)
@@ -137,7 +138,7 @@ namespace mln
QImage qima(ncols, nrows, QImage::Format_RGB32);
uchar * ptr_qima = qima.scanLine(0);
const mln_value(I)* ptr_ima = &ima(ima.domain().pmin());
- unsigned offset = ima.delta_index(dpoint2d(+1, - ncols));
+ unsigned offset = ima.delta_offset(dpoint2d(+1, - ncols));
for (unsigned row = 0; row < nrows; ++row, ptr_ima += offset)
{
@@ -183,7 +184,7 @@ namespace mln
mln::border::resize(ima, 0);
unsigned
- offset = ima.delta_index(DP(+1, 0)),
+ offset = ima.delta_offset(DP(+1, 0)),
line_offset = 0;
QImage qima(ncols, nrows, QImage::Format_RGB888);
diff --git a/milena/mln/core/concept/doc/image_fastest.hh
b/milena/mln/core/concept/doc/image_fastest.hh
index b3ecedc..5474f9d 100644
--- a/milena/mln/core/concept/doc/image_fastest.hh
+++ b/milena/mln/core/concept/doc/image_fastest.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -49,7 +50,7 @@ namespace mln
*
* \pre The image has to be initialized.
*/
- int delta_index(const dpoint& dp);
+ int delta_offset(const dpoint& dp);
/*! \brief Give the point at offset \p o.
@@ -59,12 +60,12 @@ namespace mln
* \pre The image has to be initialized.
* \pre o < nelements()
*/
- point point_at_index(unsigned o) const;
+ point point_at_offset(unsigned o) const;
/*! \brief Give a hook to the value buffer.
*
- *
+ *
*
* \pre The image has to be initialized.
*/
diff --git a/milena/mln/core/concept/window.hh b/milena/mln/core/concept/window.hh
index 9aa58bd..c59924f 100644
--- a/milena/mln/core/concept/window.hh
+++ b/milena/mln/core/concept/window.hh
@@ -357,7 +357,7 @@ namespace mln
unsigned n = win.size();
for (unsigned i = 0; i < n; ++i)
- arr.append(ima.delta_index(win.dp(i)));
+ arr.append(ima.delta_offset(win.dp(i)));
return arr;
}
@@ -380,7 +380,7 @@ namespace mln
for (unsigned i = 0; i < n; ++i)
{
- int offset = ima.delta_index(win.dp(i));
+ int offset = ima.delta_offset(win.dp(i));
if (offset > 0)
arr.append(offset);
}
@@ -406,7 +406,7 @@ namespace mln
for (unsigned i = 0; i < n; ++i)
{
- int offset = ima.delta_index(win.dp(i));
+ int offset = ima.delta_offset(win.dp(i));
if (offset < 0)
arr.append(offset);
}
diff --git a/milena/mln/core/dpoints_pixter.hh b/milena/mln/core/dpoints_pixter.hh
index eb19c2b..aeea333 100644
--- a/milena/mln/core/dpoints_pixter.hh
+++ b/milena/mln/core/dpoints_pixter.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011, 2012 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -270,7 +270,7 @@ namespace mln
dpoints_fwd_pixter<I>::init_(const Dps& dps)
{
for (unsigned i = 0; i < dps.size(); ++i)
- offset_.push_back(this->image_.delta_index(dps.dp(i)));
+ offset_.push_back(this->image_.delta_offset(dps.dp(i)));
// offset_[0] is absolute
// other offsets are relative:
if (dps.size() > 1)
@@ -381,7 +381,7 @@ namespace mln
dpoints_bkd_pixter<I>::init_(const Dps& dps)
{
for (unsigned i = 0; i < dps.size(); ++i)
- offset_.push_back(this->image_.delta_index(dps.dp(i)));
+ offset_.push_back(this->image_.delta_offset(dps.dp(i)));
// offset_[size() - 1] is absolute
// other offsets are relative:
if (dps.size() > 1)
diff --git a/milena/mln/core/image/image1d.hh b/milena/mln/core/image/image1d.hh
index 53e8611..60f828d 100644
--- a/milena/mln/core/image/image1d.hh
+++ b/milena/mln/core/image/image1d.hh
@@ -189,27 +189,27 @@ namespace mln
// Specific methods:
// -----------------
- /// Read-only access to the image value located at (\p index).
- const T& at_(def::coord index) const;
+ /// Read-only access to the image value located at (\p offset).
+ const T& at_(def::coord offset) const;
- /// Read-write access to the image value located at (\p index).
- T& at_(def::coord index);
+ /// Read-write access to the image value located at (\p offset).
+ T& at_(def::coord offset);
- /// Give the number of indexes.
+ /// Give the number of offsets.
unsigned ninds() const;
/// Fast Image method
- // Give the index of a point.
- using super_::index_of_point;
+ // Give the offset of a point.
+ using super_::offset_of_point;
/// Give the offset corresponding to the delta-point \p dp.
- int delta_index(const dpoint1d& dp) const;
+ int delta_offset(const dpoint1d& dp) const;
/// Give the point corresponding to the offset \p o.
- point1d point_at_index(unsigned i) const;
+ point1d point_at_offset(unsigned i) const;
/// Give a hook to the value buffer.
const T* buffer() const;
@@ -450,10 +450,10 @@ namespace mln
template <typename T>
inline
const T&
- image1d<T>::at_(def::coord index) const
+ image1d<T>::at_(def::coord offset) const
{
- mln_precondition(this->has(point1d(index)));
- return this->data_->array_[index];
+ mln_precondition(this->has(point1d(offset)));
+ return this->data_->array_[offset];
}
template <typename T>
@@ -468,10 +468,10 @@ namespace mln
template <typename T>
inline
T&
- image1d<T>::at_(def::coord index)
+ image1d<T>::at_(def::coord offset)
{
- mln_precondition(this->has(point1d(index)));
- return this->data_->array_[index];
+ mln_precondition(this->has(point1d(offset)));
+ return this->data_->array_[offset];
}
@@ -514,7 +514,7 @@ namespace mln
template <typename T>
inline
int
- image1d<T>::delta_index(const dpoint1d& dp) const
+ image1d<T>::delta_offset(const dpoint1d& dp) const
{
mln_precondition(this->is_valid());
int o = dp[0];
@@ -524,7 +524,7 @@ namespace mln
template <typename T>
inline
point1d
- image1d<T>::point_at_index(unsigned i) const
+ image1d<T>::point_at_offset(unsigned i) const
{
mln_precondition(i < nelements());
def::coord ind = static_cast<def::coord>(i +
this->data_->vb_.min_ind());
diff --git a/milena/mln/core/image/image2d.hh b/milena/mln/core/image/image2d.hh
index bc49561..213c7c9 100644
--- a/milena/mln/core/image/image2d.hh
+++ b/milena/mln/core/image/image2d.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011, 2012 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -31,9 +31,6 @@
/// Definition of the basic mln::image2d class.
///
/// \todo Re-activate include at EOF when make::image2d is up again.
-///
-/// \todo Rename delta_index and point_at_index as offset and
-/// point_at_offset.
# include <mln/core/internal/image_primary.hh>
# include <mln/core/internal/fixme.hh>
@@ -226,8 +223,8 @@ namespace mln
// As a fastest image:
// -------------------
- // Give the index of a point.
- using super_::index_of_point;
+ // Give the offset of a point.
+ using super_::offset_of_point;
/// Give the border thickness.
unsigned border() const;
@@ -235,17 +232,17 @@ namespace mln
/// Give the number of elements (points including border ones).
unsigned nelements() const;
- /// Read-only access to the image value located at index \p i.
+ /// Read-only access to the image value located at offset \p i.
const T& element(unsigned i) const;
- /// Read-write access to the image value located at index \p i.
+ /// Read-write access to the image value located at offset \p i.
T& element(unsigned i);
- /// Give the delta-index corresponding to the delta-point \p dp.
- int delta_index(const dpoint2d& dp) const;
+ /// Give the delta-offset corresponding to the delta-point \p dp.
+ int delta_offset(const dpoint2d& dp) const;
- /// Give the point corresponding to the index \p i.
- point2d point_at_index(unsigned i) const;
+ /// Give the point corresponding to the offset \p i.
+ point2d point_at_offset(unsigned i) const;
/// Give a hook to the value buffer.
const T* buffer() const;
@@ -571,7 +568,7 @@ namespace mln
template <typename T>
inline
int
- image2d<T>::delta_index(const dpoint2d& dp) const
+ image2d<T>::delta_offset(const dpoint2d& dp) const
{
mln_precondition(this->is_valid());
int o = dp[0] * this->data_->vb_.len(1) + dp[1];
@@ -581,7 +578,7 @@ namespace mln
template <typename T>
inline
point2d
- image2d<T>::point_at_index(unsigned i) const
+ image2d<T>::point_at_offset(unsigned i) const
{
mln_precondition(i < nelements());
def::coord
diff --git a/milena/mln/core/image/image3d.hh b/milena/mln/core/image/image3d.hh
index 59d6908..9a4fabf 100644
--- a/milena/mln/core/image/image3d.hh
+++ b/milena/mln/core/image/image3d.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008, 2009, 2010, 2011 EPITA Research and
+// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 EPITA Research and
// Development Laboratory (LRDE)
//
// This file is part of Olena.
@@ -163,7 +163,7 @@ namespace mln
/// 3).
image3d(const box3d& b, unsigned bdr = border::thickness);
- /// Constructor with the numbers of indexes and the
+ /// Constructor with the numbers of offsets and the
/// border thickness.
image3d(int nslis, int nrows, int ncols, unsigned bdr = border::thickness);
@@ -196,10 +196,10 @@ namespace mln
/// Read-write access to the image value located at point \p p.
T& operator()(const point3d& p);
- /// Read-only access to the image value located at index \p i.
+ /// Read-only access to the image value located at offset \p i.
const T& element(unsigned i) const;
- /// Read-write access to the image value located at index \p i.
+ /// Read-write access to the image value located at offset \p i.
T& element(unsigned i);
/// Read-only access to the image value located at (\p sli, \p
@@ -224,10 +224,10 @@ namespace mln
/// Fast Image method
/// Give the offset corresponding to the delta-point \p dp.
- int delta_index(const dpoint3d& dp) const;
+ int delta_offset(const dpoint3d& dp) const;
/// Give the point corresponding to the offset \p o.
- point3d point_at_index(unsigned o) const;
+ point3d point_at_offset(unsigned o) const;
/// Give a hook to the value buffer.
const T* buffer() const;
@@ -569,7 +569,7 @@ namespace mln
template <typename T>
inline
int
- image3d<T>::delta_index(const dpoint3d& dp) const
+ image3d<T>::delta_offset(const dpoint3d& dp) const
{
mln_precondition(this->is_valid());
int o = (dp[0] * this->data_->vb_.len(1)
@@ -580,7 +580,7 @@ namespace mln
template <typename T>
inline
point3d
- image3d<T>::point_at_index(unsigned o) const
+ image3d<T>::point_at_offset(unsigned o) const
{
mln_precondition(o < nelements());
def::coord
diff --git a/milena/mln/core/internal/check/image_fastest.hh
b/milena/mln/core/internal/check/image_fastest.hh
index 9aa7c51..95ab8a9 100644
--- a/milena/mln/core/internal/check/image_fastest.hh
+++ b/milena/mln/core/internal/check/image_fastest.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011, 2012 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -32,7 +32,7 @@
/// \brief Class that statically checks the interface of fastest
/// images.
///
-/// \todo Check and convert p in index_of_point towards E::psite.
+/// \todo Check and convert p in offset_of_point towards E::psite.
# include <mln/metal/bool.hh>
# include <mln/core/macros.hh>
@@ -62,11 +62,11 @@ namespace mln
/// \warning This method is final.
///
/// \pre The image has to be initialized and to own the point \p p.
- /// \post p == point_at_index(result)
+ /// \post p == point_at_offset(result)
///
template <typename P>
unsigned
- index_of_point(const P& p) const;
+ offset_of_point(const P& p) const;
protected:
image_fastest_();
@@ -94,9 +94,9 @@ namespace mln
typedef mln_fwd_pixter(E) fwd_pixter;
typedef mln_bkd_pixter(E) bkd_pixter;
- int (E::*m1)(const dpsite&) const = & E::delta_index;
+ int (E::*m1)(const dpsite&) const = & E::delta_offset;
(void) m1;
- site (E::*m2)(unsigned) const = & E::point_at_index;
+ site (E::*m2)(unsigned) const = & E::point_at_offset;
(void) m2;
unsigned (E::*m3)() const = & E::border;
(void) m3;
@@ -120,7 +120,7 @@ namespace mln
(void) m8;
# if (defined(__GNUC__) && __GNUC__ >= 3) &&
!defined(__INTEL_COMPILER)
- unsigned (E::*m9)(const psite& p) const = & E::index_of_point;
+ unsigned (E::*m9)(const psite& p) const = & E::offset_of_point;
(void) m9;
# endif
@@ -131,14 +131,14 @@ namespace mln
template <typename P>
inline
unsigned
- image_fastest_<E,B>::index_of_point(const P& p) const
+ image_fastest_<E,B>::offset_of_point(const P& p) const
{
const E* this_ = & internal::force_exact<E>(*this);
mln_precondition(this_->is_valid());
mln_precondition(this_->has(p));
unsigned i = & this_->operator()(p) - this_->buffer();
- mln_postcondition(p == this_->point_at_index(i));
+ mln_postcondition(p == this_->point_at_offset(i));
return i;
}
diff --git a/milena/mln/core/internal/image_identity.hh
b/milena/mln/core/internal/image_identity.hh
index 239ffbf..25e8b3a 100644
--- a/milena/mln/core/internal/image_identity.hh
+++ b/milena/mln/core/internal/image_identity.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -68,14 +69,14 @@ namespace mln
public:
- int delta_index(const mln_deduce(I, psite, delta)& dp) const
+ int delta_offset(const mln_deduce(I, psite, delta)& dp) const
{
- return del_().delta_index(dp);
+ return del_().delta_offset(dp);
}
- mln_site(I) point_at_index(unsigned i) const
+ mln_site(I) point_at_offset(unsigned i) const
{
- return del_().point_at_index(i);
+ return del_().point_at_offset(i);
}
unsigned border() const
diff --git a/milena/mln/core/internal/pixel_impl.hh
b/milena/mln/core/internal/pixel_impl.hh
index d0549b1..a07f677 100644
--- a/milena/mln/core/internal/pixel_impl.hh
+++ b/milena/mln/core/internal/pixel_impl.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2010, 2012 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -95,7 +95,7 @@ namespace mln
operator util::pix<unconst_image_t>() const
{
- util::pix<unconst_image_t> tmp(image_, image_.point_at_index(offset()));
+ util::pix<unconst_image_t> tmp(image_, image_.point_at_offset(offset()));
return tmp;
}
diff --git a/milena/mln/core/pixel.hh b/milena/mln/core/pixel.hh
index be6cea4..1ae5781 100644
--- a/milena/mln/core/pixel.hh
+++ b/milena/mln/core/pixel.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -103,7 +104,7 @@ namespace mln
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);
+ mln_psite(I) p = this->image_.point_at_offset(o);
return this->image_.has(p);
}
diff --git a/milena/mln/data/fill_with_value.spe.hh
b/milena/mln/data/fill_with_value.spe.hh
index 3f1478a..d7c9557 100644
--- a/milena/mln/data/fill_with_value.spe.hh
+++ b/milena/mln/data/fill_with_value.spe.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2012 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -88,7 +89,7 @@ namespace mln
trait::image::value_access::direct))::check();
mln_value(I) v = static_cast<mln_value(I)>(val);
- data::memset_(ima, ima.point_at_index(0), v, opt::nelements(ima));
+ data::memset_(ima, ima.point_at_offset(0), v, opt::nelements(ima));
trace::exiting("data::impl::fill_with_value_one_block");
}
diff --git a/milena/mln/data/memset_.hh b/milena/mln/data/memset_.hh
index 42b1412..a7484b5 100644
--- a/milena/mln/data/memset_.hh
+++ b/milena/mln/data/memset_.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -160,7 +160,7 @@ namespace mln
mln_precondition(input.is_valid());
mln_precondition(input.has(p));
- mln_precondition(input.index_of_point(p) + n <= opt::nelements(input));
+ mln_precondition(input.offset_of_point(p) + n <= opt::nelements(input));
pixel<I> pix(input, p);
impl::memset__(pix, v, n);
diff --git a/milena/mln/io/magick/load.hh b/milena/mln/io/magick/load.hh
index 2acd668..33a42f0 100644
--- a/milena/mln/io/magick/load.hh
+++ b/milena/mln/io/magick/load.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2012 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -166,7 +166,7 @@ namespace mln
Magick::PixelPacket* pixels = view.get(0, 0, ima.ncols(), ima.nrows());
mln_value(I) *ptr_ima = &ima(ima.domain().pmin());
- unsigned row_offset = ima.delta_index(dpoint2d(+1, - ncols));
+ unsigned row_offset = ima.delta_offset(dpoint2d(+1, - ncols));
for (def::coord row = minrow; row <= maxrow;
++row, ptr_ima += row_offset)
diff --git a/milena/mln/io/magick/save.hh b/milena/mln/io/magick/save.hh
index 80b20df..252ace8 100644
--- a/milena/mln/io/magick/save.hh
+++ b/milena/mln/io/magick/save.hh
@@ -239,7 +239,7 @@ namespace mln
Magick::PixelPacket* pixels = view.get(0, 0, ncols, nrows);
const mln_value(I) *ptr_ima = &ima(ima.domain().pmin());
- unsigned row_offset = ima.delta_index(dpoint2d(+1, - ncols));
+ unsigned row_offset = ima.delta_offset(dpoint2d(+1, - ncols));
for (def::coord row = minrow; row <= maxrow;
++row, ptr_ima += row_offset)
@@ -302,8 +302,8 @@ namespace mln
const mln_value(I) *ptr_ima = &ima(ima.domain().pmin());
const mln_value(J) *ptr_opacity_mask =
&opacity_mask(opacity_mask.domain().pmin());
- unsigned row_offset = ima.delta_index(dpoint2d(+1, - ncols));
- unsigned opacity_row_offset = opacity_mask.delta_index(dpoint2d(+1, - ncols));
+ unsigned row_offset = ima.delta_offset(dpoint2d(+1, - ncols));
+ unsigned opacity_row_offset = opacity_mask.delta_offset(dpoint2d(+1, - ncols));
for (def::coord row = minrow; row <= maxrow;
++row, ptr_ima += row_offset,
diff --git a/milena/mln/labeling/value_and_compute.hh
b/milena/mln/labeling/value_and_compute.hh
index e82d8f4..e741790 100644
--- a/milena/mln/labeling/value_and_compute.hh
+++ b/milena/mln/labeling/value_and_compute.hh
@@ -175,7 +175,7 @@ namespace mln
inline
void process__(const mln_psite(I)&, unsigned p, const L& l)
{
- accus_[l].take(input.point_at_index(p));
+ accus_[l].take(input.point_at_offset(p));
}
diff --git a/milena/mln/linear/gaussian_directional_2d.hh
b/milena/mln/linear/gaussian_directional_2d.hh
index bda0eda..eb8bc9b 100644
--- a/milena/mln/linear/gaussian_directional_2d.hh
+++ b/milena/mln/linear/gaussian_directional_2d.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2012 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -350,9 +351,9 @@ namespace mln
std::vector<double> tmp1(len);
std::vector<double> tmp2(len);
- unsigned delta_offset = ima.delta_index(d);
+ unsigned delta_offset = ima.delta_offset(d);
unsigned
- o_start = ima.index_of_point(start),
+ o_start = ima.offset_of_point(start),
o_start_d = o_start + delta_offset,
o_start_dd = o_start + 2 * delta_offset,
o_start_ddd = o_start + 3 * delta_offset;
@@ -407,7 +408,7 @@ namespace mln
// extension::fill(ima, bdr);
unsigned
- o_finish = ima.index_of_point(finish),
+ o_finish = ima.offset_of_point(finish),
o_finish_d = o_finish - delta_offset,
o_finish_dd = o_finish - 2 * delta_offset;
diff --git a/milena/mln/subsampling/antialiased.hh
b/milena/mln/subsampling/antialiased.hh
index 66bdd33..09caeb7 100644
--- a/milena/mln/subsampling/antialiased.hh
+++ b/milena/mln/subsampling/antialiased.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2012 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -187,7 +187,7 @@ namespace mln
const unsigned
factor_2 = factor * factor,
factor_round = factor_2 / 2;
- unsigned offset = input.delta_index(point2d(factor,0) - point2d(0,factor*n));
+ unsigned offset = input.delta_offset(point2d(factor,0) - point2d(0,factor*n));
for_all(s)
{
@@ -267,7 +267,7 @@ namespace mln
const unsigned
factor_2 = factor * factor,
factor_round = factor_2 / 2;
- unsigned offset = input.delta_index(point2d(factor,0) - point2d(0,factor*n));
+ unsigned offset = input.delta_offset(point2d(factor,0) - point2d(0,factor*n));
for_all(s)
{
diff --git a/milena/mln/trait/image/props.hh b/milena/mln/trait/image/props.hh
index c7b7746..2726814 100644
--- a/milena/mln/trait/image/props.hh
+++ b/milena/mln/trait/image/props.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -152,10 +153,10 @@
// => .value_() : rvalue, returns the flat value
// one_block
// => .nelements_() : unsigned, number of buffer elements
-// => .point_at_index_(unsigned index) : point,
-// point corresponding to the index index
-// => .delta_index_(deltapoint dp) : unsigned
-// Return the delta index associated to dp
+// => .point_at_offset_(unsigned offset) : point,
+// point corresponding to the offset offset
+// => .delta_offset_(deltapoint dp) : unsigned
+// Return the delta offset associated to dp
// one_block and value_access::direct
// => element_(unsigned index) : rvalue, returns the element at index.
// => element_(unsigned index) : lvalue, returns the element at index.
diff --git a/milena/mln/transform/internal/closest_point_functor.hh
b/milena/mln/transform/internal/closest_point_functor.hh
index 5302502..e5a18cf 100644
--- a/milena/mln/transform/internal/closest_point_functor.hh
+++ b/milena/mln/transform/internal/closest_point_functor.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2012 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -273,7 +274,7 @@ namespace mln
inline
void closest_point_functor_with_sites<I>::init_p_(unsigned p)
{
- cp_ima.element(p) = cp_ima.point_at_index(p);
+ cp_ima.element(p) = cp_ima.point_at_offset(p);
}
template <typename I>
diff --git a/milena/mln/world/binary_2d/subsample.hh
b/milena/mln/world/binary_2d/subsample.hh
index 0d8c557..70c9c9e 100644
--- a/milena/mln/world/binary_2d/subsample.hh
+++ b/milena/mln/world/binary_2d/subsample.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2011 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2011, 2012 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -94,7 +94,7 @@ namespace mln
image2d<int_u8> output(box<point2d>(pmin, pmax));
dpoint2d dp_row(1, 0);
- const unsigned delta_row = input.delta_index(dp_row);
+ const unsigned delta_row = input.delta_offset(dp_row);
unsigned count = 0;
for (unsigned row = 0; row < nrows; ++row)
--
1.7.2.5