<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 9pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body><div style="text-align: left;">Hi, I am new to VTK and do not know how vtkLookupTable work, I have an array of points with scalar value 0-1500, and I want to map them to different colors, so I do:<br><br>&nbsp;&nbsp;&nbsp; vtkLookupTable *bwLut = vtkLookupTable::New();<br>&nbsp;&nbsp;&nbsp; bwLut-&gt;SetTableRange(0, 1536);<br>&nbsp;&nbsp;&nbsp; bwLut-&gt;SetNumberOfColors(256);<br>&nbsp;&nbsp;&nbsp; bwLut-&gt;SetHueRange (0.6667, 0.0);<br>&nbsp;&nbsp;&nbsp; bwLut-&gt;SetSaturationRange (1.0, 1.0);<br>&nbsp;&nbsp;&nbsp; bwLut-&gt;SetValueRange (1.0, 1.0);<br>&nbsp;&nbsp;&nbsp; bwLut-&gt;Build();<br><br>&nbsp;&nbsp;&nbsp;&nbsp; vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();<br>&nbsp;&nbsp;&nbsp; mapper-&gt;SetLookupTable(bwLut);<br>&nbsp;&nbsp;&nbsp; mapper-&gt;SetInputConnection(clipper-&gt;GetOutputPort());<br>&nbsp;&nbsp;&nbsp; mapper-&gt;SetColorModeToMapScalars ();<br>&nbsp;&nbsp;&nbsp; mapper-&gt;UseLookupTableScalarRangeOn();<br><br>But the entire image is blue everywhere, please help on correctly displaying colors with scalars.<br><br>thanks<br><br>hank <br></div><br /><hr />中国十大热门旅游景点 <a href='http://search.msn.com/results.aspx?q=%E4%B8%AD%E5%9B%BD%E5%8D%81%E5%A4%A7%E9%A3%8E%E6%99%AF&mkt=zh-CN&form=QBRE' target='_new'>了解更多信息!</a></body>
</html>