# Volume rendering colorized with segmentation

**URL:** <https://discourse.slicer.org/t/volume-rendering-colorized-with-segmentation/26689>\
**Category:** Development\
**Tags:** segmentation, volume-rendering\
**Created:** [January 18, 2021, 11:12pm UTC](https://discourse.slicer.org/t/volume-rendering-colorized-with-segmentation/26689 "2021-01-18T23:12:45Z")\
**Posts on this page:** 1\
**Showing post:** 26

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 15, 2023, 9:49pm UTC](https://discourse.slicer.org/t/volume-rendering-colorized-with-segmentation/26689/26 "2023-10-15T21:49:33Z")

</div>

@ME_Rad - in case you missed it, there’s been some progress in fixing the underlying rendering code and adding a module in the sandbox extension that exposes this technique for end users.

See these links some example images and movies including TotalSegmentator labels.

> <https://github.com/Slicer/VTK/pull/43>
>
> Implements the feature and fixes discussed in this thread:
> 
> https://discourse.…slicer.org/t/volume-rendering-colorized-with-segmentation/26689/6
> 
> Basically allows RGBA volumes to be shaded according to their alpha component so that something like a CT or microCT can define an rgb value at spatial regions, while getting opacity and gradient information from the alpha channel (e.g. the Hounsfield unit).
> 
> Also always uses the 0 channel for defining the lighting parameters. This part is WIP since it may be more appropriate to set the alpha channel lighting parameters in this scenario. Currently, at least in 3D Slicer, only the 0 compnent's lighting parameters are being set, so they are being used here.

> <https://github.com/PerkLab/SlicerSandbox/tree/master/ColorizeVolume>
>
> //github.com/PerkLab/SlicerSandbox/tree/master/ColorizeVolume

> [@VTK multivolume/cinematic volume rendering](https://discourse.slicer.org/t/vtk-multivolume-cinematic-volume-rendering/31981/22):
>
> OMG! This is a game changer for us. We just now a way to adjust TF per segment basis somehow… And regular shadows/lights work great, just need the ambient shadows as @lassoan mentioned.

---

_[View the full topic](https://discourse.slicer.org/t/volume-rendering-colorized-with-segmentation/26689)._
