<meta http-equiv="content-type" content="text/html; charset=utf-8"><div>When using a vtkLookupTable with a vtkViewTheme, it seems to clamp the input range of the table to the range of the array used.</div><div><br></div><div>
(Based on this example: <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Graphs/ColorVertices">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Graphs/ColorVertices</a> )</div><div><br></div><div>That example works correctly - a red, white, and blue vertex is displayed. However, if I change it to:</div>
<div><br></div><div>// This is all the same</div><div><div> vtkSmartPointer<vtkLookupTable> lookupTable = </div><div> vtkSmartPointer<vtkLookupTable>::New();</div><div> lookupTable->SetNumberOfTableValues(3);</div>
<div> lookupTable->SetTableValue(0, 1.0, 0.0, 0.0); // red</div><div> lookupTable->SetTableValue(1, 1.0, 1.0, 1.0); // white</div><div> lookupTable->SetTableValue(2, 0.0, 0.0, 1.0); // blue</div><div> lookupTable->SetTableRange(0,2); </div>
<div> lookupTable->Build();</div><div> </div><div>// This changed</div><div><b> vertexColors->InsertNextValue(1); // This changed from 0 to a 1</b></div><div> vertexColors->InsertNextValue(1);</div><div> vertexColors->InsertNextValue(2);</div>
</div><div><br></div><div>I would expect the output to be two white vertices and a blue vertex. Instead, I see two RED vertices (the lowest value in the table) and a blue vertex.</div><div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Graphs/ColorVertices"></a><br clear="all">
Anyone know how to prevent this?<br><br></div><div>Thanks,</div><div><br>David<br>
</div>