<div dir="ltr">Drak,<div><br></div><div>To add arbitrary labels, you can use the annotations mechanism.</div><div><br></div><div>See, for example, <a href="http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Rendering/Annotation/Testing/Cxx/TestScalarBar.cxx">http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Rendering/Annotation/Testing/Cxx/TestScalarBar.cxx</a></div><div><br></div><div>Best,</div><div>Cory</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 14, 2015 at 11:57 AM, Drak <span dir="ltr"><<a href="mailto:draktharrblorf@gmail.com" target="_blank">draktharrblorf@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Is there any way to get the scalar bar to not automatically set my labels to<br>
a linear value?<br>
<br>
I would like to access the labels table and change myself the value so it<br>
follows my own formula.<br>
<br>
// scalar bar<br>
_hueLut = vtkLookupTable::New();<br>
_hueLut->SetNumberOfTableValues(100);<br>
_hueLut->SetTableRange(0, 100);<br>
_hueLut->SetTableValue(0, 0, 0, 1);<br>
_hueLut->SetTableValue(1, 0, 1, 0);<br>
//etc...<br>
_hueLut->Build();<br>
<br>
<br>
_scalarBar = vtkScalarBarActor::New();<br>
_scalarBar->SetLookupTable(_hueLut);<br>
_scalarBar->SetTitle("logarithm scalar bar");<br>
_scalarBar->SetNumberOfLabels(5);<br>
_scalarBar->SetLabelFormat("%5.4g");<br>
<br>
The problem is that my scalar bar labels seems to show the value 0, 25, 50,<br>
75 and 100. I want to be able to change the labels value. For example: 0,<br>
10, 25, 50, 100.<br>
<br>
Thank you.<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/vtkScalarBar-with-non-linear-labels-tp5733498.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/vtkScalarBar-with-non-linear-labels-tp5733498.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div>