[vtkusers] vtkTexture mapping with grayscale
    Oliver Vidovic 
    ovidovic at medipattern.com
       
    Thu Feb 28 11:40:30 EST 2002
    
    
  
 Hi
 I think what you need to do is the following:
(the code is in Tcl, but it's easy to move it the C++)
vtkLookupTable lut
	lut SetTableRange 0 65536
	lut SetHueRange 0.0 0.0
	lut SetSaturationRange 0.0 0.0
	lut SetValueRange 0.0 1.0
	lut Build
	^^^^^^^^^^^^ - you were missing this part here
Also, assign the lookup table to the texture not the mapper,
add:
	texture2d SetLookupTable lut
remove:
	mapper2d SetLookupTable lut
 I tried (in Tcl) and it worked. Hope this helps.
 thanks
 oliver
    
    
More information about the vtkusers
mailing list