1. 30 Aug, 2013 40 commits
    • 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
    • Roland Levillain's avatar
      Import the computation of (2D) connectivity numbers from sandbox. · 0d75e39a
      Roland Levillain authored
      	* tools/compute_local_configurations.cc: New.
      	Imported from
      	sandbox/inim/2009/ocr/compute_local_configurations.cc.
      0d75e39a
    • Roland Levillain's avatar
      cd1d4e98
    • Roland Levillain's avatar
      New apps on generic skeletonization. · 064910db
      Roland Levillain authored
      	* apps/generic-skel/image2d-skel-unconstrained.cc,
      	* apps/generic-skel/image2d-skel-with-end-points.cc,
      	* apps/generic-skel/image2d-skel.hh:
      	New.
      	* apps/generic-skel/test-image2d-skel-unconstrained.in,
      	* apps/generic-skel/test-image2d-skel-with-end-points.in:
      	New tests.
      	* apps/generic-skel/Makefile.am: New.
      	* apps/Makefile.am (SUBDIRS): Add generic-skel.
      064910db
    • Roland Levillain's avatar
      apps/graph-morpho: Catch up with current mln::topo::is_n_face. · d56e10be
      Roland Levillain authored
      	* apps/graph-morpho/morpho.hh
      	(trait::graph< mln::complex_image<1, G, V> >::is_vertex)
      	(trait::graph< mln::complex_image<1, G, V> >::is_edge):
      	Fix the return type.
      d56e10be
    • Roland Levillain's avatar
      Use priority-driven thinning in collapse-based thinnings apps. · ac042519
      Roland Levillain authored
      	* apps/mesh-segm-skel/mesh-complex-max-curv-2-collapse.cc,
      	* apps/mesh-segm-skel/mesh-complex-max-curv-1-collapse.cc:
      	Here.
      ac042519
    • Roland Levillain's avatar
      Simplify curvature-based thinnings using 2- and 1-collapses apps. · c8994ac3
      Roland Levillain authored
      	* apps/mesh-segm-skel/mesh-complex-max-curv-2-collapse.cc,
      	* apps/mesh-segm-skel/mesh-complex-max-curv-1-collapse.cc:
      	Here.
      c8994ac3
    • Roland Levillain's avatar
      Miscellaneous changes in mesh-related operations. · ae5b2f20
      Roland Levillain authored
      	* mln/topo/is_simple_cell.hh: Add static preconditions.
      	Reduce the number of pointer manipulations.
      	Aesthetic changes.
      	* mln/topo/detach_cell.hh: Move a static precondition.
      	Aesthetic changes.
      	* mln/io/vtk/save.hh: Cosmetic changes.
      ae5b2f20
    • Roland Levillain's avatar
      New apps: max curvature-based thinnings using 2- and 1-collapses. · aa7f3d1c
      Roland Levillain authored
      	* apps/mesh-segm-skel/mesh-complex-max-curv-2-collapse.cc,
      	* apps/mesh-segm-skel/mesh-complex-max-curv-1-collapse.cc:
      	New.
      	* apps/mesh-segm-skel/test-mesh-complex-max-curv-2-collapse.in,
      	* apps/mesh-segm-skel/test-mesh-complex-max-curv-1-collapse.in:
      	New.
      	* apps/mesh-segm-skel/Makefile.am (bin_PROGRAMS):
      	Add mesh-complex-max-curv-2-collapse.
      	And mesh-complex-max-curv-1-collapse
      	(mesh_complex_max_curve_2_collapse_SOURCES)
      	(mesh_complex_max_curve_1_collapse_SOURCES):
      	New.
      	(edit): New.
      	(test-mesh-complex-max-curv-2-collapse)
      	(test-mesh-complex-max-curv-1-collapse):
      	New target.
      	(TESTS, CLEANFILES): Add test-mesh-complex-max-curv-2-collapse
      	and test-mesh-complex-max-curv-1-collapse.
      	(MOSTLYCLEANFILES): Add teapot-max-curv-2-collapse.vtk,
      	bunny-holefilled-max-curv-2-collapse.vtk,
      	teapot-max-curv-1-collapse.vtk and
      	bunny-holefilled-max-curv-1-collapse.vtk.
      aa7f3d1c
    • Roland Levillain's avatar
      Add VTK versions of some OFF meshes. · 887a3fe1
      Roland Levillain authored
      	* mesh/bunny-holefilled.vtk,
      	* mesh/teapot.vtk:
      	New.
      	Generated from mesh/bunny-holefilled.off and mesh/teapot.off using
      	apps/mesh-segm-skel/off-to-vtk-bin.
      	* mesh/Makefile.am (dist_mesh_DATA): Add bunny-holefilled.vtk and
      	teapot.vtk.
      887a3fe1
    • Roland Levillain's avatar
      New app: binary OFF to VTK mesh conversion. · 2ab706df
      Roland Levillain authored
      	* apps/mesh-segm-skel/off-to-vtk-bin.cc: New.
      	* apps/mesh-segm-skel/Makefile.am
      	(bin_PROGRAMS): Add off-to-vtk-bin.
      	(off_to_vtk_bin_SOURCES): New.
      2ab706df
    • Roland Levillain's avatar
      New app performing a 2-collapse on a mesh. · 050eff13
      Roland Levillain authored
      	* apps/mesh-segm-skel/mesh-complex-2-collapse.cc: New.
      	* apps/mesh-segm-skel/test-mesh-complex-2-collapse.in: New.
      	* apps/mesh-segm-skel/Makefile.am (bin_PROGRAMS):
      	Add mesh-complex-2-collapse.
      	(mesh_complex_2_collapse_SOURCES): New.
      	(edit): New.
      	(test-mesh-complex-2-collapse): New target.
      	(TESTS, CLEANFILES): Add test-mesh-complex-2-collapse.
      	(MOSTLYCLEANFILES): Add pseudo-manifold-2-collapse.vtk.
      050eff13
    • Roland Levillain's avatar
      Prevent a site from being introduced twice in thinning's queues. · b97c12ae
      Roland Levillain authored
      	* mln/topo/skeleton/breadth_first_thinning.hh,
      	* mln/topo/skeleton/priority_driven_thinning.hh:
      	Use an image `in_queue' to tag sites inserted in the queue.
      b97c12ae
    • Roland Levillain's avatar
      Add routines to identify and detach (collapse) simple pairs. · 6cb33ef7
      Roland Levillain authored
      	* mln/topo/is_simple_pair.hh,
      	* mln/topo/detach_pair.hh:
      	New.
      	* tests/topo/is_simple_pair.cc,
      	* tests/topo/detach_pair.cc:
      	New tests.
      	* tests/topo/Makefile.am (check_PROGRAMS): Add is_simple_pair and
      	detach_pair.
      	(detach_pair_SOURCES, is_simple_pair_SOURCES): New.
      	(MOSTLYCLEANFILES): New.  Add detach_pair-out.vtk.
      6cb33ef7
    • Roland Levillain's avatar
      Add preliminary VTK input for binary images. · 2bc617f4
      Roland Levillain authored
      	* mln/io/vtk/load.hh: New file.
      	Include it...
      	* mln/io/vtk/all.hh: ...here.
      	* tests/io/vtk/load_bin.cc,
      	* tests/io/vtk/load_save_bin.cc:
      	New.
      	* tests/io/vtk/Makefile.am (check_PROGRAMS): Add load_bin and
      	load_save_bin.
      	(load_bin_SOURCES, load_save_bin_SOURCES): New.
      	(MOSTLYCLEANFILES): Add load_save_bin-out.vtk.
      2bc617f4
    • Roland Levillain's avatar
      Add VTK-format meshes. · 5f4400b1
      Roland Levillain authored
      	* mesh/tetrahedron.vtk,
      	* mesh/pseudo-manifold.vtk:
      	New.
      	* mesh/Makefile.am (dist_mesh_DATA): Add tetrahedron.vtk and
      	pseudo-manifold.vtk.
      5f4400b1
    • Roland Levillain's avatar
      Add a pre-allocation routine to mln::geom::complex_geometry. · e52aac02
      Roland Levillain authored
      	* mln/geom/complex_geometry.hh
      	(mln::geom::complex_geometry<D, P>::reserve): New.
      	Use it...
      	* mln/io/off/load.hh: ...here.
      	Aesthetic changes.
      e52aac02
    • Roland Levillain's avatar
      Small corrections in apps/mesh-segm-skel. · 8f71dbf3
      Roland Levillain authored
      	* apps/mesh-segm-skel/test-mesh-segm.in: Remove erroneous
      	execution permission.
      	* apps/mesh-segm-skel/test-mesh-complex-max-curv-extrema.in:
      	Add a missing copyright header.
      8f71dbf3
    • Roland Levillain's avatar
      Exercise topology-related routines. · ed99a969
      Roland Levillain authored
      	* tests/core/image/complex_image.hh
      	(make_test_bin_2complex_image2d): New function.
      	* tests/topo/is_facet.cc,
      	* tests/make/detachment.cc,
      	* tests/make/attachment.cc:
      	New.
      	* tests/topo/Makefile.am (check_PROGRAMS): Add is_facet.
      	(is_facet_SOURCES): New.
      	* tests/make/Makefile.am (check_PROGRAMS): Add attachment and
      	detachment.
      	(attachment_SOURCES, detachment_SOURCES): New.
      ed99a969