<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.nf
        {mso-style-name:nf;}
span.kt
        {mso-style-name:kt;}
span.p
        {mso-style-name:p;}
span.n
        {mso-style-name:n;}
span.k
        {mso-style-name:k;}
span.o
        {mso-style-name:o;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi vtk-developers,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am developing modules in Slicer and found one limitation in vtkScalarBarActor.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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
<a href="http://na-mic.org/Mantis/view.php?id=2919">http://na-mic.org/Mantis/view.php?id=2919</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">To enable this feature, I have created a new sub class of vtkScalarBarActor which allows adding color names with a method:
<span style="font-size:9.0pt;font-family:Consolas;color:#333333;background:white">
 <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas;color:#333333;background:white"><o:p> </o:p></span></p>
<p class="MsoNormal"><span class="kt"><b><span style="font-size:9.0pt;font-family:Consolas;color:#445588;background:white">int</span></b></span><span style="font-size:9.0pt;font-family:Consolas;color:#333333;background:white">
</span><span class="nf"><b><span style="font-size:9.0pt;font-family:Consolas;color:#990000;background:white">SetColorName</span></b></span><span class="p"><span style="font-size:9.0pt;font-family:Consolas;color:#333333;background:white">(</span></span><span class="kt"><b><span style="font-size:9.0pt;font-family:Consolas;color:#445588;background:white">int</span></b></span><span style="font-size:9.0pt;font-family:Consolas;color:#333333;background:white">
<span class="n">ind</span><span class="p">,</span> <span class="k"><b>const</b></span>
</span><span class="kt"><b><span style="font-size:9.0pt;font-family:Consolas;color:#445588;background:white">char</span></b></span><span style="font-size:9.0pt;font-family:Consolas;color:#333333;background:white">
<span class="o"><b>*</b></span><span class="n">name</span><span class="p">);</span></span><span class="p"><o:p></o:p></span></p>
<p class="MsoNormal"><span class="p"><span style="font-size:9.0pt;font-family:Consolas;color:#333333;background:white"><o:p> </o:p></span></span></p>
<p class="MsoNormal">It also has a variable to enable/disable using the color as label. Please see the code as
<a href="https://github.com/kevinwangcanada/Slicer/blob/2919-Add-UseColorNameAsLabel-for-scalarbar-widget/Modules/Loadable/Colors/VTKRendering/vtkSlicerScalarBarActor.h">
https://github.com/kevinwangcanada/Slicer/blob/2919-Add-UseColorNameAsLabel-for-scalarbar-widget/Modules/Loadable/Colors/VTKRendering/vtkSlicerScalarBarActor.h</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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:
<a href="http://www.vtk.org/Bug/view.php?id=14272">http://www.vtk.org/Bug/view.php?id=14272</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for your consideration.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Kevin <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<font face="monospace"><br>
This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. <br>
Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. <br>
If you have received this e-mail in error, please contact the sender and delete all copies. <br>
Opinions, conclusions or other information contained in this e-mail may not be that of the organization.</font></body>
</html>