[vtkusers] problems with LookupTable

Will Schroeder will.schroeder at kitware.com
Thu Jun 7 08:57:39 EDT 2001


Hi Christina -

At 02:04 PM 6/7/2001 +0200, Chr. Rossmanith 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. 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.

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).

Will





More information about the vtkusers mailing list