1

I'm looking for an alternative of marching cubes from vtk. It must have binding to python. Does it exist?

Sarah_A
  • 150
  • 4
  • 18
tfmoraes
  • 696
  • 1
  • 8
  • 18

2 Answers2

1

pythonisosurfaces contains an implementation here, although it needs a little bit of separation from its webapp trappings. "New BSD" license. I have used this code as a basis for isosurface generation in one of my own projects and it works well... up to a point; the memory consumption associated with it's datastructures somewhat limits its practicality for large meshes, and python isn't the fastest thing in the world. (If you outgrow this implementation you're probably looking for something more numpy compatible, probably implemented at numpy's 'C'-code level.)

timday
  • 24,582
  • 12
  • 83
  • 135
1

The Contour Filter produces an isosurface from a 3D image dataset. Depending on your dataset, the Slice Cubes algorithm should also do the trick.

gavinb
  • 19,278
  • 3
  • 45
  • 60
  • Thanks gavinb. But I was thinking in other lib that implements marching cubes. – tfmoraes Dec 19 '10 at 00:43
  • Oh, I see. Then try [PyOpenDX](http://people.freebsd.org/~rhh/py-opendx/index.html) which is the Python bindings to IBM's [OpenDX](http://www.opendx.org/) visualisation library. – gavinb Dec 19 '10 at 06:53
  • Another visualisation lib option is Mayavi/mlab; see answer at http://stackoverflow.com/questions/6030098/how-to-display-a-3d-plot-of-a-3d-array-isosurface-in-matplotlib-mplot3d-or-simil . Not sure how easy it would be to get hold of the isosurface as a data structure. – timday Aug 25 '12 at 16:32