1. 30 Aug, 2013 40 commits
    • Roland Levillain's avatar
      Convert remaining Milena code to mln_trace. · 5028921e
      Roland Levillain authored
      	* doc/examples/devel/facade.cc.raw,
      	* doc/examples/devel/impl.cc.raw,
      	* mln/io/vtk/save.hh,
      	* mln/topo/skeleton/breadth_first_thinning.hh,
      	* mln/topo/skeleton/priority_driven_thinning.hh,
      	* new-header:
      	Here.
      5028921e
    • Roland Levillain's avatar
      Fix the use of Pi in Milena's apps/mesh-segm-skel. · 5d8a1259
      Roland Levillain authored
      	* apps/mesh-segm-skel/mesh-complex-max-curv-extrema.cc,
      	* apps/mesh-segm-skel/mesh-complex-max-curv-segm.cc,
      	* apps/mesh-segm-skel/mesh-complex-pinv-curv-segm.cc,
      	* apps/mesh-segm-skel/mesh-complex-pinv-curv-skel.cc:
      	Here.
      5d8a1259
    • Roland Levillain's avatar
      Fix header inclusions in Milena's apps/mesh-segm-skel. · e9bf0a68
      Roland Levillain authored
      	* apps/mesh-segm-skel/mesh-complex-max-curv-1-collapse.cc,
      	* apps/mesh-segm-skel/mesh-complex-max-curv-2-collapse.cc,
      	* apps/mesh-segm-skel/mesh-complex-max-curv-extrema.cc,
      	* apps/mesh-segm-skel/mesh-complex-max-curv-skel.cc,
      	* apps/mesh-segm-skel/mesh-complex-pinv-curv-segm.cc,
      	* apps/mesh-segm-skel/mesh-complex-pinv-curv-skel.cc:
      	Here.
      e9bf0a68
    • Roland Levillain's avatar
      Add tests to generate figures for the WADGMM 2010/LNCS submission. · b77aca0a
      Roland Levillain authored
      	* apps/generic-skel/image2d-skel-unconstrained.cc,
      	* apps/generic-skel/image2d-skel-with-end-points.cc,
      	* apps/generic-skel/image3d-skel-unconstrained.cc,
      	* apps/mesh-segm-skel/mesh-complex-max-curv-1-collapse.cc,
      	* apps/mesh-segm-skel/mesh-complex-max-curv-2-collapse.cc,
      	* apps/mesh-segm-skel/mesh-complex-pinv-curv-skel.cc:
      	Display the size of the input.
      	Time the thinning step.
      	* milena/apps/generic-skel/test-mixed.in,
      	* milena/apps/mesh-segm-skel/test-mixed.in:
      	New.
      	* apps/generic-skel/Makefile.am (generated_tests): Add test-mixed.
      	(test-mixed): New target.
      	(check-mixed): New (phony) target.
      	* apps/mesh-segm-skel/Makefile.am: Likewise.
      	($(generated_tests)): New target.
      	(AM_CPPFLAGS): Add -I$(top_builddir)/milena so that
      	mln/version.hh, which is a generated header, can be found by the
      	compiler.
      b77aca0a
    • Roland Levillain's avatar
      Introduce a no-constraint functor to replace fun::p2b::tautology. · fe72eddb
      Roland Levillain authored
      	* mln/fun/p2b/antilogy.hh,
      	* mln/fun/p2b/tautology.hh:
      	Do not include mln/core/alias/point2d.hh.
      	* mln/topo/no_constraint.hh: New file.
      	* mln/topo/skeleton/breadth_first_thinning.hh,
      	* mln/topo/skeleton/priority_driven_thinning.hh:
      	Use mln::topo::no_constraint instead of mln::fun::p2b::tautology.
      	Do not include the standard header `algorithm'.
      	* headers.mk, tests/unit_test/unit-tests.mk: Regen.
      fe72eddb
    • Roland Levillain's avatar
      Factor code of 2D skeletonizations in apps/generic-skel/. · 91582ecb
      Roland Levillain authored
      	* mln/topo/is_not_end_point.hh: s/nbh/nbh_fg/.
      	(is_not_end_point<I, N>::is_not_end_point(const Neighborhood<N>&)):
      	New ctor.
      	(is_not_end_point<I, N>::set_image): New method.
      	(is_not_end_point<I, N>::ima_): Turn this reference into a pointer.
      	Adjust.
      	* mln/topo/is_simple_point2d.hh
      	(mln::topo::is_simple_point2d<I, N>::operator())
      	* mln/topo/detach_point.hh
      	(mln::topo::detach_point<I>::operator()):
      	Add preconditions.
      	* apps/generic-skel/image2d-skel-with-end-points.cc:
      	Use `mln::topo::is_simple_point2d' and `mln:: topo::detach_point'
      	from mln/topo/, instead of `is_simple_2d' and `detach' from
      	image2d-skel.hh
      	* apps/generic-skel/image2d-skel-unconstrained.cc: Likewise.
      	Remove the (lack of) constraint, as
      	mln::topo::skeleton::breadth_first_thinning already takes care of
      	this.
      	* apps/generic-skel/image2d-skel.hh: Remove.
      	* apps/generic-skel/Makefile.am
      	(image2d_skel_unconstrained_SOURCES)
      	(image2d_skel_with_end_points_SOURCES):
      	Remove image2d-skel.hh.
      91582ecb
    • Roland Levillain's avatar
      Misc changes in apps/generic-skel/ and tools/. · fea1bdb0
      Roland Levillain authored
      	* apps/generic-skel/image3d-skel-unconstrained.cc:
      	Remove a useless header inclusion.
      	* apps/generic-skel/image3d-skel-with-end-points.cc:
      	Fix a comment.
      	* tools/compute_local_configurations.cc:
      	Add a comment.
      	* tools/connectivity_numbers_3d.hh: Add a FIXME.
      fea1bdb0
    • Roland Levillain's avatar
      Exercise breadth-first thinning with predicate is_not_1d_isthmus. · d06e84f0
      Roland Levillain authored
      	* apps/generic-skel/image3d-skel-with-1d-isthmuses.cc: New.
      	* apps/generic-skel/Makefile.am (bin_PROGRAMS):
      	Add image3d-skel-with-1d-isthmuses.
      	(image3d_skel_with_1d_isthmuses_SOURCES): New.
      	(TESTS): Add image3d-skel-with-1d-isthmuses.
      	(MOSTLYCLEANFILES): Add
      	image3d-skel-with-1d-isthmuses-input.raw,
      	image3d-skel-with-1d-isthmuses-input.vtk,
      	image3d-skel-with-1d-isthmuses-skel.raw and
      	image3d-skel-with-1d-isthmuses-skel.vtk.
      d06e84f0
    • Roland Levillain's avatar
      Add a non 1D isthmus predicate for (2D and 3D) binary images. · 66dc444e
      Roland Levillain authored
      	* mln/topo/is_not_1d_isthmus.hh: New.
      	* headers.mk, tests/unit_test/unit-tests.mk: Regen.
      66dc444e
    • Roland Levillain's avatar
      Check the consistency of tools/simple_point3d_lut_26_6.hh. · 4b84c24f
      Roland Levillain authored
      	* tools/simple_point3d_lut_26_6.cc: New.
      	* tools/test_simple_point3d_lut_26_6.cc: New.
      	* tools/tools.mk (AM_CPPFLAGS): Add -I$(top_builddir)/milena.
      	* tools/Makefile.am (noinst_LTLIBRARIES): New.
      	Add libsimple_point3d_lut_26_6.la.
      	(libsimple_point3d_lut_26_6_la_SOURCES): New.
      	(EXTRA_PROGRAMS): Add test_simple_point3d_lut_26_6.
      	(test_simple_point3d_lut_26_6_SOURCES)
      	(test_simple_point3d_lut_26_6_LDADD):
      	New.
      4b84c24f
    • Roland Levillain's avatar
      Fix and improve the (fast) computation of 2D connectivity numbers. · 5d26c00a
      Roland Levillain authored
      	* mln/topo/is_simple_2d.hh (mln::connectivity_number_2d): Create
      	the configuration number by considering that the first (resp.
      	last) neighbors (in the forward browsing order) represent the
      	least (resp. most) significant bits of the configuration number,
      	as does the algorithm that computed the 8-c and 4-c LUTs (arrays
      	mln::connectivity_number_c8 and mln::connectivity_number_c4).
      	* mln/topo/connectivity_number_2d.hh: New.
      	* mln/topo/is_simple_point2d.hh: Fix dates in copyright header.
      	* tests/topo/connectivity_numbers_2d.cc: New.
      	* tests/topo/Makefile.am (check_PROGRAMS):
      	Add connectivity_numbers_2d.
      	(connectivity_numbers_2d_SOURCES): New.
      5d26c00a
    • Roland Levillain's avatar
      Add more tests. · d3965a63
      Roland Levillain authored
      	* tests/core/alias/dpoint2d.cc: Exercise the substraction of a
      	dpoint2d from a point2d.
      	* tests/core/alias/neighb2d.cc: New.
      	* tests/core/alias/Makefile.am (check_PROGRAMS): Add neighb2d.
      	(neighb2d_SOURCES): New.
      	* tests/io/dump/dump.cc: Exercise mln::io::dump::load and
      	mln::io::dump::save with 3D binary images.
      	* tests/io/dump/Makefile.am (MOSTLYCLEANFILES):
      	Add dump-bool-3d.dump
      	* tests/value/int_u32.cc: New test (known to fail).
      	* tests/value/Makefile.am (check_PROGRAMS): Add int_u32.
      	(int_u32_SOURCES): New.
      	(XFAIL_TESTS): New.
      	Add int_u32.
      d3965a63
    • Roland Levillain's avatar
    • Roland Levillain's avatar
      Introduce a better VTK output routine in apps/generic-skel. · b8c5c642
      Roland Levillain authored
      	* apps/generic-skel/image3d-skel.hh (save_vtk_polyhedrons):
      	New function.
      	Use it...
      	* apps/generic-skel/image3d-skel-unconstrained.cc,
      	* apps/generic-skel/image3d-skel-with-end-points.cc:
      	...here, instead of save_vtk_polygons.
      b8c5c642
    • Roland Levillain's avatar
      Add a VTK output routine in apps/generic-skel. · a9747656
      Roland Levillain authored
      	* apps/generic-skel/image3d-skel.hh: Aesthetic changes.
      	(save_vtk_polygons): New function.
      	Use it...
      	* apps/generic-skel/image3d-skel-unconstrained.cc,
      	* apps/generic-skel/image3d-skel-with-end-points.cc:
      	...here, to save images in VTK format.
      	* apps/generic-skel/Makefile.am (MOSTLYCLEANFILES):
      	Add image3d-skel-unconstrained-input.vtk,
      	image3d-skel-unconstrained-skel.vtk,
      	image3d-skel-with-end-points-input.vtk and
      	image3d-skel-with-end-points-skel.vtk,
      a9747656
    • Roland Levillain's avatar
      Use package metadata macros instead of hard-coded strings in I/Os. · 7044058a
      Roland Levillain authored
      	* mln/io/fld/write_header.hh (mln::io::fld::write_header)
      	* mln/io/off/save.hh
      	(mln::io::off::internal::off_saver<I, E>::operator())
      	* mln/io/pnm/save_header.hh (mln::io::pnm::save_header)
      	* mln/io/vtk/save.hh
      	(mln::io::vtk::internal::vtk_saver<I, E>::operator()):
      	Here.
      	* mln/version.hh.in (OLN_PACKAGE_URL, OLN_PACKAGE_AUTHORS):
      	New macros.
      7044058a
    • Roland Levillain's avatar
      No longer consider mln/version.hh.in as handled by autoheader. · c7b2885c
      Roland Levillain authored
      	* mln/version.hh.in (OLN_PACKAGE_BUGREPORT, OLN_PACKAGE_NAME)
      	(OLN_PACKAGE_STRING, OLN_PACKAGE_VERSION): Define these macros
      	using "@PACKAGE_BUGREPORT@", "@PACKAGE_NAME@", "@PACKAGE_STRING@"
      	and "@PACKAGE_VERSION@".
      c7b2885c
    • Roland Levillain's avatar
      Remove buggy symbol definitions. · 8c2373f8
      Roland Levillain authored
      	* configure.ac: No longer define OLN_PACKAGE_NAME,
      	OLN_PACKAGE_BUGREPORT, OLN_PACKAGE_STRING and OLN_PACKAGE_VERSION
      	using AC_DEFINE_UNQUOTED.
      8c2373f8
    • Roland Levillain's avatar
      Set connectivity number functions when building is_simple_point3d. · b815f9e2
      Roland Levillain authored
      	* mln/topo/is_simple_point3d.hh
      	(mln::topo::is_simple_point3d<I, N>::init_): New method.
      	(connectivity_number_fun_t): New (private) typedef.
      	(connectivity_number_fg, connectivity_number_bg):
      	New (private) members.
      	Initialize them...
      	(mln::topo::is_simple_point3d<I, N>::is_simple_point3d):
      	...from the ctors, using init_().
      b815f9e2
    • Roland Levillain's avatar
      Fix, factor and improve the (exact) simple 3D point criterion. · c54ade05
      Roland Levillain authored
      	* mln/topo/is_simple_point3d.hh
      	(mln::topo::is_simple_point3d<I, N>::operator()):
      	Honor the neighborhoods.
      	Use the new routines to compute the connectivity numbers instead
      	of computing them directly.
      c54ade05
    • Roland Levillain's avatar
      Add routines to compute 3D connectivity numbers. · e3d31288
      Roland Levillain authored
      	* mln/topo/connectivity_number_3d.hh: New.
      	* headers.mk, tests/unit_test/unit-tests.mk: Regen.
      e3d31288
    • Roland Levillain's avatar
      Improve the generation of simple 3D point look-up tables. · 989f64c9
      Roland Levillain authored
      	* tools/gen_cxx_lut: New script.
      	* tools/Makefile.am (EXTRA_DIST): Add gen_cxx_lut.
      	(simple_point3d_lut_26_6.hh): Add a dependency on
      	$(srcdir)/gen_cxx_lut.
      	Use gen_cxx_lut to generate this target.
      989f64c9
    • Roland Levillain's avatar
      tools: s/simple_point_3d/simple_point3d/. · caafe275
      Roland Levillain authored
      	* tools/simple_point_3d_lut.cc,
      	* tools/simple_point_3d_lut.hh,
      	* tools/simple_point_3d_lut_tbb.hh:
      	Rename as...
      	* tools/simple_point3d_lut.cc,
      	* tools/simple_point3d_lut.hh,
      	* tools/simple_point3d_lut_tbb.hh:
      	...these.
      	* tools/Makefile.am: s/simple_point_3d/simple_point3d/.
      caafe275
    • Roland Levillain's avatar
      New app: apps/generic-skel/image3d-skel-unconstrained. · fd81df40
      Roland Levillain authored
      	* apps/generic-skel/image3d-skel-unconstrained.cc: New.
      	* apps/generic-skel/Makefile.am (bin_PROGRAMS):
      	Add image3d-skel-unconstrained.
      	(image3d_skel_unconstrained_SOURCES): New.
      	(TESTS): Rename as...
      	(generated_tests): New variable.
      	($(generated_tests)): New target.
      	Supersede...
      	(test-image2d-skel-unconstrained test-image2d-skel-with-end-points):
      	...this target.
      	(CLEANFILES): Set to $(generated_tests).
      	(TESTS): Add $(generated_tests).
      	Add image3d-skel-unconstrained and image3d-skel-with-end-points.
      	(MOSTLYCLEANFILES): Add image3d-skel-unconstrained-input.raw and
      	image3d-skel-unconstrained-skel.raw.
      fd81df40
    • Roland Levillain's avatar
      Isolate reusable code from image3d-skel-with-end-points. · 2a45daf1
      Roland Levillain authored
      	* apps/generic-skel/image3d-skel-with-end-points.cc
      	(load_pgm_3d, save_raw_3d, subsampling_3d, draw_torus):
      	Move functions...
      	* apps/generic-skel/image3d-skel.hh: ...here (new file).
      	(make_triple_torus): New function.
      	* apps/generic-skel/Makefile.am (noinst_HEADERS):
      	Add image3d-skel.hh.
      2a45daf1
    • Roland Levillain's avatar
      Add a 3D volume of the Stanford bunny. · adbe79b7
      Roland Levillain authored
      	* img/bunny.pgm: New.
      	From Benjamin Raynal <raynalb@esiee.fr>.
      	Document it...
      	* img/README: ...here.
      	* Makefile.am (dist_img_DATA): Add img/bunny.pgm.
      adbe79b7
    • Roland Levillain's avatar
      New application computing a 3D skeleton preserving end points. · 92370252
      Roland Levillain authored
      	* apps/generic-skel/image3d-skel-with-end-points.cc: New.
      	* apps/generic-skel/Makefile.am (bin_PROGRAMS):
      	Add image3d_skel_with_end_points.
      	(image3d_skel_with_end_points): New.
      	(MOSTLYCLEANFILES): Add image3d-skel-with-end-points-input.raw
      	and image3d-skel-with-end-points-skel.raw.
      92370252
    • Roland Levillain's avatar
      Regen Milena's Makefile helpers. · d31555ad
      Roland Levillain authored
      	* headers.mk, tests/unit_test/unit-tests.mk: Here.
      d31555ad
    • Roland Levillain's avatar
      Add a first version of a simple 3D point predicate. · a746768a
      Roland Levillain authored
      	* mln/topo/is_simple_point3d.hh: New.
      a746768a
    • Roland Levillain's avatar
      Generate a simple 3D points look-up table for the (26,6)-adjacency. · 1692704a
      Roland Levillain authored
      	* tools/Makefile.am (CLEANFILES): New.
      	Add simple_point_3d_lut_26_6.txt and simple_point_3d_lut_26_6.hh.
      	(simple_point_luts): New (phony) target.
      	(simple_point_3d_lut_26_6.txt)
      	(simple_point_3d_lut_26_6.hh):
      	New targets.
      1692704a
    • Roland Levillain's avatar
      Parallel computation of simple 3D point look-up tables. · 8c6f47af
      Roland Levillain authored
      	* tools/simple_point_3d_lut_tbb.hh,
      	* tools/simple_point_3d_lut_tbb.cc:
      	New.
      	* tools/Makefile.am (noinst_HEADERS): Add simple_point_3d_lut_tbb.hh.
      	(EXTRA_PROGRAMS): Add simple_point_3d_lut_tbb.
      	(simple_point_3d_lut_tbb_SOURCES)
      	(simple_point_3d_lut_tbb_CPPFLAGS)
      	(simple_point_3d_lut_tbb_LDFLAGS):
      	New.
      8c6f47af
    • Roland Levillain's avatar
      Sequential computation of simple 3D points look-up tables. · 176f3fd8
      Roland Levillain authored
      	* tools/simple_point_3d_lut.hh,
      	* tools/simple_point_3d_lut.cc:
      	New.
      	* tools/Makefile.am (noinst_HEADERS): Add simple_point_3d_lut.hh.
      	(EXTRA_PROGRAMS): Add simple_point_3d_lut.
      	(simple_point_3d_lut_SOURCES): New.
      176f3fd8
    • Roland Levillain's avatar
      Improve mln::topo::is_simple_2d_t. · 5f10622a
      Roland Levillain authored
      	* mln/topo/is_simple_2d.hh
      	(mln::topo::is_simple_2d_t<N>::nb_connectivity2d):
      	(mln::topo::is_simple_2d_t<N>::nb_connectivity2d__):
      	Use a more reliable method to identify the neighborhood.
      	* mln/topo/is_simple_point2d.hh: Typo in comment.
      5f10622a
    • Roland Levillain's avatar
      Reintroduce is_simple_2d and connectivity_number_2d into mln::topo. · 8a48d807
      Roland Levillain authored
      	* mln/topo/is_simple_2d.hh (mln::topo::is_simple_2d)
      	(mln::topo::connectivity_number_2d):
      	New.
      	* apps/generic-skel/image2d-skel.hh (is_simple_2d::operator()):
      	Adjust.
      8a48d807
    • Roland Levillain's avatar
      Factor connectivity_numbers_3d and connectivity_numbers_3d_tbb. · 8f6e5870
      Roland Levillain authored
      	* tools/connectivity_numbers_3d.hh (connectivity_numbers_3d):
      	Reindent.
      	(connectivity_number_3d__6_26_one)
      	(connectivity_number_3d__6p_18_one)
      	(connectivity_number_3d__18_6p_one):
      	Fix types: s/config_3d_t/conn_number_t/.
      	(usage): New function.
      	(display_connectivity_numbers): New function.
      	Use it to simplify...
      	* tools/connectivity_numbers_3d.cc,
      	* tools/connectivity_numbers_3d_tbb.cc (main): ...these functions.
      	(usage): Remove.
      	* tools/compute_local_configurations.cc,
      	* tools/connectivity_numbers_3d_tbb.hh:
      	Add a comment.
      8f6e5870
    • Roland Levillain's avatar
      Add a parallel version of connectivity_numbers_3d using TBB. · dcb65af6
      Roland Levillain authored
      	* tools/connectivity_numbers_3d_tbb.hh,
      	* tools/connectivity_numbers_3d_tbb.cc:
      	New.
      	* tools/Makefile.am (CPPFLAGS_TBB, LDFLAGS_TBB): New.
      	(extra): New (phony) target.
      	(EXTRA_PROGRAMS)
      	(connectivity_numbers_3d_tbb_SOURCES)
      	(connectivity_numbers_3d_tbb_CPPFLAGS)
      	(connectivity_numbers_3d_tbb_LDFLAGS):
      	New variables.
      dcb65af6
    • Roland Levillain's avatar
      Make tools/connectivity_numbers_3d thread-safe. · 26d28a50
      Roland Levillain authored
      	* tools/connectivity_numbers_3d.hh
      	(connectivity_number_3d__6_26_one)
      	(connectivity_number_3d__26_6_one)
      	(connectivity_number_3d__6p_18_one)
      	(connectivity_number_3d__18_6p_one):
      	Create and use a copy of the neighborhood instead of using a
      	shared, thread-unsafe object.
      	Aesthetic changes.
      	* tools/connectivity_numbers_3d.cc: Aesthetic changes.
      26d28a50
    • Roland Levillain's avatar
      Factor soon-to-be shared components of connectivity_numbers_3d. · b40c467c
      Roland Levillain authored
      	* tools/connectivity_numbers_3d.cc: Move most of the contents of
      	this file into..
      	* tools/connectivity_numbers_3d.hh: ...this (new) file.
      	* tools/Makefile.am (connectivity_numbers_3d_SOURCES):
      	Add connectivity_numbers_3d.hh
      b40c467c
    • Roland Levillain's avatar
      Add a tool to compute 3D connectivity numbers. · 0feab07f
      Roland Levillain authored
      	* tools/connectivity_numbers_3d.cc: New.
      	* tools/Makefile.am (noinst_PROGRAMS):
      	Add connectivity_numbers_3d.
      	(connectivity_numbers_3d_SOURCES): New.
      0feab07f
    • Roland Levillain's avatar
      Have tools/compute_local_configurations compile. · e3b70ab1
      Roland Levillain authored
      	* tools/compute_local_configurations.cc: Add missing header
      	inclusion (mln/value/int_u8.hh).
      	Add copyright notice.
      	* tools/Makefile.am (noinst_PROGRAMS): Add
      	compute_local_configurations.
      	(compute_local_configurations_SOURCES): New.
      e3b70ab1