Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additive blending of multiple volumes #435

Open
mhaichao opened this issue Jun 4, 2021 · 1 comment
Open

Additive blending of multiple volumes #435

mhaichao opened this issue Jun 4, 2021 · 1 comment

Comments

@mhaichao
Copy link

mhaichao commented Jun 4, 2021

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
Copy link
Author

mhaichao commented Jun 9, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant