[vtkusers] pixel data at world position

Renaud Isabelle renauisa at yahoo.fr
Thu Oct 6 11:48:50 EDT 2005


Hi Mark, 
 
Yes. vtkPointPicker owns 3 different functions: 
 
- GetSelectionPoint contains my (X,Y) = (Interactor->GetEventPosition()[0], 
                                                           Interactor->GetEventPosition()[1])...: returns my picked point in screen coordinates
 
- GetMapperPosition returns the real coordinates x,y,z of my picked point, non transformed point in 3D
 
- GetPickPosition, also a 3D position
 
You told me to use GetMapperPosition to compute my world coordinates from a point in screen coordinates. However, that is already that I have by using GetPickPosition: in my case, both functions, GetMapperPosition and GetPickPosition, return the same result. 

Mark Wyszomierski <markww at gmail.com> a écrit :
I don't understand:
 
selection point (X,Y) in pixel coordinates   // This is the loc picked in screen coordinates?
--> Yes, it is
real position in world (x,y,z)                       // This is the mapped position picked (mapped to an index in your image)?
-->ok, so what I would like to retrieve is the index which is mapped with my mapped position. Since index in my displayed image by VTK should be correspondant to my index in my itkImage read from a file, I could then get the pixel value of my itkimage at this index. Do you follow me? 
 
Mark

		
---------------------------------
 Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
 Téléchargez le ici !  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20051006/ec57513b/attachment.htm>


More information about the vtkusers mailing list