Hi All,<br><br>I have an image in gray scale. In this image, there are just three possible values: 0, 50 and 100.<br><br>I need to set 50 to red and 100 to green, so I have created the following lookup table:<br><br> vtkLookupTable *lut = vtkLookupTable::New();<br>
lut->SetNumberOfColors(101);<br> lut->SetTableValue(0,0,0,0,0);<br> lut->SetTableValue(50,1,0,0,1);<br> lut->SetTableValue(100,0,1,0,1);<br> lut->Build();<br><br>And here I'm using converting this image to RGB:<br>
<br> vtkImageMapToColors *img1_rgb = vtkImageMapToColors::New();<br> img1_rgb->SetInput(img_grey);<br> img1_rgb->SetLookupTable(lut);<br> img1_rgb->SetOutputFormatToRGBA();<br> img1_rgb->Update();<br>
<br>The problem is that the pixels with values 50 and 100 are always being converted to green, with the same intensity.<br><br>Does anyone know what I'm doing wrong?<br><br>Thanks & Regards,<br>Luis<br>