/siafu

🧊 Isosurface extraction utility written in C++23 with zero dependencies.

Primary LanguageC++MIT LicenseMIT

Siafu

build code quality

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.

Table of Contents

Install

git clone https://github.com/cjhoward/siafu.git && cd siafu
cmake -B build
cmake --build build --config Release --target install

Usage

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.

Options

  • --version: Display the version number.
  • --help: Display usage information.

Examples

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

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

Authors

License

REUSE compliance

  • Siafu source code is licensed under MIT.
  • Siafu documentation is licensed under CC0-1.0.

Footnotes

  1. Bourke, P. (1994). Polygonising a scalar field. https://paulbourke.net/geometry/polygonise/ ↩