* mln/core/concept/image.hh,
* mln/core/image/ch_piter.hh,
* mln/core/image/decorated_image.hh,
* mln/core/image/edge_image.hh,
* mln/core/image/extension_fun.hh,
* mln/core/image/extension_ima.hh,
* mln/core/image/extension_val.hh,
* mln/core/image/image_if.hh,
* mln/core/image/interpolated.hh,
* mln/core/image/lazy_image.hh,
* mln/core/image/p2p_image.hh,
* mln/core/image/plain.hh,
* mln/core/image/safe.hh,
* mln/core/image/slice_image.hh,
* mln/core/image/sub_image.hh,
* mln/core/image/t_image.hh,
* mln/core/image/tr_image.hh,
* mln/core/image/vertex_image.hh,
* mln/core/internal/image_base.hh,
* mln/core/internal/image_identity.hh,
* mln/core/internal/image_value_morpher.hh,
* mln/core/macros.hh,
* mln/core/routine/init.hh,
* mln/core/site_set/p_image.hh,
* mln/debug/slices_2d.hh,
* mln/io/off/load.hh,
* mln/labeling/level.hh,
* mln/labeling/level.spe.hh,
* mln/make/image3d.hh,
* mln/morpho/general.spe.hh,
* mln/pw/image.hh,
* mln/pw/internal/image_base.hh,
* mln/tag/skeleton.hh,
* mln/trait/ch_value.hh,
* mln/value/stack.hh,
* tests/core/image/tr_image.cc: rename pset to domain_t and introduce
mln_domain(I).
---
milena/ChangeLog | 42 +++++++++++++++++++++++
milena/mln/core/concept/image.hh | 8 ++--
milena/mln/core/image/ch_piter.hh | 2 +-
milena/mln/core/image/decorated_image.hh | 2 +-
milena/mln/core/image/edge_image.hh | 4 +-
milena/mln/core/image/extension_fun.hh | 2 +-
milena/mln/core/image/extension_ima.hh | 2 +-
milena/mln/core/image/extension_val.hh | 2 +-
milena/mln/core/image/flat_image.hh | 8 ++--
milena/mln/core/image/image_if.hh | 14 ++++----
milena/mln/core/image/interpolated.hh | 4 +-
milena/mln/core/image/lazy_image.hh | 4 +-
milena/mln/core/image/p2p_image.hh | 14 ++++----
milena/mln/core/image/plain.hh | 21 +++++------
milena/mln/core/image/safe.hh | 2 +-
milena/mln/core/image/slice_image.hh | 4 +-
milena/mln/core/image/sub_image.hh | 10 +++---
milena/mln/core/image/sub_image_if.hh | 2 +-
milena/mln/core/image/t_image.hh | 4 +-
milena/mln/core/image/tr_image.hh | 4 +-
milena/mln/core/image/vertex_image.hh | 4 +-
milena/mln/core/internal/image_base.hh | 2 +-
milena/mln/core/internal/image_identity.hh | 4 +-
milena/mln/core/internal/image_value_morpher.hh | 10 +++---
milena/mln/core/macros.hh | 10 ++++-
milena/mln/core/routine/init.hh | 4 +-
milena/mln/core/site_set/p_image.hh | 2 +-
milena/mln/debug/slices_2d.hh | 4 +-
milena/mln/io/off/load.hh | 2 +-
milena/mln/labeling/level.hh | 2 +-
milena/mln/labeling/level.spe.hh | 2 +-
milena/mln/make/image3d.hh | 4 +-
milena/mln/morpho/general.spe.hh | 4 +-
milena/mln/pw/image.hh | 6 ++--
milena/mln/pw/internal/image_base.hh | 6 ++--
milena/mln/tag/skeleton.hh | 2 +-
milena/mln/trait/ch_value.hh | 10 +++---
milena/mln/value/stack.hh | 2 +-
milena/tests/core/image/tr_image.cc | 4 +-
39 files changed, 143 insertions(+), 96 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index ec2e695..5edf45d 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,45 @@
+2009-04-28 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Rename Image::pset to Image::domain_t.
+
+ * mln/core/concept/image.hh,
+ * mln/core/image/ch_piter.hh,
+ * mln/core/image/decorated_image.hh,
+ * mln/core/image/edge_image.hh,
+ * mln/core/image/extension_fun.hh,
+ * mln/core/image/extension_ima.hh,
+ * mln/core/image/extension_val.hh,
+ * mln/core/image/image_if.hh,
+ * mln/core/image/interpolated.hh,
+ * mln/core/image/lazy_image.hh,
+ * mln/core/image/p2p_image.hh,
+ * mln/core/image/plain.hh,
+ * mln/core/image/safe.hh,
+ * mln/core/image/slice_image.hh,
+ * mln/core/image/sub_image.hh,
+ * mln/core/image/t_image.hh,
+ * mln/core/image/tr_image.hh,
+ * mln/core/image/vertex_image.hh,
+ * mln/core/internal/image_base.hh,
+ * mln/core/internal/image_identity.hh,
+ * mln/core/internal/image_value_morpher.hh,
+ * mln/core/macros.hh,
+ * mln/core/routine/init.hh,
+ * mln/core/site_set/p_image.hh,
+ * mln/debug/slices_2d.hh,
+ * mln/io/off/load.hh,
+ * mln/labeling/level.hh,
+ * mln/labeling/level.spe.hh,
+ * mln/make/image3d.hh,
+ * mln/morpho/general.spe.hh,
+ * mln/pw/image.hh,
+ * mln/pw/internal/image_base.hh,
+ * mln/tag/skeleton.hh,
+ * mln/trait/ch_value.hh,
+ * mln/value/stack.hh,
+ * tests/core/image/tr_image.cc: rename pset to domain_t and introduce
+ mln_domain(I).
+
2009-04-29 Fabien Freling <fabien.freling(a)lrde.epita.fr>
Add dim2/ funtion objects and display_edge(), untested.
diff --git a/milena/mln/core/concept/image.hh b/milena/mln/core/concept/image.hh
index 6b23192..494c8b4 100644
--- a/milena/mln/core/concept/image.hh
+++ b/milena/mln/core/concept/image.hh
@@ -80,7 +80,7 @@ namespace mln
/*
// provided by internal::image_base:
- typedef pset;
+ typedef domain_t;
typedef site;
typedef psite;
@@ -104,7 +104,7 @@ namespace mln
rvalue operator()(const psite& p) const;
lvalue operator()(const psite& p);
- const pset& domain() const;
+ const domain_t& domain() const;
typedef skeleton;
*/
@@ -200,7 +200,7 @@ namespace mln
{
// provided by internal::image_base:
- typedef mln_pset(E) pset;
+ typedef mln_domain(E) domain_t;
typedef mln_site(E) site;
typedef mln_psite(E) psite;
@@ -236,7 +236,7 @@ namespace mln
lvalue (E::*m7)(const psite& p) = & E::operator();
m7 = 0;
- const pset& (E::*m8)() const = & E::domain;
+ const domain_t& (E::*m8)() const = & E::domain;
m8 = 0;
const t_eligible_values_set& (E::*m9)() const = & E::values_eligible;
diff --git a/milena/mln/core/image/ch_piter.hh b/milena/mln/core/image/ch_piter.hh
index 10787fa..c1942dc 100644
--- a/milena/mln/core/image/ch_piter.hh
+++ b/milena/mln/core/image/ch_piter.hh
@@ -77,7 +77,7 @@ namespace mln
template <typename I, typename Fwd>
class ch_piter_image : public internal::image_identity< I,
- mln_pset(I),
+ mln_domain(I),
ch_piter_image<I,Fwd> >
{
public:
diff --git a/milena/mln/core/image/decorated_image.hh
b/milena/mln/core/image/decorated_image.hh
index f97eceb..1d8108f 100644
--- a/milena/mln/core/image/decorated_image.hh
+++ b/milena/mln/core/image/decorated_image.hh
@@ -83,7 +83,7 @@ namespace mln
template <typename I, typename D>
struct decorated_image :
public internal::decorated_image_impl_< I, decorated_image<I,D> >,
- public internal::image_identity< I, mln_pset(I), decorated_image<I,D> >
+ public internal::image_identity< I, mln_domain(I), decorated_image<I,D>
>
{
public:
typedef decorated_image<I, D> self_;
diff --git a/milena/mln/core/image/edge_image.hh b/milena/mln/core/image/edge_image.hh
index 9dcbc2a..4ea3ce2 100644
--- a/milena/mln/core/image/edge_image.hh
+++ b/milena/mln/core/image/edge_image.hh
@@ -79,7 +79,7 @@ namespace mln
const p_edges<G,site_function_t>& pe);
fun::i2v::array<V> f_;
- p_edges<G,site_function_t> pset_;
+ p_edges<G,site_function_t> domain_;
};
} // end of namespace mln::internal
@@ -207,7 +207,7 @@ namespace mln
data< mln::edge_image<P,V,G> >::data(const fun::i2v::array<V>&
f,
const p_edges<G,site_function_t>& ps)
: f_(exact(f)),
- pset_(ps)
+ domain_(ps)
{
}
diff --git a/milena/mln/core/image/extension_fun.hh
b/milena/mln/core/image/extension_fun.hh
index 67e5bb4..dd67f04 100644
--- a/milena/mln/core/image/extension_fun.hh
+++ b/milena/mln/core/image/extension_fun.hh
@@ -101,7 +101,7 @@ namespace mln
template <typename I, typename F>
class extension_fun :
- public internal::image_identity< I, mln_pset(I), extension_fun<I, F> >,
+ public internal::image_identity< I, mln_domain(I), extension_fun<I, F>
>,
private mlc_converts_to(mln_result(F), mln_value(I))::check_t
{
public:
diff --git a/milena/mln/core/image/extension_ima.hh
b/milena/mln/core/image/extension_ima.hh
index 91055dd..72119a1 100644
--- a/milena/mln/core/image/extension_ima.hh
+++ b/milena/mln/core/image/extension_ima.hh
@@ -95,7 +95,7 @@ namespace mln
template <typename I, typename J>
class extension_ima
- : public internal::image_identity< I, mln_pset(I), extension_ima<I, J>
>,
+ : public internal::image_identity< I, mln_domain(I), extension_ima<I, J>
>,
private mlc_converts_to(mln_value(J), mln_value(I))::check_t
{
public:
diff --git a/milena/mln/core/image/extension_val.hh
b/milena/mln/core/image/extension_val.hh
index 63dbeb7..82f0684 100644
--- a/milena/mln/core/image/extension_val.hh
+++ b/milena/mln/core/image/extension_val.hh
@@ -96,7 +96,7 @@ namespace mln
template <typename I>
class extension_val :
- public internal::image_identity< I, mln_pset(I), extension_val<I> >
+ public internal::image_identity< I, mln_domain(I), extension_val<I> >
{
public:
diff --git a/milena/mln/core/image/flat_image.hh b/milena/mln/core/image/flat_image.hh
index c5470fb..8de6465 100644
--- a/milena/mln/core/image/flat_image.hh
+++ b/milena/mln/core/image/flat_image.hh
@@ -58,7 +58,7 @@ namespace mln
data(const T& val, const S& pset);
T val_;
- S pset_;
+ S domain_;
};
} // end of namespace mln::internal
@@ -107,7 +107,7 @@ namespace mln
struct flat_image : public internal::image_primary< T, S, flat_image<T,S>
>
{
/// Skeleton.
- typedef flat_image< tag::value_<T>, tag::pset_<S> > skeleton;
+ typedef flat_image< tag::value_<T>, tag::domain_<S> > skeleton;
/// Value associated type.
@@ -179,7 +179,7 @@ namespace mln
inline
data< flat_image<T,S> >::data(const T& val, const S& pset)
: val_(val),
- pset_(pset)
+ domain_(pset)
{
}
@@ -215,7 +215,7 @@ namespace mln
const S&
flat_image<T,S>::domain() const
{
- return this->data_->pset_;
+ return this->data_->domain_;
}
template <typename T, typename S>
diff --git a/milena/mln/core/image/image_if.hh b/milena/mln/core/image/image_if.hh
index 893de51..4f3d065 100644
--- a/milena/mln/core/image/image_if.hh
+++ b/milena/mln/core/image/image_if.hh
@@ -59,7 +59,7 @@ namespace mln
data(I& ima, const F& f);
I ima_;
- p_if<mln_pset(I), F> pset_;
+ p_if<mln_domain(I), F> domain_;
};
} // end of namespace mln::internal
@@ -94,7 +94,7 @@ namespace mln
/// \ingroup modimagedomainmorpher
template <typename I, typename F>
struct image_if : public internal::image_domain_morpher< I,
- p_if<mln_pset(I), F>,
+ p_if<mln_domain(I), F>,
image_if<I, F> >
{
/// Skeleton.
@@ -109,7 +109,7 @@ namespace mln
void init_(I& ima, const F& f);
/// Give the definition domain.
- const p_if<mln_pset(I), F>& domain() const;
+ const p_if<mln_domain(I), F>& domain() const;
/// Const promotion via conversion.
operator image_if<const I, F>() const;
@@ -172,7 +172,7 @@ namespace mln
inline
data< image_if<I,F> >::data(I& ima, const F& f)
: ima_(ima),
- pset_(ima.domain() | f)
+ domain_(ima.domain() | f)
{
}
@@ -205,11 +205,11 @@ namespace mln
template <typename I, typename F>
inline
- const p_if<mln_pset(I), F>&
+ const p_if<mln_domain(I), F>&
image_if<I,F>::domain() const
{
mln_precondition(this->is_valid());
- return this->data_->pset_;
+ return this->data_->domain_;
}
template <typename I, typename F>
@@ -218,7 +218,7 @@ namespace mln
{
mln_precondition(this->is_valid());
image_if<const I,F> tmp(this->data_->ima_,
- this->data_->pset_.predicate());
+ this->data_->domain_.predicate());
return tmp;
}
diff --git a/milena/mln/core/image/interpolated.hh
b/milena/mln/core/image/interpolated.hh
index 70250f6..91356db 100644
--- a/milena/mln/core/image/interpolated.hh
+++ b/milena/mln/core/image/interpolated.hh
@@ -82,10 +82,10 @@ namespace mln
///
template <typename I, template <class> class F>
struct interpolated :
- public mln::internal::image_identity< I, mln_pset(I), interpolated<I,F>
>
+ public mln::internal::image_identity< I, mln_domain(I), interpolated<I,F>
>
{
- typedef mln::internal::image_identity< I, mln_pset(I),
+ typedef mln::internal::image_identity< I, mln_domain(I),
interpolated<I,F> > super_;
/// Point_Site associated type.
diff --git a/milena/mln/core/image/lazy_image.hh b/milena/mln/core/image/lazy_image.hh
index 53015bc..1316284 100644
--- a/milena/mln/core/image/lazy_image.hh
+++ b/milena/mln/core/image/lazy_image.hh
@@ -92,10 +92,10 @@ namespace mln
template <typename I, typename F, typename B>
struct lazy_image :
public mln::internal::image_identity< mln_ch_value(I, mln_result(F)),
- mln_pset(I), lazy_image<I, F,B> >
+ mln_domain(I), lazy_image<I, F,B> >
{
typedef mln::internal::image_identity< mln_ch_value(I, mln_result(F)),
- mln_pset(I),
+ mln_domain(I),
lazy_image<I, F,B> > super_;
/// Return type of read access.
diff --git a/milena/mln/core/image/p2p_image.hh b/milena/mln/core/image/p2p_image.hh
index f0b17ba..cb583ac 100644
--- a/milena/mln/core/image/p2p_image.hh
+++ b/milena/mln/core/image/p2p_image.hh
@@ -55,7 +55,7 @@ namespace mln
I ima_;
F f_;
- mln_pset(I) b_;
+ mln_domain(I) b_;
};
} // end of namespace mln::internal
@@ -88,7 +88,7 @@ namespace mln
/// FIXME: Doc!
template <typename I, typename F>
struct p2p_image : public internal::image_domain_morpher< I,
- mln_pset(I),
+ mln_domain(I),
p2p_image<I, F> >
{
/// Skeleton.
@@ -103,7 +103,7 @@ namespace mln
void init_(I& ima, const F& f);
/// Give the definition domain.
- const mln_pset(I)& domain() const;
+ const mln_domain(I)& domain() const;
/// Give the p2p function.
const F& fun() const;
@@ -161,7 +161,7 @@ namespace mln
f_(f)
{
accu::bbox<mln_site(I)> a;
- mln_pset(I) b = ima.domain();
+ mln_domain(I) b = ima.domain();
a.take(f(b.pmin()));
a.take(f(b.pmax()));
b_ = a.to_result();
@@ -197,7 +197,7 @@ namespace mln
template <typename I, typename F>
inline
- const mln_pset(I)&
+ const mln_domain(I)&
p2p_image<I,F>::domain() const
{
mln_precondition(this->is_valid());
@@ -241,7 +241,7 @@ namespace mln
p2p_image<I,F>
apply_p2p(Image<I>& ima_, const Function_p2p<F>& f)
{
- mlc_is_a(mln_pset(I), Box)::check();
+ mlc_is_a(mln_domain(I), Box)::check();
I& ima = exact(ima_);
mln_precondition(ima.is_valid());
@@ -255,7 +255,7 @@ namespace mln
p2p_image<const I, F>
apply_p2p(const Image<I>& ima_, const Function_p2p<F>& f)
{
- mlc_is_a(mln_pset(I), Box)::check();
+ mlc_is_a(mln_domain(I), Box)::check();
const I& ima = exact(ima_);
mln_precondition(ima.is_valid());
diff --git a/milena/mln/core/image/plain.hh b/milena/mln/core/image/plain.hh
index cd184ba..c40544e 100644
--- a/milena/mln/core/image/plain.hh
+++ b/milena/mln/core/image/plain.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,11 +29,10 @@
#ifndef MLN_CORE_IMAGE_PLAIN_HH
# define MLN_CORE_IMAGE_PLAIN_HH
-/*! \file mln/core/image/plain.hh
- *
- * \brief Definition of a morpher that prevents an image from sharing
- * his data.
- */
+/// \file mln/core/image/plain.hh
+///
+/// Definition of a morpher that prevents an image from sharing
+/// his data.
# include <mln/core/internal/image_identity.hh>
# include <mln/core/routine/duplicate.hh>
@@ -74,17 +74,16 @@ namespace mln
- /*! \brief FIXME
- *
- */
+ /// Morpher that prevents an image from sharing its data.
+ /// While assigned to another image, its data is duplicated.
template <typename I>
class plain
- : public mln::internal::image_identity< I, mln_pset(I), plain<I> >,
+ : public mln::internal::image_identity< I, mln_domain(I), plain<I> >,
private mlc_is_not_const(I)::check_t
{
typedef plain<I> self_;
- typedef mln::internal::image_identity<I, mln_pset(I), self_> super_;
+ typedef mln::internal::image_identity<I, mln_domain(I), self_> super_;
public:
diff --git a/milena/mln/core/image/safe.hh b/milena/mln/core/image/safe.hh
index 69fd854..f04c2b3 100644
--- a/milena/mln/core/image/safe.hh
+++ b/milena/mln/core/image/safe.hh
@@ -82,7 +82,7 @@ namespace mln
// FIXME: Doc!
template <typename I>
- class safe_image : public internal::image_identity< I, mln_pset(I),
safe_image<I> >
+ class safe_image : public internal::image_identity< I, mln_domain(I),
safe_image<I> >
{
public:
diff --git a/milena/mln/core/image/slice_image.hh b/milena/mln/core/image/slice_image.hh
index 66e7b94..b9db296 100644
--- a/milena/mln/core/image/slice_image.hh
+++ b/milena/mln/core/image/slice_image.hh
@@ -267,7 +267,7 @@ namespace mln
slice_image<I>
slice(Image<I>& ima_, def::coord sli)
{
- mlc_equal(mln_pset(I), box3d)::check();
+ mlc_equal(mln_domain(I), box3d)::check();
I& ima = exact(ima_);
mln_precondition(ima.is_valid());
@@ -283,7 +283,7 @@ namespace mln
slice_image<const I>
slice(const Image<I>& ima_, def::coord sli)
{
- mlc_equal(mln_pset(I), box3d)::check();
+ mlc_equal(mln_domain(I), box3d)::check();
const I& ima = exact(ima_);
mln_precondition(ima.is_valid());
diff --git a/milena/mln/core/image/sub_image.hh b/milena/mln/core/image/sub_image.hh
index d5f2bf5..df4c7ba 100644
--- a/milena/mln/core/image/sub_image.hh
+++ b/milena/mln/core/image/sub_image.hh
@@ -60,7 +60,7 @@ namespace mln
data(I& ima, const S& pset);
I ima_;
- S pset_;
+ S domain_;
};
} // end of namespace mln::internal
@@ -105,7 +105,7 @@ namespace mln
sub_image<I,S> >
{
/// Skeleton.
- typedef sub_image< tag::image_<I>, tag::pset_<S> > skeleton;
+ typedef sub_image< tag::image_<I>, tag::domain_<S> > skeleton;
/// Constructor without argument.
sub_image();
@@ -168,7 +168,7 @@ namespace mln
inline
data< sub_image<I,S> >::data(I& ima, const S& pset)
: ima_(ima),
- pset_(pset)
+ domain_(pset)
{
}
@@ -204,7 +204,7 @@ namespace mln
const S&
sub_image<I,S>::domain() const
{
- return this->data_->pset_;
+ return this->data_->domain_;
}
template <typename I, typename S>
@@ -212,7 +212,7 @@ namespace mln
sub_image<I,S>::operator sub_image<const I, S>() const
{
sub_image<const I, S> tmp(this->data_->ima_,
- this->data_->pset_);
+ this->data_->domain_);
return tmp;
}
diff --git a/milena/mln/core/image/sub_image_if.hh
b/milena/mln/core/image/sub_image_if.hh
index 773e268..820d618 100644
--- a/milena/mln/core/image/sub_image_if.hh
+++ b/milena/mln/core/image/sub_image_if.hh
@@ -103,7 +103,7 @@ namespace mln
sub_image_if<I,S> >
{
/// Skeleton.
- typedef sub_image_if< tag::image_<I>, tag::pset_<S> > skeleton;
+ typedef sub_image_if< tag::image_<I>, tag::domain_<S> > skeleton;
/// Constructor without argument.
sub_image_if();
diff --git a/milena/mln/core/image/t_image.hh b/milena/mln/core/image/t_image.hh
index 7fcc449..34e5992 100644
--- a/milena/mln/core/image/t_image.hh
+++ b/milena/mln/core/image/t_image.hh
@@ -81,11 +81,11 @@ namespace mln
*/
template <typename I>
class t_image
- : public internal::image_morpher<I, mln_value(I), mln_pset(I), t_image<I>
>
+ : public internal::image_morpher<I, mln_value(I), mln_domain(I), t_image<I>
>
{
public:
/// Super type.
- typedef internal::image_morpher< I, mln_value(I), mln_pset(I),
+ typedef internal::image_morpher< I, mln_value(I), mln_domain(I),
t_image<I> > super_;
/// Point_Site associated type.
diff --git a/milena/mln/core/image/tr_image.hh b/milena/mln/core/image/tr_image.hh
index a0fb983..753f666 100644
--- a/milena/mln/core/image/tr_image.hh
+++ b/milena/mln/core/image/tr_image.hh
@@ -80,12 +80,12 @@ namespace mln
/// transformation.
template <typename S, typename I, typename T>
struct tr_image :
- public mln::internal::image_identity< I, mln_pset(I), tr_image<S,I,T> >
+ public mln::internal::image_identity< I, mln_domain(I), tr_image<S,I,T>
>
{
/// Super type.
typedef
- mln::internal::image_identity< I, mln_pset(I), tr_image<S,I,T> > super_;
+ mln::internal::image_identity< I, mln_domain(I), tr_image<S,I,T> >
super_;
/// Point_Site associated type.
typedef mln_psite(I) psite;
diff --git a/milena/mln/core/image/vertex_image.hh
b/milena/mln/core/image/vertex_image.hh
index 6f92753..333750a 100644
--- a/milena/mln/core/image/vertex_image.hh
+++ b/milena/mln/core/image/vertex_image.hh
@@ -82,7 +82,7 @@ namespace mln
const p_vertices<G,F>& pv);
fun::i2v::array<V> f_;
- p_vertices<G,site_function_t> pset_;
+ p_vertices<G,site_function_t> domain_;
};
} // end of namespace mln::internal
@@ -214,7 +214,7 @@ namespace mln
data< mln::vertex_image<P,V,G> >::data(const
fun::i2v::array<V>& f,
const p_vertices<G,F>& ps)
: f_(f),
- pset_(ps)
+ domain_(ps)
{
}
diff --git a/milena/mln/core/internal/image_base.hh
b/milena/mln/core/internal/image_base.hh
index a254b54..dd1f336 100644
--- a/milena/mln/core/internal/image_base.hh
+++ b/milena/mln/core/internal/image_base.hh
@@ -101,7 +101,7 @@ namespace mln
/// Site_Set associated type.
- typedef S pset;
+ typedef S domain_t;
/// Point_Site associated type.
typedef mln_psite(S) psite;
diff --git a/milena/mln/core/internal/image_identity.hh
b/milena/mln/core/internal/image_identity.hh
index bddcdf7..f42afb6 100644
--- a/milena/mln/core/internal/image_identity.hh
+++ b/milena/mln/core/internal/image_identity.hh
@@ -148,7 +148,7 @@ namespace mln
lvalue operator()(const mln_psite(S)& p);
// FIXME Matthieu: Doc! Cf. core/concept/doc/image
- const mln_pset(I)& domain() const;
+ const mln_domain(I)& domain() const;
bool has(const mln_psite(I)& p) const;
protected:
@@ -187,7 +187,7 @@ namespace mln
template <typename I, typename S, typename E>
inline
- const mln_pset(I)&
+ const mln_domain(I)&
image_identity<I, S, E>::domain() const
{
mln_precondition(this->delegatee_() != 0);
diff --git a/milena/mln/core/internal/image_value_morpher.hh
b/milena/mln/core/internal/image_value_morpher.hh
index b2686ec..0be1d96 100644
--- a/milena/mln/core/internal/image_value_morpher.hh
+++ b/milena/mln/core/internal/image_value_morpher.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -53,11 +53,11 @@ namespace mln
* Parameter \p P is a value type.
*/
template <typename I, typename T, typename E>
- class image_value_morpher : public image_morpher<I, T, mln_pset(I), E>
+ class image_value_morpher : public image_morpher<I, T, mln_domain(I), E>
{
public:
- const mln_pset(I)& domain() const;
+ const mln_domain(I)& domain() const;
bool has(const mln_psite(I)& p) const;
protected:
@@ -75,7 +75,7 @@ namespace mln
template <typename I, typename T, typename E>
inline
- const mln_pset(I)&
+ const mln_domain(I)&
image_value_morpher<I,T,E>::domain() const
{
mln_precondition(this->delegatee_() != 0);
diff --git a/milena/mln/core/macros.hh b/milena/mln/core/macros.hh
index ba5702e..3eff9be 100644
--- a/milena/mln/core/macros.hh
+++ b/milena/mln/core/macros.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -252,6 +252,12 @@
# define mln_line_piter_(T) T::line_piter
/// \}
+/// Shortcuts to access the domain type associated to T.
+/// \{
+# define mln_domain(T) typename T::domain_t
+# define mln_domain_(T) T::domain_t
+/// \}
+
/// Shortcuts to access the type of point set (pset) associated to T.
/// \{
# define mln_pset(T) typename T::pset
diff --git a/milena/mln/core/routine/init.hh b/milena/mln/core/routine/init.hh
index 03bf405..5bec266 100644
--- a/milena/mln/core/routine/init.hh
+++ b/milena/mln/core/routine/init.hh
@@ -58,7 +58,7 @@ namespace mln
void init_(tag::border_t, unsigned& bdr, const Image<I>& ima);
template <typename I>
- void init_(tag::domain_t, mln_pset(I)& pset, const Image<I>& ima);
+ void init_(tag::domain_t, mln_domain(I)& pset, const Image<I>& ima);
@@ -93,7 +93,7 @@ namespace mln
template <typename I>
inline
- void init_(tag::domain_t, mln_pset(I)& pset, const Image<I>& ima)
+ void init_(tag::domain_t, mln_domain(I)& pset, const Image<I>& ima)
{
pset = exact(ima).domain();
}
diff --git a/milena/mln/core/site_set/p_image.hh b/milena/mln/core/site_set/p_image.hh
index dff9ae5..ca0d64f 100644
--- a/milena/mln/core/site_set/p_image.hh
+++ b/milena/mln/core/site_set/p_image.hh
@@ -71,7 +71,7 @@ namespace mln
template <typename I>
class p_image : public internal::site_set_base_< mln_psite(I), p_image<I>
>
{
- typedef mln_pset(I) S_;
+ typedef mln_domain(I) S_;
typedef fun::eq_p2b_expr_< pw::value_<I>, pw::cst_<bool> > F_;
public:
diff --git a/milena/mln/debug/slices_2d.hh b/milena/mln/debug/slices_2d.hh
index c858b86..af0f2ba 100644
--- a/milena/mln/debug/slices_2d.hh
+++ b/milena/mln/debug/slices_2d.hh
@@ -82,7 +82,7 @@ namespace mln
const mln_value(I)& bg)
{
trace::entering("debug::slices_2d");
- mlc_equal(mln_pset(I), box3d)::check();
+ mlc_equal(mln_domain(I), box3d)::check();
const I& input = exact(input_);
@@ -165,7 +165,7 @@ namespace mln
const mln_value(I)& bg)
{
trace::entering("debug::slices_2d");
- mlc_equal(mln_pset(I), box3d)::check();
+ mlc_equal(mln_domain(I), box3d)::check();
const I& input = exact(input_);
mln_precondition(input.is_valid());
diff --git a/milena/mln/io/off/load.hh b/milena/mln/io/off/load.hh
index 1f8fefe..4061fe3 100644
--- a/milena/mln/io/off/load.hh
+++ b/milena/mln/io/off/load.hh
@@ -100,7 +100,7 @@ namespace mln
/// Type of the set of values.
typedef metal::vec<D + 1, std::vector< mln_value(I) > > values;
/// Type of the domain.
- typedef mln_pset(I) domain;
+ typedef mln_domain(I) domain;
/// Constructor, with static checks.
off_loader();
diff --git a/milena/mln/labeling/level.hh b/milena/mln/labeling/level.hh
index 677b027..15336b9 100644
--- a/milena/mln/labeling/level.hh
+++ b/milena/mln/labeling/level.hh
@@ -103,7 +103,7 @@ namespace mln
// Requirements from mln::canvas::labeling.
- typedef mln_pset(I) S;
+ typedef mln_domain(I) S;
// Generic implementation
diff --git a/milena/mln/labeling/level.spe.hh b/milena/mln/labeling/level.spe.hh
index f598740..932e954 100644
--- a/milena/mln/labeling/level.spe.hh
+++ b/milena/mln/labeling/level.spe.hh
@@ -95,7 +95,7 @@ namespace mln
typedef I_ I;
typedef N_ N;
typedef L_ L;
- typedef mln_pset(I) S;
+ typedef mln_domain(I) S;
const I& input;
const N& nbh;
diff --git a/milena/mln/make/image3d.hh b/milena/mln/make/image3d.hh
index bff73ff..11ee4fc 100644
--- a/milena/mln/make/image3d.hh
+++ b/milena/mln/make/image3d.hh
@@ -69,7 +69,7 @@ namespace mln
mln::image3d<mln_value(I)>
image3d(const util::array<I>& ima)
{
- mlc_is_a(mln_pset(I), Box)::check();
+ mlc_is_a(mln_domain(I), Box)::check();
mln_precondition(! ima.is_empty());
def::coord n_slices = ima.nelements();
@@ -91,7 +91,7 @@ namespace mln
mln::image3d<mln_value(I)>
image3d(const I& ima)
{
- mlc_is_a(mln_pset(I), Box)::check();
+ mlc_is_a(mln_domain(I), Box)::check();
mln_precondition(ima.is_valid());
mln::box2d b = ima.domain();
diff --git a/milena/mln/morpho/general.spe.hh b/milena/mln/morpho/general.spe.hh
index a218c4f..687af1f 100644
--- a/milena/mln/morpho/general.spe.hh
+++ b/milena/mln/morpho/general.spe.hh
@@ -437,7 +437,7 @@ namespace mln
return general_dispatch_for_generic(op, input, win);
else
{
- enum { test = mlc_is_a(mln_pset(I), Box)::value
+ enum { test = mlc_is_a(mln_domain(I), Box)::value
&& mlc_equal(mln_trait_image_quant(I),
mln::trait::image::quant::low)::value };
return general_dispatch_line(metal::bool_<test>(),
@@ -479,7 +479,7 @@ namespace mln
return general_dispatch_for_generic(op, input, win);
else
{
- enum { test = mlc_is_a(mln_pset(I), Box)::value
+ enum { test = mlc_is_a(mln_domain(I), Box)::value
&& mlc_equal(mln_trait_image_quant(I),
mln::trait::image::quant::low)::value };
return general_dispatch_diagonal(metal::bool_<test>(),
diff --git a/milena/mln/pw/image.hh b/milena/mln/pw/image.hh
index e96233e..d01ff32 100644
--- a/milena/mln/pw/image.hh
+++ b/milena/mln/pw/image.hh
@@ -68,7 +68,7 @@ namespace mln
{
data(const F& f, const S& ps);
F f_;
- S pset_;
+ S domain_;
};
} // end of namespace mln::internal
@@ -95,7 +95,7 @@ namespace mln
public:
/// Skeleton.
- typedef image< tag::function_<F>, tag::pset_<S> > skeleton;
+ typedef image< tag::function_<F>, tag::domain_<S> > skeleton;
/// Constructor without argument.
image();
@@ -150,7 +150,7 @@ namespace mln
inline
data< mln::pw::image<F,S> >::data(const F& f, const S& ps)
: f_(f),
- pset_(ps)
+ domain_(ps)
{
}
diff --git a/milena/mln/pw/internal/image_base.hh b/milena/mln/pw/internal/image_base.hh
index 2770612..b6571b9 100644
--- a/milena/mln/pw/internal/image_base.hh
+++ b/milena/mln/pw/internal/image_base.hh
@@ -215,7 +215,7 @@ namespace mln
const S&
image_base<F,S,E>::domain() const
{
- return this->data_->pset_;
+ return this->data_->domain_;
}
template <typename F, typename S, typename E>
@@ -232,7 +232,7 @@ namespace mln
typename image_base<F,S,E>::rvalue
image_base<F,S,E>::operator()(const mln_psite(S)& p) const
{
- mln_precondition(this->data_->pset_.has(p));
+ mln_precondition(this->data_->domain_.has(p));
return this->data_->f_(p);
}
@@ -241,7 +241,7 @@ namespace mln
typename image_base<F,S,E>::lvalue
image_base<F,S,E>::operator()(const mln_psite(S)& p)
{
- mln_precondition(this->data_->pset_.has(p));
+ mln_precondition(this->data_->domain_.has(p));
return this->data_->f_(p);
}
diff --git a/milena/mln/tag/skeleton.hh b/milena/mln/tag/skeleton.hh
index a90bd05..20be3f9 100644
--- a/milena/mln/tag/skeleton.hh
+++ b/milena/mln/tag/skeleton.hh
@@ -49,7 +49,7 @@ namespace mln
template <typename I> struct image_ { typedef I param; };
template <typename N> struct neighb_ { typedef N param; };
template <typename P> struct psite_ { typedef P param; };
- template <typename S> struct pset_ { typedef S param; };
+ template <typename S> struct domain_ { typedef S param; };
template <typename V> struct value_ { typedef V param; };
// With value.
diff --git a/milena/mln/trait/ch_value.hh b/milena/mln/trait/ch_value.hh
index e02bf04..388520a 100644
--- a/milena/mln/trait/ch_value.hh
+++ b/milena/mln/trait/ch_value.hh
@@ -153,14 +153,14 @@ namespace mln
template < template <class, class> class M, typename I, typename S,
typename V >
- struct ch_value_< M< tag::image_<I>, tag::pset_<S> >, V
>
+ struct ch_value_< M< tag::image_<I>, tag::domain_<S> >, V
>
{
typedef M< mln_ch_value(I, V), S > ret;
};
template < template <class, class> class M, typename F, typename S,
typename V >
- struct ch_value_< M< tag::function_<F>, tag::pset_<S> >, V
>
+ struct ch_value_< M< tag::function_<F>, tag::domain_<S> >, V
>
{
// FIXME: what about S::site having no grid?
typedef mln_deduce(S, site, grid) grid;
@@ -172,7 +172,7 @@ namespace mln
template < typename F,
typename G, typename FP,
typename V >
- struct ch_value_< pw::image< tag::function_<F>,
tag::pset_<p_edges<G, FP> > >, V >
+ struct ch_value_< pw::image< tag::function_<F>,
tag::domain_<p_edges<G, FP> > >, V >
{
typedef pw::image< mln_ch_function_value(F, V), p_edges<G, FP> > ret;
};
@@ -181,7 +181,7 @@ namespace mln
template < typename F,
typename G, typename FP,
typename V >
- struct ch_value_< pw::image< tag::function_<F>,
tag::pset_<p_vertices<G, FP> > >, V >
+ struct ch_value_< pw::image< tag::function_<F>,
tag::domain_<p_vertices<G, FP> > >, V >
{
typedef pw::image< mln_ch_function_value(F, V), p_vertices<G, FP> > ret;
@@ -210,7 +210,7 @@ namespace mln
template < template <class, class> class M, typename T, typename S,
typename V >
- struct ch_value_< M< tag::value_<T>, tag::pset_<S> >, V
>
+ struct ch_value_< M< tag::value_<T>, tag::domain_<S> >, V
>
{
// FIXME: what about S::site having no grid?
typedef mln_deduce(S, site, grid) grid;
diff --git a/milena/mln/value/stack.hh b/milena/mln/value/stack.hh
index c1df060..63be88e 100644
--- a/milena/mln/value/stack.hh
+++ b/milena/mln/value/stack.hh
@@ -153,7 +153,7 @@ namespace mln
typedef mln_psite(I) psite;
/// Site_Set associated type.
- typedef mln_pset(I) pset;
+ typedef mln_domain(I) domain_t;
/// Value associated type.
typedef algebra::vec<n, mln_value(I)> value;
diff --git a/milena/tests/core/image/tr_image.cc b/milena/tests/core/image/tr_image.cc
index 804a6a3..0f9c555 100644
--- a/milena/tests/core/image/tr_image.cc
+++ b/milena/tests/core/image/tr_image.cc
@@ -56,7 +56,7 @@ int main()
v[1] = 1;
fun::x2x::rotation<2, float> rot1(1.67, v);
- tr_image<mln_pset_(image2d<int_u8>),
+ tr_image<mln_domain_(image2d<int_u8>),
image2d<int_u8>,
fun::x2x::rotation<2, float> >
inter(in.domain(), in, rot1);
@@ -76,7 +76,7 @@ int main()
v[2] = 1;
fun::x2x::rotation<3, float> rot1(1.67, v);
- tr_image<mln_pset_(image3d<int_u8>),
+ tr_image<mln_domain_(image3d<int_u8>),
image3d<int_u8>,
fun::x2x::rotation<3, float> >
inter(in.domain(), in, rot1);
--
1.5.6.5