[vtkusers] Re: vtklookuptable question

Goodwin Lawlor goodwin.lawlor at ucd.ie
Fri Jun 23 11:33:14 EDT 2006


kdsfinger at gmail.com wrote:
> hi, all
> I have a vtkImageData built on a stack images imported by
> vtkPNGReader. When I display it by the vtkImagePlaneWidget, it has
> only 2 colors: the 0 values are mapped to black and all the rest are
> mapped to white. The values in the vtkImageData are grayscale
> (unsigned char, a mri brain image). I tried some setting of the
> vtkLookupTable but did not success. Any suggestions?
> zl2k

Hi zl2k,

Try:

ipw->SetWindowLevel(255.0, 127.5);

"Set should only be called after SetInput" from the docs... presumably 
ipw takes a guess at a w/l first.

hth

600dw1n




More information about the vtkusers mailing list