<div dir="auto">Take out the calls to set ramp and especially build. Build replaces all of the value:colors you've set with automatically generated ones.</div><div class="gmail_extra"><br><div class="gmail_quote">On Aug 7, 2017 8:04 PM, "Neel Patel 0-0-0" <<a href="mailto:siva.yedithi@gmail.com">siva.yedithi@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
I'm trying to use vtkLookupTable to add color in my image, something<br>
like what they show on the weather forecasts. From what I understand,<br>
SetRange(0,255) means that any pixel value in the image that is in between<br>
the min and max, will be assigned a value that has been set by<br>
SetTableValue(0, 0, 0, 0, 0) and SetTableValue(255, 255, 255, 255, 1). To<br>
test this out I made a simple lookupTable where everything except for 0 was<br>
given a rgb value of 255, 0, 0;<br>
<br>
vtkLookupTable table = vtkLookupTable.New();<br>
table.SetRange(0, 255);<br>
table.SetTableValue(0, 0, 0, 0, 0);<br>
<br>
for (int i = 1; i < 255; i++)<br>
{<br>
table.SetTableValue(i, 255, 0, 0, 0.3);<br>
}<br>
table.SetRampToLinear();<br>
table.Build();<br>
<br>
This however still gives me and image with red, green, and blue showing up<br>
instead of just red. Also just to note this is on top of a black/white<br>
image, so there aren't any other places from which the colors could come<br>
from. Any help would be appreciated. Thanks.<br>
<br>
Regards,<br>
Neel Patel<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Clarification-and-help-using-vtkLookupTable-tp5744313.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/Clarification-and-help-<wbr>using-vtkLookupTable-<wbr>tp5744313.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
______________________________<wbr>_________________<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/<wbr>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_<wbr>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=<wbr>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/<wbr>mailman/listinfo/vtkusers</a><br>
</blockquote></div></div>