[vtkusers] creating a lookup table for grayscale images

Luca Pamparana luca.pamparana at gmail.com
Tue Apr 17 12:13:22 EDT 2007


Hi everyone,

I just wanted to create a new post for my ongoing problem and wondering if
someone can help me here.

I need to use the vtkImageMapToWindowLevelColors filter and I am trying to
create a look up table

I am trying to create a LUT so that I can use it with this filter. My image
has intensities between 0 and 20000 and it is a grayscale medical image.

Now, I am playing around with this vtkLookupTable and am unable to create
one that I can use with the vtkImageBlendFilter.

So, if I create the table as follows:

vtkLookupTable * lut = vtkLookupTable::New();
lut->SetTableRange (0, 20000);
lut->SetSaturationRange (0, 0);
lut->SetHueRange (0, 0);
lut->SetValueRange (0, 1);
lut->Build(); //effective built

and then use the vtkImageMapToWindowLevelColors filter

iwlc->SetLookupTable(lut);
iwlc->SetInput(myImageData);

Now when I pipe the output of this filter to the vtkImageBlend filter, I get
the following error:

vtkImageBlend (0xa80e80): input has too many components, can't blend RGB
data into greyscale data

I would be really grateful if someone could help me with this.

Thanks,
Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070417/ac007d48/attachment.htm>


More information about the vtkusers mailing list