27 #ifndef MLN_ACCU_STAT_HISTO3D_RGB_HH
28 # define MLN_ACCU_STAT_HISTO3D_RGB_HH
72 # include <mln/accu/internal/base.hh>
74 # include <mln/arith/plus.hh>
76 # include <mln/core/macros.hh>
77 # include <mln/core/image/image3d.hh>
78 # include <mln/core/alias/point3d.hh>
79 # include <mln/core/alias/box3d.hh>
81 # include <mln/literal/zero.hh>
83 # include <mln/debug/trace.hh>
85 # include <mln/trait/value/comp.hh>
87 # include <mln/value/ops.hh>
112 template <
typename V>
129 template <
typename V>
132 typedef accumulator::has_untake::no
has_untake;
134 typedef accumulator::has_stop::no
has_stop;
135 typedef accumulator::when_pix::use_v
when_pix;
138 template <
typename V>
139 struct set_precise_binary_<op::eq,
140 accu::stat::histo3d_rgb<V>,
141 accu::stat::histo3d_rgb<V> >
165 template <
typename V>
235 template <
typename V>
239 # ifndef MLN_INCLUDE_ONLY
241 template <
typename V>
245 mln_trace(
"mln::accu::stat::histo3d_rgb::cstor");
247 typedef mln_trait_value_comp(V,0) comp0;
248 typedef mln_trait_value_comp(V,1) comp1;
249 typedef mln_trait_value_comp(V,2) comp2;
264 template <typename V>
271 template <
typename V>
278 ++count_(
point3d(t.blue(), t.red(), t.green()));
282 template <
typename V>
286 count_ += other.count_;
289 template <
typename V>
296 template <
typename V>
298 histo3d_rgb<V>::operator result()
const
303 template <
typename V>
307 bool result = count_.is_valid();
312 template <
typename V>
314 const histo3d_rgb<V>& histo2)
316 mln_trace(
"mln::accu::stat::histo3d_rgb::operator==");
319 const image3d<unsigned>& res1 = histo1.to_result();
320 const image3d<unsigned>& res2 = histo2.to_result();
322 mln_precondition(res1.is_valid());
323 mln_precondition(res2.is_valid());
325 mln_piter(image3d<unsigned>) p1(res1.domain());
326 mln_piter(image3d<
unsigned>) p2(res2.domain());
329 result &= (res1(p1) == res2(p2));
334 # endif // ! MLN_INCLUDE_ONLY
343 #endif // ! MLN_ACCU_STAT_HISTO3D_RGB_HH