# Color scalar overlay on VTK models

**URL:** <https://discourse.slicer.org/t/color-scalar-overlay-on-vtk-models/2675>\
**Category:** Development\
**Created:** [April 24, 2018, 5:18pm UTC](https://discourse.slicer.org/t/color-scalar-overlay-on-vtk-models/2675 "2018-04-24T17:18:49Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![RafaelPalomar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rafaelpalomar/32/1436_2.png) [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Post date:** [April 25, 2018, 5:03am UTC](https://discourse.slicer.org/t/color-scalar-overlay-on-vtk-models/2675/4 "2018-04-25T05:03:35Z")

</div>

Hello Priya.

When you say color scalar from an RGB image, does that mean that you want to apply a texture to a model? If so, you can have a look at [GPU-based Projective Texture Mapping in a Loadable Module](https://discourse.slicer.org/t/gpu-based-projective-texture-mapping-in-a-loadable-module/941) and see if you find some answers there.

If what you really want is applying scalar color values, you can have a look at [https://github.com/RafaelPalomar/vtkColorCellsRGBA](https://github.com/RafaelPalomar/vtkColorCellsRGBA) for an example on mapping RGBA scalars to a model (this is a VTK example, but you can use it in 3D Slicer. To enable the visualization of scalars you can use the Models module as suggested by @adamrankin or programmatically by calling vtkMRMLModelDisplayNode::ScalarVisibilityOn() ([http://apidocs.slicer.org/master/classvtkMRMLDisplayNode.html#a9dd055841d24d46216c72f5cce97e6e8](http://apidocs.slicer.org/master/classvtkMRMLDisplayNode.html#a9dd055841d24d46216c72f5cce97e6e8)) from the vtkMRMLModelDisplayNode corresponding to your vtkMRMLModelNode.

I hope this helps.  
Rafael.

---

_[View the full topic](https://discourse.slicer.org/t/color-scalar-overlay-on-vtk-models/2675)._
