A generic backward iterator on the pixels of a dpoint-based window or neighborhood. More...
#include <dpoints_pixter.hh>
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. |
A generic backward iterator on the pixels of a dpoint-based window or neighborhood.
Parameter I
is the image type.
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.
typedef internal::pixel_impl_< I, dpoints_bkd_pixter<I> > mln::dpoints_bkd_pixter< I >::super_ [private] |
Reimplemented from mln::internal::pixel_impl_< I, dpoints_bkd_pixter< I > >.
typedef I ::value mln::internal::pixel_impl_< I, dpoints_bkd_pixter< I > >::value [inherited] |
Image value type.
mln::dpoints_bkd_pixter< I >::dpoints_bkd_pixter | ( | I & | image, | |
const Dps & | dps, | |||
const Pref & | p_ref | |||
) | [inline] |
Constructor (using an image).
[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_.
mln::dpoints_bkd_pixter< I >::dpoints_bkd_pixter | ( | const Generalized_Pixel< Pref > & | pxl_ref, | |
const Dps & | dps | |||
) | [inline] |
Constructor (using a generalized pixel).
[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_.
value** mln::internal::pixel_impl_< I, dpoints_bkd_pixter< I > >::address_ | ( | ) | const [inherited] |
Address of the current iterator value/pixel.
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.
void mln::dpoints_bkd_pixter< I >::init_ | ( | const Dps & | dps | ) | [inline, private] |
References mln::dpoints_bkd_pixter< I >::invalidate(), and mln::dpoints_bkd_pixter< I >::offset_.
Referenced by mln::dpoints_bkd_pixter< I >::dpoints_bkd_pixter().
void mln::dpoints_bkd_pixter< I >::invalidate | ( | ) | [inline] |
Invalidate the iterator.
References mln::dpoints_bkd_pixter< I >::i_, and mln::dpoints_bkd_pixter< I >::offset_.
Referenced by mln::dpoints_bkd_pixter< I >::init_().
bool mln::dpoints_bkd_pixter< I >::is_valid | ( | ) | const [inline] |
Test the iterator validity.
References mln::dpoints_bkd_pixter< I >::i_, and mln::dpoints_bkd_pixter< I >::offset_.
Referenced by mln::dpoints_bkd_pixter< I >::next_(), and mln::dpoints_bkd_pixter< I >::update().
void mln::Iterator< dpoints_bkd_pixter< I > >::next | ( | ) | [inherited] |
Go to the next element.
void mln::dpoints_bkd_pixter< I >::next_ | ( | ) | [inline] |
Go to the next pixel.
References mln::dpoints_bkd_pixter< I >::i_, and mln::dpoints_bkd_pixter< I >::is_valid().
mln::Generalized_Pixel< dpoints_bkd_pixter< I > >::operator unsigned | ( | ) | const [inline, inherited] |
void mln::dpoints_bkd_pixter< I >::start | ( | ) | [inline] |
Manipulation.
Start an iteration.
References mln::dpoints_bkd_pixter< I >::i_, mln::dpoints_bkd_pixter< I >::offset_, and mln::dpoints_bkd_pixter< I >::update().
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.
std::vector<int>::const_reverse_iterator mln::dpoints_bkd_pixter< I >::i_ [private] |
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().
const I ::psite* mln::dpoints_bkd_pixter< I >::p_ref_ [private] |
Reference pixel / point in 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().
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().