Commit 6b0e5460 authored by Roland Levillain's avatar Roland Levillain
Browse files

Fix programs in doc/examples/.

	* doc/examples/ima-save.cc: Add a FIXME.
	* doc/examples/ima-load.cc: Likewise.
	Avoid hard-coded paths.
	* doc/examples/tuto4/image.cc: Make it compile.
	* doc/img/small.pbm: New symbolic link to img/small.pbm.
	* doc/examples/split/ima-load-1.cc.raw: Regen.
	* doc/examples/fill-imageif-cfun.cc,
	* figures.mk,
	* ppm-figures.mk:
	s/fill-subimage-cfun/fill-imageif-cfun/.
parent 7fe9e76d
2010-03-17 Roland Levillain <roland@lrde.epita.fr>
Fix programs in doc/examples/.
* doc/examples/ima-save.cc: Add a FIXME.
* doc/examples/ima-load.cc: Likewise.
Avoid hard-coded paths.
* doc/examples/tuto4/image.cc: Make it compile.
* doc/img/small.pbm: New symbolic link to img/small.pbm.
* doc/examples/split/ima-load-1.cc.raw: Regen.
* doc/examples/fill-imageif-cfun.cc,
* figures.mk,
* ppm-figures.mk:
s/fill-subimage-cfun/fill-imageif-cfun/.
2010-03-17 Roland Levillain <roland@lrde.epita.fr> 2010-03-17 Roland Levillain <roland@lrde.epita.fr>
   
Update PNG-to-EPS conversion rule. Update PNG-to-EPS conversion rule.
...@@ -46,5 +46,5 @@ int main() ...@@ -46,5 +46,5 @@ int main()
data::fill((ima2 | row_oddity).rw(), literal::red); data::fill((ima2 | row_oddity).rw(), literal::red);
// \} // \}
doc::ppmsave(ima2, "fill-subimage-cfun"); doc::ppmsave(ima2, "fill-imageif-cfun");
} }
#include <mln/core/image/image2d.hh> #include <mln/core/image/image2d.hh>
#include <mln/io/pbm/load.hh> #include <mln/io/pbm/load.hh>
#include "doc/tools/data.hh"
int main() int main()
{ {
using namespace mln; using namespace mln;
/* FIXME: MLN_DOC_DIR looks probably confusing in the
documentation... But we have to handle parallel builds. Maybe a
solution could be to prepare the the build dir for data? */
// \{ // \{
image2d<bool> ima; image2d<bool> ima;
io::pbm::load(ima, "my_image.pbm"); io::pbm::load(ima, MLN_DOC_DIR "/img/small.pbm");
// \} // \}
} }
...@@ -17,6 +17,9 @@ int main() ...@@ -17,6 +17,9 @@ int main()
}; };
image2d<bool> ima = make::image(vals); image2d<bool> ima = make::image(vals);
/* FIXME: MLN_DOC_DIR looks probably confusing in the
documentation... But we have to handle parallel builds. Maybe a
solution could be to prepare the the build dir for data? */
// \{ // \{
io::pbm::save(ima, MLN_DOC_DIR "/figures/ima_save.pbm"); io::pbm::save(ima, MLN_DOC_DIR "/figures/ima_save.pbm");
// \} // \}
......
image2d<bool> ima; image2d<bool> ima;
io::pbm::load(ima, "my_image.pbm"); io::pbm::load(ima, MLN_DOC_DIR "/img/small.pbm");
...@@ -8,7 +8,5 @@ int main() ...@@ -8,7 +8,5 @@ int main()
image2d<value::int_u8> input(2,2); image2d<value::int_u8> input(2,2);
box2d b(2,2); box2d b(2,2);
image2d<value::int_u8> input(b); image2d<value::int_u8> input2(b);
image2d<value::int_u8>
} }
...@@ -46,7 +46,7 @@ $(srcdir)/figures/fill-subdomain-1.pbm $(srcdir)/figures/fill-subdomain-2.ppm $( ...@@ -46,7 +46,7 @@ $(srcdir)/figures/fill-subdomain-1.pbm $(srcdir)/figures/fill-subdomain-2.ppm $(
$(MAKE) $(AM_MAKEFLAGS) $<; \ $(MAKE) $(AM_MAKEFLAGS) $<; \
fi fi
$(srcdir)/figures/fill-subimage-cfun-1.ppm: $(srcdir)/examples/fill-imageif-cfun.stamp $(srcdir)/figures/fill-imageif-cfun-1.ppm: $(srcdir)/examples/fill-imageif-cfun.stamp
## Recover from the removal of $@ ## Recover from the removal of $@
@if test -f $@; then :; else \ @if test -f $@; then :; else \
rm -f $<; \ rm -f $<; \
......
../../img/small.pbm
\ No newline at end of file
...@@ -12,7 +12,6 @@ PPM_FIGURES = \ ...@@ -12,7 +12,6 @@ PPM_FIGURES = \
$(srcdir)/figures/fill-subdomain-2.ppm \ $(srcdir)/figures/fill-subdomain-2.ppm \
$(srcdir)/figures/fill-subdomain-3.ppm \ $(srcdir)/figures/fill-subdomain-3.ppm \
$(srcdir)/figures/fill-subdomain-4.ppm \ $(srcdir)/figures/fill-subdomain-4.ppm \
$(srcdir)/figures/fill-subimage-cfun-1.ppm \
$(srcdir)/figures/ima2d-rot-1.ppm \ $(srcdir)/figures/ima2d-rot-1.ppm \
$(srcdir)/figures/ima2d-rot-2.ppm \ $(srcdir)/figures/ima2d-rot-2.ppm \
$(srcdir)/figures/labeling-compute-2.ppm \ $(srcdir)/figures/labeling-compute-2.ppm \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment