<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I’am not sure, but your r,g,b
variable are always equal at 0. You create a lut with 256 points but there are
all the same value = 0,0,0,1 . Increment R,g,b variable….<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Soon<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
vtkusers-bounces+flaillier=eldim.fr@vtk.org
[mailto:vtkusers-bounces+flaillier=eldim.fr@vtk.org] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Luca Pamparana<br>
<b><span style='font-weight:bold'>Sent:</span></b> mercredi 18 avril 2007 15:07<br>
<b><span style='font-weight:bold'>To:</span></b> vtkusers<br>
<b><span style='font-weight:bold'>Subject:</span></b> [vtkusers] Re:
vtkLookupTable vlues continued...</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>There is a case to be
made about incrementing the variables in the loop.... boy, one of those days!<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 4/18/07, <b><span style='font-weight:bold'>Luca
Pamparana</span></b> <<a href="mailto:luca.pamparana@gmail.com">
luca.pamparana@gmail.com</a>> wrote:</span></font></span><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hello everyone,<br>
<br>
I finally managed to get rid of the RGB and grayscale blending by simply
switching the connection in the vtkImageBlend filter. However, I am still
struggling with the vtkLookupTable and using it with the
vtkImageMapToWindowLevelColors filter. <br>
<br>
So, I am creating the table as follows:<br>
<br>
vtkImageMapToWindowLevelColors * iwlc = vtkImageMapToWindowLevelColors;<br>
vtkLookupTable * lut = vtkLookupTable::New();<br>
<br>
// Input is the input vtkImageData pointer. <br>
double * range = input->GetScalarRange();<br>
<br>
lut->SetTableRange (range[0], range[1]); <br>
lut->SetNumberOfTableValues(256);<br>
lut->Build();<br>
<br>
float r, g, b;<br>
r = g = b = 0.0;<br>
<br>
for (int i = 0; i < 256; i++)<br>
{<br>
lut->SetTableValue(i, r/255.0f, g/255.0f, b/255.0f,
1.0);<br>
}<br>
iwlc->SetLookupTable(lut);<br>
iwlc->SetInput(input);<br>
<br>
Now, later when I get the output of the vtkImageMapToWindowLevelColors filter
object as: <br>
<br>
iwic->GetOutput();<br>
<br>
then the scalar range for the output data is always 0 - 0. I have tried using
calls to update but to no avail. <br>
<br>
I would really appreciate some help from experts who have experience using
these filters. <br>
<br>
Thanks,<br>
<br>
<span class=sg>Luca</span><o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>