milena r1175: Clean interpolated image class

URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena ChangeLog: 2007-09-25 Matthieu Garrigues <garrigues@lrde.epita.fr> Clean interpolated image class. * mln/core/interpolated.hh: Remove useless methods because of inherited methods from identity morpher. --- interpolated.hh | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) Index: trunk/milena/mln/core/interpolated.hh =================================================================== --- trunk/milena/mln/core/interpolated.hh (revision 1174) +++ trunk/milena/mln/core/interpolated.hh (revision 1175) @@ -64,6 +64,9 @@ template <typename I> struct interpolated : public mln::internal::image_identity_< I, mln_pset(I), interpolated<I> > { + + typedef mln::internal::image_identity_< I, mln_pset(I), interpolated<I> > super_; + /// Point_Site associated type. typedef mln_psite(I) psite; @@ -93,17 +96,14 @@ bool has_data() const; /// Test if a pixel value is accessible at \p p. - bool owns_(const psite& p) const; + using super_::owns_; /// Test if a pixel value is accessible at \p v. bool owns_(const mln::metal::vec<I::point::dim, float>& v) const; /// Read-only access of pixel value at point site \p p. - mln_rvalue(I) operator()(const psite& p) const; - /// Mutable access is only OK for reading (not writing). - mln_lvalue(I) operator()(const psite& p); - + using super_::operator(); mln_value(I) operator()(const mln::metal::vec<I::point::dim, float>& v) const; @@ -149,12 +149,6 @@ } template <typename I> - bool interpolated<I>::owns_(const psite& p) const - { - return this->data_->ima_.owns_(p); - } - - template <typename I> bool interpolated<I>::owns_(const mln::metal::vec<I::point::dim, float>& v) const { mln_point(I) p; @@ -164,21 +158,6 @@ } template <typename I> - mln_rvalue(I) - interpolated<I>::operator()(const psite& p) const - { - mln_precondition(this->data_->ima_.owns_(p)); - return this->data_->ima_(p); - } - - template <typename I> - mln_lvalue(I) - interpolated<I>::operator()(const psite& p) - { - return this->data_->ima_(p); - } - - template <typename I> mln_value(I) interpolated<I>::operator()(const mln::metal::vec<I::point::dim, float>& v) const { @@ -189,6 +168,8 @@ return this->data_->ima_(p); } + // FIXME : Should we remove this method? (and inherit it from + // identity morpher) template <typename I> const mln::value::set<mln_value(I) >& interpolated<I>::values() const
participants (1)
-
Matthieu Garrigues