00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef OLENA_TOPO_INTER_PIXEL_BKD_DIR_ITERHH
00030 # define OLENA_TOPO_INTER_PIXEL_BKD_DIR_ITER_HH
00031
00032 # include <oln/core/abstract/iter.hh>
00033 # include <oln/topo/inter-pixel/internal/dir-iter.hh>
00034
00035 namespace oln {
00036
00037 namespace topo {
00038
00039 namespace inter_pixel {
00040 template<unsigned Dim, class Exact = mlc::final>
00041 class bkd_dir_iter;
00042 }
00043
00044 }
00045
00046 template<unsigned Dim, class Exact>
00047 struct iter_traits<topo::inter_pixel::bkd_dir_iter<Dim, Exact> >
00048 : public iter_traits<topo::inter_pixel::internal::dir_iter_<Dim, typename
00049 mlc::exact_vt<topo::inter_pixel::bkd_dir_iter<Dim, Exact>, Exact>::ret> >
00050 {};
00051
00052 namespace topo {
00053
00054 namespace inter_pixel {
00056 template<unsigned Dim, class Exact>
00057 class bkd_dir_iter
00058 : public internal::dir_iter_<Dim, typename mlc::exact_vt<bkd_dir_iter<Dim, Exact>, Exact>::ret>
00059 {
00060 private:
00061 typedef internal::dir_iter_<Dim, typename mlc::exact_vt<bkd_dir_iter<Dim, Exact>, Exact>::ret> super;
00062 typedef typename super::dir_type dir_type;
00063
00064 public:
00065 bkd_dir_iter() : super(), begin_(internal::dir_traits<Dim>::last()) {}
00066 bkd_dir_iter(dir_type i) : super(i), begin_(i) {}
00067
00072 template<class U>
00073 U
00074 operator=(U u) { return super::operator=(u); }
00075
00077 dir_type
00078 next()
00079 {
00080 return internal::dir_traits<Dim>::prev(this->cur_);
00081 }
00082
00084 dir_type
00085 begin()
00086 {
00087 return begin_;
00088 }
00089
00090 private:
00091 dir_type begin_;
00092 };
00093
00095 # define oln_bkd_dir_iter_type(ImgType) \
00096 oln::topo::inter_pixel::bkd_dir_iter< ImgType::dim >
00097
00098 }
00099
00100 }
00101
00102 }
00103
00104 #endif // ! OLENA_TOPO_INTER_PIXEL_BKD_DIR_ITER_HH