27 #ifndef MLN_MORPHO_ATTRIBUTE_VOLUME_HH
28 # define MLN_MORPHO_ATTRIBUTE_VOLUME_HH
35 # include <mln/accu/internal/base.hh>
36 # include <mln/math/diff_abs.hh>
37 # include <mln/util/pix.hh>
46 template <
typename I>
struct volume;
59 typedef accumulator::has_untake::no
has_untake;
61 typedef accumulator::has_stop::no
has_stop;
62 typedef accumulator::when_pix::use_v
when_pix;
90 void take(const mln_value(I)& v);
91 void take(const util::pix<I>& px);
106 unsigned area() const;
119 # ifndef MLN_INCLUDE_ONLY
121 template <
typename I>
128 template <
typename I>
136 template <
typename I>
141 mln_invariant(volume_ != mln_max(
unsigned));
152 template <
typename I>
157 mln_invariant(volume_ != mln_max(
unsigned));
161 template <
typename I>
166 mln_invariant(volume_ != mln_max(
unsigned));
167 area_ += other.area_;
174 template <
typename I>
184 template <
typename I>
192 template <
typename I>
200 template <
typename I>
208 template <
typename I>
216 # endif // ! MLN_INCLUDE_ONLY
225 #endif // ! MLN_MORPHO_ATTRIBUTE_VOLUME_HH