* mln/core/image/complex_neighborhoods.hh
(mln::complex_lower_dim_connected_n_face_neighborhood<D, G>):
(mln::complex_higher_dim_connected_n_face_neighborhood<D, G>):
New neighborhoods.
Exercise them...
* tests/core/image/complex_image.cc: ...here.
---
milena/ChangeLog | 11 +++++++++
milena/mln/core/image/complex_neighborhoods.hh | 28 ++++++++++++++++++++++++
milena/tests/core/image/complex_image.cc | 6 +++++
3 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 2959330..185b935 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,16 @@
2008-10-18 Roland Levillain <roland(a)lrde.epita.fr>
+ Add neighborhoods based on lower/higher-dimension connected n-faces.
+
+ * mln/core/image/complex_neighborhoods.hh
+ (mln::complex_lower_dim_connected_n_face_neighborhood<D, G>):
+ (mln::complex_higher_dim_connected_n_face_neighborhood<D, G>):
+ New neighborhoods.
+ Exercise them...
+ * tests/core/image/complex_image.cc: ...here.
+
+2008-10-18 Roland Levillain <roland(a)lrde.epita.fr>
+
Have tests/morpho/complex_image_morpho.cc be more verbose/specific.
* tests/morpho/complex_image_morpho.cc (test_morpho): Take an
diff --git a/milena/mln/core/image/complex_neighborhoods.hh
b/milena/mln/core/image/complex_neighborhoods.hh
index 174f263..3dce74f 100644
--- a/milena/mln/core/image/complex_neighborhoods.hh
+++ b/milena/mln/core/image/complex_neighborhoods.hh
@@ -36,6 +36,8 @@
# include <mln/topo/adj_lower_face_iter.hh>
# include <mln/topo/adj_higher_face_iter.hh>
# include <mln/topo/adj_lower_higher_face_iter.hh>
+# include <mln/topo/adj_lower_dim_connected_n_face_iter.hh>
+# include <mln/topo/adj_higher_dim_connected_n_face_iter.hh>
namespace mln
@@ -76,6 +78,32 @@ namespace mln
{
};
+ /// \brief Neighborhood centered on an n-face of complex returning
+ /// the n-faces sharing an (n-1)-face with the center n-face.
+ template <unsigned D, typename G>
+ struct complex_lower_dim_connected_n_face_neighborhood
+ : internal::complex_neighborhood_base<
+ D, G,
+ topo::adj_lower_dim_connected_n_face_fwd_iter<D>,
+ topo::adj_lower_dim_connected_n_face_bkd_iter<D>,
+ complex_lower_dim_connected_n_face_neighborhood<D, G>
+ >
+ {
+ };
+
+ /// \brief Neighborhood centered on an n-face of complex returning
+ /// the n-faces sharing an (n+1)-face with the center n-face.
+ template <unsigned D, typename G>
+ struct complex_higher_dim_connected_n_face_neighborhood
+ : internal::complex_neighborhood_base<
+ D, G,
+ topo::adj_higher_dim_connected_n_face_fwd_iter<D>,
+ topo::adj_higher_dim_connected_n_face_bkd_iter<D>,
+ complex_higher_dim_connected_n_face_neighborhood<D, G>
+ >
+ {
+ };
+
} // end of namespace mln
#endif // ! MLN_CORE_IMAGE_COMPLEX_NEIGHBORHOODS_HH
diff --git a/milena/tests/core/image/complex_image.cc
b/milena/tests/core/image/complex_image.cc
index 36028fc..27dfeb0 100644
--- a/milena/tests/core/image/complex_image.cc
+++ b/milena/tests/core/image/complex_image.cc
@@ -231,6 +231,12 @@ int main()
test_neighborhood(ima, complex_lower_higher_neighborhood<D, G>(),
"Lower- and higer-dimension faces");
+ test_neighborhood(ima,
+ complex_lower_dim_connected_n_face_neighborhood<D, G>(),
+ "Lower-dimension connected n-faces");
+ test_neighborhood(ima,
+ complex_higher_dim_connected_n_face_neighborhood<D, G>(),
+ "Higher-dimension connected n-faces");
/* FIXME: Implement other neighborhoods (and windows) and
corresponding iterators for complex-based images.
--
1.6.0.1
Show replies by date