[vtkusers] [Simplest Way To] : Texture coords to corresponding scalars ?

Sebastien BARRE seb-ml-vtk at barre.nom.fr
Sat Sep 9 19:22:14 EDT 2000


Hi

Given a texture coords (s,t) at a point P, and a 2D vtkTexture (that is 
supposed to be bound to the actor displaying the dataset of P), what's the 
quickest/easiest way to get the scalar(s) (color or grayscale) of the pixel 
at (s, t) in that texture, given the texture parameter (Repeat and so) ?

For the moment, texture->GetInput() gives me the structured point (image) 
used by the texture, then using its dimensions and the relative coordinates 
(s, t) in (0.0->1.0), I'm able to find the corresponding point ID 
(ComputePointId), then the scalars, etc.

Any shortcut ?
Thanks






More information about the vtkusers mailing list