[vtkusers] Question on vtkLookupTable

Lodron, Gerald Gerald.Lodron at joanneum.at
Mon Sep 13 02:31:40 EDT 2010


Hi,

I am trying to make a vtk lookuptable and have problems understanding the class.

Can anyone explain me the difference between TableRange, ValueRange and Number of colors?

I interpret it as follows:

-Number of Table values are the number of entries in the lookup table but why or what is a Table Range? Shouldn't it be the same as number of colors?
-Value range is the range of the gray values in the image (e.g. 0-255)

Can anyone explain it to me, would be great.

I am trying to make a Lookuptable which mapps 0 to black and 1 to an arbitrary color which is transparent. I think i could make it like this but it doesn't work:


vtkLookupTable* poVtkLut = oMitkLut->GetVtkLookupTable();

poVtkLut->SetTableRange(0, 1);

poVtkLut->SetAlphaRange(1.0, 0.0);

poVtkLut->SetValueRange(0, 1);

poVtkLut->SetNumberOfTableValues(2);

poVtkLut->SetNumberOfColors(2);

poVtkLut->Build();



Any suggestions?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100913/9a0b70e9/attachment.htm>


More information about the vtkusers mailing list