Siafu is a tiny utility program for extracting isosurfaces from volumetric data. The program loads a 3D volume from a sequence of uncompressed TIFF files, extracts an isosurface using the marching cubes algorithm1, and outputs a model in .ply
, .obj
, or .stl
format. Siafu is written in C++23 with zero dependencies.
git clone https://github.com/cjhoward/siafu.git && cd siafu
cmake -B build
cmake --build build --config Release --target install
usage: siafu [--version] [--help]
<volume_path> <isolevel> <output_file>
volume_path
: Path to a sequence of uncompressed TIFF files.isolevel
: Threshold value for isosurface extraction.output_file
: Output file path and format. Supported file formats include.ply
,.obj
, and.stl
. If the output file extension is unrecognized, the.ply
format will be used.
--version
: Display the version number.--help
: Display usage information.
Load a volume from the data/ant
directory, extract an isosurface at isolevel 500
, and save the isosurface as ant.ply
:
siafu data/ant 500 ant.ply
Load a volume from the C:\beetle
directory, extract an isosurface at isolevel 123.4
, and save the isosurface as beetle.obj
:
siafu C:\beetle\001.tif 123.4 beetle.obj
Contributions are welcome! Feel free to open an issue or submit a pull request.
Footnotes
-
Bourke, P. (1994). Polygonising a scalar field. https://paulbourke.net/geometry/polygonise/ ↩