Texture mapping is killing me

Jordi Cabot cabot at tele.ucl.ac.be
Sat Jun 19 14:43:37 EDT 1999


Hi vtkUsers,

I'm really desperate so I'm replying myself. I don't understand at all
texture mapping and how the texture coordinates work. In the book it
doesn't say much, and in the examples the TCoords are automatically
generated. Please, some good soul help me. 



 1) What are exactly the TCoords? For what I have understood every point 
 (of polygonal data) has 2 coords (if we want to map a 2D image) which
 correspond to the position of the image, so 0 0 is upper left, 1 1 is
 down right. Is this correct?

 2) This means that all the points of the dataset must have TCoords?
What if 
I just want to color a region of my surface? If all the points of the
mesh have
TCoords associated, all of them must be mapped?

 3) Let's say that I have four points of the mesh which define kind of a
frame and I want 
limit the texture map to this frame? Is that possible? How can I do it?
I guess that
the 4 points are assigned TCoords 0,0 1,0 0,1 and 1,1. But the rest of
the points(those outside the frame and those inside), what do I do with
them?

Thanks,

Jordi


Jordi Cabot wrote:
> 
> Hi vtkUsers
> 
>  I'm using vtk for visualization 3D of medical images. After getting tha
> brain and scalp
> stuff from an MRI and getting the contour etc... , I want to color map a
> region of the
>  scalp and/or brain using some matlab results. These results are the
> electrode (for
> example placed in the musculs of the hand) response to EM stimulation of
> the brain. We stimulate the brain in points of a grid which we put over
> the head of the patient and we get the points with  a 3D digiting system
> (it just take the coordinates relative to an emisor placed for example
> in the front of the head). Anyway, we obtain a 10x10
> matrix colored according to the intensity of the response. With the
> CellLocator->IntersectWithLine I get the points in the brain
> corresponding to the points where we have stimulated, and what I'd like
> to do is, knowing this correspondance between points, texture map the
> matrix into the brain.
> 
> Right know I'm just putting spheres (glyphs) in teh intersection points
> and I color them according to the scalar associated. And since yesterday
> I'm trying with vtkClipPolyData to render only the intersection of the
> spheres with the brain. The result is a kind of cercle which respects
> the rugosities of the brain
> 
>  This is texture mapping, what I need, isn't it?
> 
> I need help,
> 
> jordi
> 
> -----------------------------------------------------------------------------
> This is the private VTK discussion list.  Please keep messages on-topic.
> Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
> To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> <majordomo at gsao.med.ge.com>.  For help, send message body containing
> "info vtkusers" to the same address.     Live long and prosper.
> -----------------------------------------------------------------------------


-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list