[vtkusers] vtkLookupTable... cannot manually create table for red and blue values

Luca Pamparana deluded.soul at gmail.com
Mon Sep 4 11:10:32 EDT 2006


Ok, I had some more luck after playing around with the saturation values...

So, using something like:

vtkLookupTable * lut = vtkLookupTable::New();
lut->SetHueRange(1.0/3.0, 1.0/3.0);

lut->SetSaturationRange(1.0/3.0, 1.0/3.0);
lut->SetValueRange(0.0, 1.0);
lut->SetAlphaRange(1.0, 1.0);
lut->SetNumberOfColors(256);
lut->SetRampToLinear();
lut->SetTableRange(range[0], range[1]);
lut->Build();

The resulting image is greenish... but not pure green. It seems much
lighter... Any ideas?

Cheers,
Luca

On 9/4/06, Luca Pamparana <deluded.soul at gmail.com> wrote:
>
> Hi,
>
> Thanks again. However, I am getting the same problems... only when I set
> it to red, it works... everything else, just displays a black screen...
>
> This is most bizarre....
>
> Thanks,
>
> Luca.
>
> On 9/4/06, Obada Mahdi <omahdi at gmx.de> wrote:
>
> > Hi Luca!
> >
> > On 04.09.2006, at 16:25, Luca Pamparana wrote:
> > > ohhhhhhhh... I had just hit reply! :)
> > >
> > > Thanks :)
> >
> > No problem :)
> >
> > While we are at it, there is another VTK class that might be a bit
> > more intuitive for what you are doing, vtkWindowLevelLookupTable.  It
> > is a derivate of vtkLookupTable and interpolates between two RGBA
> > values:
> >
> > | double* range = ...
> > | vtkWindowLevelLookupTable* lut = vtkWindowLevelLookupTable::New();
> > |
> > | lut->SetMinimumTableValue(0.0, 0.0, 0.0, 1.0);        // black, full
> > opacity
> > | lut->SetMaximumTableValue(0.0, 0.0, 1.0, 1.0);        // blue, full
> > opacity
> > | lut->SetWindow(range[1]-range[0]);                    // length of
> > interval
> > | lut->SetLevel((range[1]-range[0])*0.5);                       //
> > center of interval
> > | lut->Build();
> >
> > That should also do what you want (I guess).
> >
> > Regards
> >
> > Obada
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060904/5502e18e/attachment.htm>


More information about the vtkusers mailing list