Hysen Labs
Open-source project
ilastik/marching_cubes avatar
ilastik

marching_cubes

Standalone marching cubes implementation and Python bindings

100 stars14 forksC++BSD-3-Clause
01
DEEP OPEN-SOURCE ANALYSIS

marching cubes, standalone with Python bindings

A standalone marching cubes implementation with Python bindings, built for the volumina 3D viewer, and chosen over skimage and vtk for reasons the release notes spell out.

02
DEEP OPEN-SOURCE ANALYSIS

Why not skimage or vtk

This project provides a standalone marching cubes implementation with Python bindings, originally built for the volumina 3D viewer. The README argues against the usual alternatives: skimage is called too slow by a factor of 10 to 20 and prone to incorrect normals that make shading look ugly, while vtk is a huge dependency that did not support Python 3.x versions at the time. A later note records that vtk began supporting Python 3.2 through 3.5 with version 7, and 3.5 through 3.8 with version 9. Those are the concrete reasons a library like this gets rewritten by hand. How much a heavy dependency costs is exactly the trade being weighed.

03
DEEP OPEN-SOURCE ANALYSIS

What the releases fixed

Release notes carry the history. Version 0.2 fixed a smoothing rounds count that was off by one, and for consistent results with older versions the smoothing parameter has to be decremented. Version 0.3 fixed a fortran order expectation, since data was previously expected in fortran order and needed a workaround. For anyone using an older release, the decrement note is the compatibility trap to remember.

04
DEEP OPEN-SOURCE ANALYSIS

The C order change

The 0.3 fix means the march function now works with both C order and F order data, removing the earlier transpose workaround entirely. The README is mostly implementation notes and release notes, which suits a small library whose value lives in the details of data handling. The release notes double as a record of the tradeoffs made along the way.

06
DEEP OPEN-SOURCE ANALYSIS

Official sources

07
Community notes

Community notes