Cleaver2 Release Source Code
This is the open-source repository for Cleaver2, a tetrahedral meshing tool. This distribution comes with both a command-line interface, and a GUI.
The Cleaver Library is based on the 'Lattice Cleaving' algorithm:
Bronson J., Levine, J., Whitaker R., "Lattice Cleaving: Conforming Tetrahedral Meshes of Multimaterial Domains with Bounded Quality". Proceedings of the 21st International Meshing Roundtable (San Jose, CA, Oct 7-10, 2012)
The method is theoretically guaranteed to produce valid meshes with bounded dihedral angles, while still conforming to multimaterial material surfaces. Empirically these bounds have been shown to be significant.
Cleaver is an Open Source software project that is principally funded through the SCI Institute's NIH/NIGMS CIBC Center. Please use the following acknowledgment and send us references to any publications, presentations, or successful funding applications that make use of NIH/NIGMS CIBC software or data sets.
"This project was supported by the National Institute of General Medical Sciences of the National Institutes of Health under grant number P41GM103545."
Author: Jonathan Bronson
Contributor: Ross Whitaker
Contributor: Josh Levine
Contributor: Shankar Sastry
Developer: Brig Bagley
Requirements: Git, CMake, Qt4 -OR- Qt5
Optional Requirements: SCIRun4 (For segmentation tools)
Suggested: QtCreator cross-platform IDE
We recommend building cleaver outside of the source tree.
From Cleaver2 directory:
mkdir build
cd build
cmake ../src
make
NOTE: You may need to set your Qt build variables:
cmake -DQt5Widgets_DIR="/usr/lib/Qt/5.3.0/gcc/lib/cmake/Qt5Widgets" -DQt5OpenGL_DIR="/usr/lib/Qt/5.3.0/gcc/lib/cmake/Qt5OpenGL"../src
From Developer Command Prompt: (e.g. Visual Studio 10 (32bit))
mkdir build
cd build
cmake ../src
nmake
NOTE: If you do not have your development environment paths set up, you can set them with cmake-gui, qt-creator, or pass library paths directly to command line like below:
NOTE: To include Segmentation Tools in your build, you must set your SCIRun4 directory:
cmake -DSCIRun4_DIR="/Path/To/SCIRun" ../src
**NOTE**: Since the segmentation tools make system calls, it is important that you provide the full path to the segmentation file (not a relative path).
Inside of your build directory:
bin/cleaver-gui
Or, for the command line tool:
bin/cleaver-cli --help
For a list of command line tool options.
Command line flags:
-h [ --help ] display help message
-v [ --verbose ] enable verbose output
--version display version information
--material_fields arg material field paths
--background_mesh arg input background mesh
--mesh_mode arg background mesh mode
--mesh_improve improve background quality
--alpha arg initial alpha value
--alpha_long arg alpha long value for regular mesh_mode
--alpha_short arg alpha short value for regular mesh_mode
--sizing_field arg sizing field path
--grading arg sizing field grading
--multiplier arg sizing field multiplier
--scale arg sizing field scale
--padding arg volume padding
--accelerate use acceleration structure
--write_background_mesh write background mesh
--strip_exterior strip exterior tetrahedra
--output_path arg output path prefix
--output_name arg output mesh name
--output_format arg output mesh format
--strict warnings become errors
The repo comes with a set of regression tests to see if recent changes break expected results. To build the tests, you will need to set BUILD_TESTING
to "ON" in either ccmake
or when calling CMake:
cmake -DBUILD_TESTING=ON ../src
cmake -DBUILD_TESTING=ON -Dgtest_forced_shared_crt=ON ../src
Be sure to include all other necessary CMake definitions as annotated above.
- On larger data sets with a potentially high number of quadruple points (> 3 material fields), some functions are failing to ensure valid tets and meshes, causing bad tets in the final output. This code is being debugged now for a future release.