[PATCH 5/7] Rename 2D inter-pixel neighborhoods.

* mln/world/inter_pixel/neighb2d.hh (mln::world::inter_pixel::c2c) (mln::world::inter_pixel::c2e) (mln::world::inter_pixel::e2c): Rename as... (mln::world::inter_pixel::v2v) (mln::world::inter_pixel::v2e) (mln::world::inter_pixel::e2v): ...this. * mln/world/inter_pixel/dim2/make_edge_image.hh (mln::world::inter_pixel::dim2::make_edge_image): Adjust. --- milena/ChangeLog | 16 ++++++++++ .../mln/world/inter_pixel/dim2/make_edge_image.hh | 2 +- milena/mln/world/inter_pixel/neighb2d.hh | 31 ++++++++++--------- 3 files changed, 33 insertions(+), 16 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 1d88171..c3cf6b5 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,3 +1,19 @@ +2009-09-24 Roland Levillain <roland@lrde.epita.fr> + + Rename 2D inter-pixel neighborhoods. + + * mln/world/inter_pixel/neighb2d.hh + (mln::world::inter_pixel::c2c) + (mln::world::inter_pixel::c2e) + (mln::world::inter_pixel::e2c): + Rename as... + (mln::world::inter_pixel::v2v) + (mln::world::inter_pixel::v2e) + (mln::world::inter_pixel::e2v): + ...this. + * mln/world/inter_pixel/dim2/make_edge_image.hh + (mln::world::inter_pixel::dim2::make_edge_image): Adjust. + 2009-09-23 Roland Levillain <roland@lrde.epita.fr> Complete mln/world/inter_pixel/neighb2d.hh. diff --git a/milena/mln/world/inter_pixel/dim2/make_edge_image.hh b/milena/mln/world/inter_pixel/dim2/make_edge_image.hh index 21e6bf8..8012b60 100644 --- a/milena/mln/world/inter_pixel/dim2/make_edge_image.hh +++ b/milena/mln/world/inter_pixel/dim2/make_edge_image.hh @@ -68,7 +68,7 @@ namespace mln edges_ext_t edges_ext = extend(edges, input); mln_piter(edges_ext_t) p(edges_ext.domain()); - dbl_neighb2d nbh = e2c(); + dbl_neighb2d nbh = e2v(); mln_niter(dbl_neighb2d) n(nbh, p); mln_value(I) vs[2]; diff --git a/milena/mln/world/inter_pixel/neighb2d.hh b/milena/mln/world/inter_pixel/neighb2d.hh index 048eb9b..d262c3e 100644 --- a/milena/mln/world/inter_pixel/neighb2d.hh +++ b/milena/mln/world/inter_pixel/neighb2d.hh @@ -27,8 +27,7 @@ # define MLN_WORLD_INTER_PIXEL_NEIGHB2D_HH /// \file -/// -/// \brief Common neighborhood on inter-pixel images. +/// \brief Common neighborhoods on inter-pixel images. # include <mln/core/alias/neighb2d.hh> # include <mln/make/double_neighb2d.hh> @@ -47,22 +46,24 @@ namespace mln /// Double neighborhood used for inter-pixel images. typedef neighb< win::multiple<window2d, dim2::is_row_odd> > dbl_neighb2d; - // Pixel to neighboring pixels. - const neighb2d& c2c(); - // Pixel to neighboring edges. - const neighb2d& c2e(); + /// Vertex (pixel) to neighboring vertices (pixels). + const neighb2d& v2v(); - // Edge to neighborhood pixels. - const dbl_neighb2d& e2c(); + /// Vertex (pixel) to neighboring edges (inter-pixels). + const neighb2d& v2e(); - // Edge to neighboring edges. + /// Edge (inter-pixel) to neighborhood vertices (pixels). + const dbl_neighb2d& e2v(); + + /// Edge (inter-pixel) to neighboring edges (inter-pixels). const dbl_neighb2d& e2e(); + # ifndef MLN_INCLUDE_ONLY - const neighb2d& c2c() + const neighb2d& v2v() { static neighb2d it; if (it.size() == 0) @@ -77,23 +78,23 @@ namespace mln return it; } - const neighb2d& c2e() + const neighb2d& v2e() { return c4(); } - const dbl_neighb2d& e2c() + const dbl_neighb2d& e2v() { - static const bool e2c_h[] = { 0, 1, 0, + static const bool e2v_h[] = { 0, 1, 0, 0, 0, 0, 0, 1, 0 }; - static const bool e2c_v[] = { 0, 0, 0, + static const bool e2v_v[] = { 0, 0, 0, 1, 0, 1, 0, 0, 0 }; static dbl_neighb2d nbh = - make::double_neighb2d(dim2::is_row_odd(), e2c_h, e2c_v); + make::double_neighb2d(dim2::is_row_odd(), e2v_h, e2v_v); return nbh; } -- 1.6.4.4
participants (1)
-
Roland Levillain