Change Color map and add color scale

Hello all,

I did the post-processing on brain images in 3D Slicer. I changed the color coding to display where MR signals values are higher or lower. I need to add the color bar onto the image in order to easily identify what “blue” or “red” color means. Please, in which program is it possible to change the color map and to add the color bar as well? I didn´t manage to do it in 3D Slicer.

Thanks a lot



You can do this all in Slicer.

Edit color table: Go to colors module, choose a color node that you would like to modify, click “Copy” button to create an editable copy (the default color nodes are read-only). If you choose a “color table” type of node (this is the most common) then you get hundreds of predefined colors and you can modify each by double-clicking the color swatch in the color column, which can be tedious if you want to make large changes. It may be more convenient to modify “Continuous” color node, such as “RedGreenBlue” because you can specify a few colors at arbitrary levels and the colors are interpolated between them.

Show scalar bar:

  • Slice views: go to DataProbe module, check “Enable slice view annotations”, check Scalar bar / Enable
  • 3D views: go to Colors module, clone the color table that you use for the volume, set the same min/max range as you have set for your volume, and check Scalar bar / Display scalar bar

I´m working in the Slice view. In the colors module I set the color map and its range. In the colors module I check “Display Scalar bar” and the color range appears but in the 3D views. I would need to add the color scale to the slice views. How can I do it? Moreover, do I have to save separaetely the image and the color range or can one save the image and the color range at the same time?

Thanks a lot

The details from the above post provide the answer to this see below. You can also read → Color bar in slice viewers

If you are wanting to create an image for a presentation or something you can use the “Screen Capture” module to generate an image that includes your image + scalar bar .

thanks a lot. In the Colors module I modify the color table but how can I apply it on the image. I´ve just found it in the “Volumes” module. How can I apply my modified color table onto my image?

You can create editable versions of built-in lookup tables or color maps in the Colors module. See details above.

You can choose which color node is used for displaying a volume in Volumes module.

Hi Andras,
Is it possibel to change the color scalar bar, colors table?

Also how to get the colour table from a model? and use it to change the colour scalar bar colour table?

Also how to set the foreground and background image using scripting for all the views (red, yellow green)?

thank you

Saima Safdar

Color legends has been completely reworked recently in Slicer-4.13. Everything should be simpler and more intuitive and documented here: