[vtk-developers] Possible vtkScalarBarActor improvement

Wang, Kevin kevin.wang at rmp.uhn.on.ca
Fri Sep 13 10:46:19 EDT 2013

Hi vtk-developers,

I am developing modules in Slicer and found one limitation in vtkScalarBarActor.

Currently vtk scalarbar widget only shows scalar value as labels. It would be useful in some applications to show the color names as labels. For example: when using the Slicer3_2010_label_Colors color table in slicer, instead of showing the scalar values, it would be nice to show the color names as labels in scalarbar widget. Please find more info about this at http://na-mic.org/Mantis/view.php?id=2919

To enable this feature, I have created a new sub class of vtkScalarBarActor which allows adding color names with a method:

int SetColorName(int ind, const char *name);

It also has a variable to enable/disable using the color as label. Please see the code as https://github.com/kevinwangcanada/Slicer/blob/2919-Add-UseColorNameAsLabel-for-scalarbar-widget/Modules/Loadable/Colors/VTKRendering/vtkSlicerScalarBarActor.h

Before we merge this into the slicer trunk, we would like to know if you think it is relevant and something like this can be merged into VTK. I have also created a ticket for this: http://www.vtk.org/Bug/view.php?id=14272

Thanks for your consideration.


This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
If you have received this e-mail in error, please contact the sender and delete all copies. 
Opinions, conclusions or other information contained in this e-mail may not be that of the organization.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130913/c7e41d87/attachment.html>

More information about the vtk-developers mailing list