[vtkusers] strange vtkLookupTable problem.

Luca Pamparana deluded.soul at gmail.com
Fri Sep 1 10:49:17 EDT 2006


Hi everyone,

I am constructing a vtkLookupTable manually as follows:

double * range = reader->GetOutput()->GetScalarRange();
vtkLookupTable * greenMap = vtkLookupTable::New();
greenMap->SetNumberOfTableValues(256);
greenMap->Build();

double i = 0.0;

for(int index=0;index<256;index++)
{
     greenMap->SetTableValue(index, 0.0, i/256.0, 0.0, 1.0);
      i++;
}
greenMap->SetAlphaRange(1.0,1.0);

greenMap->SetTableRange(range[0], range[1]);
colorMapper->SetLookupTable(greenMap);
colorMapper->Update();


I see nothing but a black screen. However, when I generate the table for
red... like:

redMap->SetTableValue(index,  i/256.0, 0.0, 0.0, 1.0);

then my image is mapped correctly to red values...

It is weird...red and gray color maps work but not green and blue!!

Can someone help me find what the problem is...it is driving me nuts!

Thanks,

Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060901/d2588dba/attachment.htm>


More information about the vtkusers mailing list