Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes

mln::dpoints_bkd_pixter< I > Class Template Reference

A generic backward iterator on the pixels of a dpoint-based window or neighborhood. More...

#include <dpoints_pixter.hh>

Inheritance diagram for mln::dpoints_bkd_pixter< I >:
Inheritance graph

List of all members.

Public Types

typedef Object< void > category
typedef dpoints_bkd_pixter< I > exact_t
typedef I image
 Image type.
typedef I::lvalue lvalue
 Image lvalue type.
typedef I::rvalue rvalue
 Image rvalue type.
typedef I::value value
 Image value type.

Public Member Functions

value ** address_ () const
 Address of the current iterator value/pixel.
const I::value & center_val () const
 The value around which this iterator moves.
template<typename Dps , typename Pref >
 dpoints_bkd_pixter (const Generalized_Pixel< Pref > &pxl_ref, const Dps &dps)
 Constructor (using a generalized pixel).
template<typename Dps , typename Pref >
 dpoints_bkd_pixter (I &image, const Dps &dps, const Pref &p_ref)
 Constructor (using an image).
I & ima () const
 Give the pixel image.
void next ()
 Go to the next element.
 operator unsigned () const
rvalue val () const
 Get the pixel iterator value.
lvalue val ()
 pixel iterator value.

void start ()
 Manipulation.
void next_ ()
 Go to the next pixel.
void invalidate ()
 Invalidate the iterator.
bool is_valid () const
 Test the iterator validity.
void update ()
 Force this iterator to update its location to take into account that its center point may have moved.

Private Types

typedef internal::pixel_impl_
< I, dpoints_bkd_pixter< I > > 
super_

Private Member Functions

template<typename Dps >
void init_ (const Dps &dps)

Private Attributes

std::vector< int >
::const_reverse_iterator 
i_
 Current offset.
std::vector< int > offset_
 Offset of each delta-point.

I::qlf_value ** value_ref_
 Reference value or pixel.
const I::psite * p_ref_
 Reference pixel / point in the image.

Detailed Description

template<typename I>
class mln::dpoints_bkd_pixter< I >

A generic backward iterator on the pixels of a dpoint-based window or neighborhood.

Parameter I is the image type.


Member Typedef Documentation

typedef Object<void> mln::Object< dpoints_bkd_pixter< I > >::category [inherited]
typedef dpoints_bkd_pixter< I > mln::Object< dpoints_bkd_pixter< I > >::exact_t [inherited]
typedef I mln::internal::pixel_impl_< I, dpoints_bkd_pixter< I > >::image [inherited]

Image type.

typedef I ::lvalue mln::internal::pixel_impl_< I, dpoints_bkd_pixter< I > >::lvalue [inherited]

Image lvalue type.

typedef I ::rvalue mln::internal::pixel_impl_< I, dpoints_bkd_pixter< I > >::rvalue [inherited]

Image rvalue type.

template<typename I >
typedef internal::pixel_impl_< I, dpoints_bkd_pixter<I> > mln::dpoints_bkd_pixter< I >::super_ [private]
typedef I ::value mln::internal::pixel_impl_< I, dpoints_bkd_pixter< I > >::value [inherited]

Image value type.


Constructor & Destructor Documentation

template<typename I >
template<typename Dps , typename Pref >
mln::dpoints_bkd_pixter< I >::dpoints_bkd_pixter ( I &  image,
const Dps &  dps,
const Pref &  p_ref 
) [inline]

Constructor (using an image).

Parameters:
[in] image The image to iterate over.
[in] dps An object (neighborhood or window) that can provide a set of delta-points.
[in] p_ref Center (resp. reference) point of the neighborhood (resp. window).

References mln::dpoints_bkd_pixter< I >::init_(), mln::dpoints_bkd_pixter< I >::p_ref_, and mln::dpoints_bkd_pixter< I >::value_ref_.

template<typename I >
template<typename Dps , typename Pref >
mln::dpoints_bkd_pixter< I >::dpoints_bkd_pixter ( const Generalized_Pixel< Pref > &  pxl_ref,
const Dps &  dps 
) [inline]

Constructor (using a generalized pixel).

Parameters:
[in] pxl_ref Center (generalized) pixel to iterate around.
[in] dps An object (neighborhood or window) that can provide a set of delta-points.

References mln::dpoints_bkd_pixter< I >::init_(), mln::dpoints_bkd_pixter< I >::p_ref_, and mln::dpoints_bkd_pixter< I >::value_ref_.


Member Function Documentation

value** mln::internal::pixel_impl_< I, dpoints_bkd_pixter< I > >::address_ (  )  const [inherited]

Address of the current iterator value/pixel.

template<typename I >
const I::value & mln::dpoints_bkd_pixter< I >::center_val (  )  const [inline]

The value around which this iterator moves.

References mln::dpoints_bkd_pixter< I >::p_ref_, and mln::dpoints_bkd_pixter< I >::value_ref_.

I& mln::internal::pixel_impl_< I, dpoints_bkd_pixter< I > >::ima (  )  const [inherited]

Give the pixel image.

template<typename I >
template<typename Dps >
void mln::dpoints_bkd_pixter< I >::init_ ( const Dps &  dps  )  [inline, private]
template<typename I >
void mln::dpoints_bkd_pixter< I >::invalidate (  )  [inline]
template<typename I >
bool mln::dpoints_bkd_pixter< I >::is_valid (  )  const [inline]
void mln::Iterator< dpoints_bkd_pixter< I > >::next (  )  [inherited]

Go to the next element.

Warning:
This is a final method; iterator classes should not re-defined this method. The actual "next" operation has to be defined through the next_ method.
Precondition:
The iterator is valid.
template<typename I >
void mln::dpoints_bkd_pixter< I >::next_ (  )  [inline]
mln::Generalized_Pixel< dpoints_bkd_pixter< I > >::operator unsigned (  )  const [inline, inherited]
template<typename I >
void mln::dpoints_bkd_pixter< I >::start (  )  [inline]
template<typename I >
void mln::dpoints_bkd_pixter< I >::update (  )  [inline]

Force this iterator to update its location to take into account that its center point may have moved.

References mln::dpoints_bkd_pixter< I >::i_, mln::dpoints_bkd_pixter< I >::is_valid(), mln::dpoints_bkd_pixter< I >::p_ref_, and mln::dpoints_bkd_pixter< I >::value_ref_.

Referenced by mln::dpoints_bkd_pixter< I >::start().

rvalue mln::internal::pixel_impl_< I, dpoints_bkd_pixter< I > >::val (  )  const [inherited]

Get the pixel iterator value.

lvalue mln::internal::pixel_impl_< I, dpoints_bkd_pixter< I > >::val (  )  [inherited]

pixel iterator value.


Member Data Documentation

template<typename I >
std::vector<int>::const_reverse_iterator mln::dpoints_bkd_pixter< I >::i_ [private]
template<typename I >
std::vector<int> mln::dpoints_bkd_pixter< I >::offset_ [private]

Offset of each delta-point.

offset_[dps.size() - 1] is absolute, while other offsets are relative (i.e., offset_[i] is the memory difference to go from pixel i+1 to pixel i.

Referenced by mln::dpoints_bkd_pixter< I >::init_(), mln::dpoints_bkd_pixter< I >::invalidate(), mln::dpoints_bkd_pixter< I >::is_valid(), and mln::dpoints_bkd_pixter< I >::start().

template<typename I >
const I ::psite* mln::dpoints_bkd_pixter< I >::p_ref_ [private]
template<typename I >
I ::qlf_value** mln::dpoints_bkd_pixter< I >::value_ref_ [private]

Reference value or pixel.

One and only one of these pointers should be non-null.

Reference value the image

Referenced by mln::dpoints_bkd_pixter< I >::center_val(), mln::dpoints_bkd_pixter< I >::dpoints_bkd_pixter(), and mln::dpoints_bkd_pixter< I >::update().