26 #ifndef APPS_MORPHERS_RECORDER_HH
27 # define APPS_MORPHERS_RECORDER_HH
40 #include <mln/trait/ch_value.hh>
42 #include <mln/core/image/imorph/decorated_image.hh>
44 #include <mln/value/rgb8.hh>
46 #include <mln/core/routine/duplicate.hh>
48 #include <mln/io/ppm/save.hh>
50 #include "apps/data.hh"
54 template <
typename I>
struct recorder;
66 struct image_< decorated_image< I,
recorder<I> > >
67 : default_image_morpher< I,
69 decorated_image< I, recorder<I> > >
71 typedef trait::image::category::identity_morpher
category;
87 void reading(
const I&,
const mln_psite(I)&)
const
92 void writing(I& ima,
const mln_psite(I)&,
const mln_value(I)&)
139 template <
typename I,
typename V >
140 struct ch_value_< decorated_image< tag::image_<I>,
141 tag::data_< recorder<I> > >,
144 typedef decorated_image< mln_ch_value(I, V),
154 template <
typename I>
166 template <
typename I>
170 const std::string& prefix)
172 for (
size_t i = 0; i < rec.decoration().sequence.size(); ++i)
175 s << std::setfill (
'0') << std::setw (6) << i;
177 prefix + s.str() +
".ppm");
182 #endif // ! APPS_MORPHERS_RECORDER_HH