Change 'order' of rendering of multiple volumes with Volume Rendering module

Is it possible to change the ‘order’ of the rendering layers in the Volume Rendering module?

What I want to achieve: CT maximum intensity projection (mostly transparent except for bones) overlaid on PET maximum intensity projection (fully opaque).

Problem: CT has to be added to scene last to get the Volume Rendering visualization I want. If I add the CT first, then it is ‘hidden’ behind any opaque regions of volumes added after it:

Any help would be appreciated! Currently I am just using the Crop module to create a “new” CT volume at the end of my workflow, so it is the top layer of the render. Thanks!

Hmm, you might be able to clone the CT and then delete the original. Otherwise I don’t think we expose any way to control that ordering.

I guess you use VTK GPU Ray Casting rendering mode. That one is designed to render a single volume, so indeed there is an order of rendering.

The volume renderer that can consider multiple volumes is the VTK Multi-Volume (experimental) option. However, some features that are exposed in the Volume Rendering module and applies to the default GPU renderer are not implemented in this one. You can try this mode and see if it covers your use case.

Thanks! This works and is faster than using the CropVolume module like I have been doing.

It might be nice if the renders are always ‘stacked’ in the order they are shown - i.e., clicking the ‘show’ toggle button for a volume moves it to the front. Not sure if that would be easy for me to achieve with python…

Thanks, yes I was using GPU Ray Casting. The VTK Multi-Volume option doesn’t work for me (nothing is displayed at all) with the “Maximum Intensity Projection” technique, which I usually need for nuc med images. It works great with the 'Composite with Shading" technique though.

1 Like