<div dir="ltr">Hi Kevin, <div><br></div><div style>I think it makes sense to contribute this back to VTK. I would suggest to first contribute your improvement as a VTK-6 topic. </div><div style><br></div><div style>See <a href="http://www.vtk.org/Wiki/VTK/Git/Develop">http://www.vtk.org/Wiki/VTK/Git/Develop</a><br>
</div><div style><br></div><div style>In the mean, waiting it his fully reviewed, integrated and then eventually backported to VTK 5.10 release branch, we could integrate it to the SlicerVTK clone. See <a href="https://github.com/Slicer/VTK">https://github.com/Slicer/VTK</a></div>
<div style><br></div><div style>Thanks for contributing to VTK, </div><div style>Jc</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 13, 2013 at 10:46 AM, Wang, Kevin <span dir="ltr"><<a href="mailto:kevin.wang@rmp.uhn.on.ca" target="_blank">kevin.wang@rmp.uhn.on.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hi vtk-developers,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am developing modules in Slicer and found one limitation in vtkScalarBarActor.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></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" target="_blank">http://na-mic.org/Mantis/view.php?id=2919</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></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">
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas;color:#333333;background:white"><u></u> <u></u></span></p>
<p class="MsoNormal"><span><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><b><span style="font-size:9.0pt;font-family:Consolas;color:#990000;background:white">SetColorName</span></b></span><span><span style="font-size:9.0pt;font-family:Consolas;color:#333333;background:white">(</span></span><span><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>ind</span><span>,</span> <span><b>const</b></span>
</span><span><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><b>*</b></span><span>name</span><span>);</span></span><span><u></u><u></u></span></p>
<p class="MsoNormal"><span><span style="font-size:9.0pt;font-family:Consolas;color:#333333;background:white"><u></u> <u></u></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" target="_blank">
https://github.com/kevinwangcanada/Slicer/blob/2919-Add-UseColorNameAsLabel-for-scalarbar-widget/Modules/Loadable/Colors/VTKRendering/vtkSlicerScalarBarActor.h</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></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" target="_blank">http://www.vtk.org/Bug/view.php?id=14272</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks for your consideration.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Kevin <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></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></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>+1 919 869 8849<br>
</div>