[vtkusers] Color texture mapping

Tim Hutton T.Hutton at eastman.ucl.ac.uk
Mon Jul 30 11:20:16 EDT 2001


Hello!

I would like to map an RGB image onto a VTK object, is this possible?

I have created a vtkScalars object:

vtkScalars *scalars = vtkScalars::New();
scalars->SetNumberOfComponents(3);
scalars->SetNumberOfScalars(X*Y);

and filled it with the RGB values for my image, I would now like to use 
this as input to a vtkTexture
for mapping onto an object. When I try this I get only the first channel 
(red) being used, through a
rainbow lookup table.

Any pointers are much appreciated!

Thanks,

Tim.


---------------------------------------------------------------------------
Tim Hutton,                        http://www.eastman.ucl.ac.uk/~dmi/MINORI
Research Fellow & PhD student,                   T.Hutton at eastman.ucl.ac.uk
MINORI Project, Biomedical Informatics Unit,     Tel: [+44] (0)20 7915 2344
Eastman Dental Institute, UCL,                   Fax: [+44] (0)20 7915 2303
256 Gray's Inn Road, London WC1X 8LD, UK      Mobile: [+44] (0)7748 678 832
---------------------------------------------------------------------------
This email represents the views of the sender alone and must not be 
construed as representing the views of the Eastman Dental Institute. It may 
contain confidential information and may be protected by law as a legally 
privileged document and copyright work. Its content should not be disclosed 
and it should not be given or copied to anyone other than the person(s) 
named or referenced above. If you have received this email in error, please 
contact the sender.





More information about the vtkusers mailing list