vedo
vedo copied to clipboard
vedo marching cubes algorithm
Hey thanks for the wonderful library. I am also looking into vtk but the documentation and the examples seem really opaque.
I was wondering if the marching cubes algorithm in vedo is the same as the marching cubes in vtk. Is it the discreteMarchingCubes algorithm. or does the volume.isosurface follow some other algorithm.
Also in terms of functionality can I do almost everything in vtk in vedo as well or does vtk have better implementations, I ask this because the documentation says vedo is based entirely on vtk and numpy.
Thanks,
- Yes,
vedois a wrapper around vtk so it mostly runs the same algorithms. In the case of isosurfacing it is byvtkContourFilter. - I would say that if you cannot do something in
vedoyou can still access any native vtk objects you need.
ah thanks a lot is there a way to use vtk.discreteMarchingCubes. Also on a related note. When I load a 3d numpy array as a volume object and then extract the mesh from it. I notice that there is some kind of coordinate transformation. For example the point in the numpy array at x, y, z is no longer at that point in the mesh. Is there a way to get this coordinate transformation so that I can transform the mesh points back to the numpy array coordinates
ah thanks a lot is there a way to use vtk.discreteMarchingCubes.
It's not implemented. But you can still mix vtk and vedo easily and seamlessly, see examples:
examples/volumetric/streamlines2.py
examples/volumetric/tensors.py
examples/volumetric/tensor_grid.py
Also on a related note. When I load a 3d numpy array as a volume object and then extract the mesh from it. I notice that there is some kind of coordinate transformation. For example the point in the numpy array at x, y, z is no longer at that point in the mesh. Is there a way to get this coordinate transformation so that I can transform the mesh points back to the numpy array coordinates
Uhm, can you make an example? It might be a different convention or half bin shift..