marcomusy / vedo

A python module for scientific analysis of 3D data based on VTK and Numpy
https://vedo.embl.es
MIT License
2.05k stars 266 forks source link

Projection on volume of interest #211

Closed horsto closed 4 years ago

horsto commented 4 years ago

Hi! I have the following problem: In my application I want to map a 2D heatmap (numpy array) onto the surface of a mesh. image

As in the figure shown above I know the y / z position of that heatmap. Now what I am doing is just creating a "dummy" heatmap volume (the pink cylinder in the figure) by replicating the array in x. What I want is just the projection of my heatmap (the intersection area) on my mesh of interest (the car in the figure above). Is there a way to do this? How would go about it?

marcomusy commented 4 years ago

Hi @horsto I'm not exactly sure, if I understand what your aiming for, you might consider mapping your heatmap values onto a mesh by using interpolateDataFrom(), check out new examples: pip install -U git+https://github.com/marcomusy/vedo.git

vedo -r interpolateMeshArray vedo -r interpolateScalar1