pyvista / pyvista-support

[moved] Please head over to the Discussions tab of the PyVista repository
https://github.com/pyvista/pyvista/discussions
60 stars 4 forks source link

Additive blending of multiple volumes #435

Open mhaichao opened 3 years ago

mhaichao commented 3 years ago

Description

Hi,

I am working on visualizing microscopy data that have multiple channels. These channels are basically co-registered volumes and I would like to render them at the same time using different color maps and then blend the pixel colors additively. However, adding multiple volumes to the plotter (plotter.add_volume(volume, opacity=[1], cmap=cmap, blending=maximum) ) overwrites the previously added volumes and only the last one is shown. I guess that’s because of the opaque opacity function. I would just like to add together the RGB values of the pixels, so basically additive blending in image space. Is there a good way to do this in pyvista?

Thanks Haichao

Example Data

mhaichao commented 3 years ago

I tried using a MultiBlock and call add_volume(block,...) but this seem to do the same thing as adding the volumes individually, except that I lose control over the color maps to be used for each volume [1]. Is there any way to achieve have control over color blending (in image space) in pyvista?

[1] https://github.com/pyvista/pyvista/blob/master/pyvista/plotting/plotting.py#L2014