Closed antonfrancois closed 2 years ago
Hi not sure if I understand what you're trying to achieve.. what is the data content of the voxel? just a mask? If so you can look at binarize() : https://github.com/marcomusy/vedo/blob/7c7f2adc2e7fee4c881c9bfff3a3c9e709010dd0/examples/volumetric/mesh2volume.py
Exactly the reverse application of the Numpy2volume example.
that's simply vol.tonumpy()
Thank you, I was looking for the 'tonumpy()' answer. I find you library really well made, and it turned very useful for me to use in my PhD, project. However I find it a bit difficult to find some simple answers like that, leading me to ask dumb question. I went reading the code of the Volume class, parsed the autodoc, looked at some example from your website and didn't found the answer. (Now that I know that the method is called tonumpy() I quickly found that it is located in the BaseVolume class.)
I guess it comes from the fact that there is not active activity on Stackoverflow yet. Anyway, thank you again for your quick answer, I hope that my questions will help future users. Anton
Thanks Anton for reporting and for the useful feedback on the documentation.
No dumb question! The vedo
library now exposes a quite large number of functionalities and it's not trivial to find the one that matters for a user specific case... so feel free to ask if you have any doubts.
Hello,
I am trying to get a volumetric image from a mesh. Exactly the reverse application of the Numpy2volume example. I want to make a mesh in Blender and generate a volumetric image from it, (a bit like a MRI). I figured that is is possible to 'hack' vedo to so, as a vtk vrapper.
For now I managed to make it look like a volumetric image using the following code. However is there an easy way to get a 3D numpy array ?
Thank you !