26 #ifndef APPS_MORPHERS_LAZY_RECORDER_HH
27 # define APPS_MORPHERS_LAZY_RECORDER_HH
44 #include <mln/trait/ch_value.hh>
46 #include <mln/core/image/imorph/decorated_image.hh>
48 #include <mln/value/rgb8.hh>
50 #include <mln/core/routine/duplicate.hh>
52 #include <mln/io/ppm/save.hh>
54 #include "apps/data.hh"
71 : default_image_morpher< I,
73 decorated_image< I, lazy_recorder<I> > >
75 typedef trait::image::category::identity_morpher
category;
100 void reading(
const I&,
const mln_psite(I)&)
const
105 void writing(I&,
const mln_psite(I)& p,
const mln_value(I)& v)
107 sequence.push_back(std::make_pair(p, v));
114 std::vector< std::pair<mln_psite(I), mln_value(I)> >
sequence;
156 template <
typename I,
typename V >
157 struct ch_value_< decorated_image< tag::
image_<I>,
158 tag::data_< lazy_recorder<I> > >,
161 typedef decorated_image< mln_ch_value(I, V),
171 template <
typename I>
183 template <
typename I>
187 const std::string& prefix)
190 for (
size_t i = 0; i < rec.decoration().sequence.size(); ++i)
193 s << std::setfill (
'0') << std::setw (6) << i;
200 frame(rec.decoration().sequence[i].first) =
201 rec.decoration().sequence[i].second;
206 #endif // ! APPS_MORPHERS_LAZY_RECORDER_HH