Fracois,<br><br>The vtkLookupTable has a method called SetTableRange. With this method you can set the range of your lookup table and this will be visualised in your scalar bar.<br>So your solution would be :<br><br>LuT.SetTableRange
0 256<br><br>Ofcourse this 'solution' does not take into account how you build your lookuptable or what values it presents...<br><br>Regards - Geofram<br><br><div><span class="gmail_quote">On 6/7/07, <b class="gmail_sendername">
Francois Louis LAILLIER</b> <<a href="mailto:flaillier@eldim.fr">flaillier@eldim.fr</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Hello Vtkusers, I have a color scale (a vtkScalarBarActor)
which displays the Look Up Table that I apply on my volume.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">But the Label is scaled 0 to 1. And I want display 0 to 256.
</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">How can I do to change the scale's label?</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Can apply a operation on the "%6.1f" to multiply
the result by 256?</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Do you have some idea?</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">VB code:</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Dim ColorScale As vtkScalarBarActor</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Set ColorScale = New vtkScalarBarActor</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">ColorScale.SetTitle Properties.Cls_Scale_Title</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">ColorScale.SetLookupTable LuT</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">ColorScale.SetOrientationToVertical</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">ColorScale.SetLabelFormat "%6.1f" 'How
can change this?</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Renderer.AddActor ColorScale</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">RenWin.Render</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Thanks' in advance</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Best regards, Francois Louis.</span></font></p>
</div>
</div>
<br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br><br></blockquote></div><br>