How to display 2 volumes with transparences

As a title I’m curious to know how to display 2 or more volume in the same scene, with transparence effect, to show internal anatomic structures


In python interface:
Perhaps by:

Hello. Thank you for reply but I’m a beginner user and I’m able to use only a graphic interface… :frowning:

do you mean a result like this?


I’ve done with philips workstation, but i’m interest too to have a similar result with Slicer… I will try

In general, anatomical images are complex enough that display them by simple blending has limited use. You can try it easily in slice views, select one volume as foreground, another one as background, and adjust the foreground visibility slider.

What works quite well (but of course somewhat more work) is to segment relevant structures from at least one of the volumes, and display those segments overlaid on the other volume. The non-segmented volume can be visualized using Volume rendering module. Segments can be made transparent in 3D views by adjusting display settings in Segmentations module.

I’ve 3 volume in volume rendering:

  • the mail volume (dataset base)
  • volume 1 segmented from main volume using mask
  • volume 2 , similare to volume 1 but not sliglty different

In volume rendering I can display correctly each of them but not all together ???!!

Yes, you can show one volume using volume rendering at a time, all the others have to be segmented. By using Segment Editor module, you can often create high-quality Segmentations quite easily.

Multiple volume rendering may be added to VTK in the near future and then we’ll enable that in Slicer as well.

1 Like

but we can display multiple model as here?

I need to save segmentation as model?

Yes, of course. You can adjust display parameters of all segments globally or individually for each segment - in Segmentations module Display section. If you prefer, you can also export all segments to model nodes using Export/Import section.

1 Like

Good, I’ve downloaded the pre-made model

I’ve see that we can use a different opacity for simultaneus 3D models

Note that you can also access these anatomical atlases conveniently in Data Store module (Slicer automatically downloads and caches the selected atlas and other sample data sets).

1 Like


here my first segmentation :slight_smile:
no possible to export in png with TRASPARENT background?

Nice work!

We haven’t added GUI for exporting a screenshot in a PNG file with transparent background, but you can easily do it:

  1. Press Ctrl+3 to open Python console
  2. Copy-paste “Capture 3D view into PNG file with transparent background” script from Script repository

If you need animations with transparent background then you could add these few lines to the ScreenCapture module (and a checkbox that enables/disables transparent background mode). To edit a module, enable Developer mode in Application Settings and click on Edit button at the top of the module GUI. If you managed to implement this then send us a pull request and we’ll be happy to integrate it.

1 Like

Hey @lassoan, would it be possible to do this on the simpler Annotation Snap(Screen) Shot. I figure some logic like that would be necessary before and after the screenshot is called:

Following the logic currently on the python module. Would that be desirable? Sometimes the user wants to grab a quick screenshot and the annotation screenshot is the quicker a cleaner option.

Since the Annotations module is currently legacy and will be removed in the future, it would be better to modify the Screen Capture module to do what you want as modifying the annotations module is something not going to be supported.

1 Like

Thanks. I will work on simplifying the Screen Capture.

1 Like

Currently, the fastest way of copying 3D view content is the context menu (right-click menu) in the view:

In addition to adding a “transparent background” option to the Screen Capture module, we could also add a “Copy image with transparent background” action to the view context menu.

A post was split to a new topic: Segmentation exported to model file and imported does not preserve transparency