[vtkusers] Re: problems with LookupTable

Chr. Rossmanith cr at neuro.ma.uni-heidelberg.de
Fri Jun 8 05:19:36 EDT 2001


By mistake I've sent this to Will directly - here is the copy for the list...

Christina


> Will Schroeder wrote:
>
> > >Next I read the image data and set up the rendering stuff...
> > >
> > >vtkTIFFReader reader
> > >  reader SetFileName ./test.tif
> >
> > I'm guessing that the data you read is unsigned char.
>
> You are right.
>
> > When unsigned char data goes through the mapper, it is treated as "color" by default. Use the vtkMapper::SetColorModeToMapScalars() to force the unsigned data to go through the lookup table.
>
> This helps, but only for the first stripe. The others appear bright red, though they should increase in brightness from left to right.
>
> grey level       red intensity
> 0               ->  0.2
> 63             ->  0.4
> 127           ->  0.6
> 191            -> 0.8
> 255            -> 1.0
>
> > Another observation: you are rendering an image with vtkDataSetMapper. This is very slow, since vtkDataSetMapper does the dumb thing and creates a polygon per pixel. Instead, you probably want to use the image as a texture map in combination with a plane source. (This combined functionality is performed by vtkImageActor).
>
> Then I have some kind of image reader and the image actor. But where could I call SetLookupTable. I've got it working already but still in grey (but indeed it's much faster  :-)  ).
>
> Christina
-------------- next part --------------
An embedded message was scrubbed...
From: "Chr. Rossmanith" <cr at neuro.ma.uni-heidelberg.de>
Subject: Re: [vtkusers] problems with LookupTable
Date: Thu, 07 Jun 2001 16:28:54 +0200
Size: 1776
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20010608/069e5894/attachment.eml>


More information about the vtkusers mailing list