[vtkusers] Questions on vtkLookupTable, SetIndexedLookup in connection with graph display
Alessandro
notinmyhead at gmail.com
Thu Dec 6 09:15:40 EST 2012
Hi,
I'm not a "total" expert but:
Il giorno 06/dic/2012, alle ore 11.49, Frese Daniel Dr. ha scritto:
> Hi,
>
> thanks you for your answer.
> I guess you talk about the line "lookupTable->SetIndexedLookup(1);".
>
> The general point is, that in my main application (the provided code being a strongly shortened version) I have vertices that I want to display in different colors within a graph, depending on the user interaction. Now initially I just use two colors out of e.g. three colors defined in the lookupTable - let's say I want to display initially colors 0 and 1, whereas the lookupTable contains colors 0, 1, 2. Now unfortunately the colors get scaled to the actually used range and I end up with color 0 displayed as color 0, but color 1 displayed as color 2. From the docs, I got the impression that this scaling is avoided when I use SetIndexedLookup(1). Maybe I am wrong with this ?
why don't simply go through the SetTable to change the table dynamically?
>
> So I started playing with it, but that led to even more questions. As I tried to explain below the code, turning IndexedLookup = true gave indefinite colors (I assume, for reasons I don't understand vtk uses NaNcolor ?),
Never happend to me but I'm guessing the NAN color is in case you put some NAN element as input of filters that mach up data and the lut...
Hope it helps...
Ale
More information about the vtkusers
mailing list