[Insight-users] Re: [vtkusers] pixel data at world position
markww at gmail.com
Wed Oct 5 14:48:01 EDT 2005
You can fire a pick event when the user clicks the mouse:
Picker->Pick(eventpos, eventpos, 0, renderer);
Then you can get the mapped position:
Then the final x,y locs of the original image I get by:
originalX = (int)(ptMapped / pixel_spacing_x + 0.5);
// same for y.
This always has given me the correct 'real' location.
On 10/5/05, Renaud Isabelle <renauisa at yahoo.fr> wrote:
> Hi all,
> I have read an initial 3D image from a file with itkImageFileReader and
> displayed with VTK through vtkImageData/vtkImageActor.
> Now, since a known world position in 3D x,y,z, I would like to retrieve
> the pixel value at this point of my image.
> This seems to be a complex problem, because I don't want the pixel data
> that is displayed at this position but the pixel data of the raw image, that
> is no rescaled instead.
> Is there some example where such a thing is done? Or any function?
> *Appel audio GRATUIT partout dans le monde* avec le nouveau Yahoo!
> Téléchargez le ici !<http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com>
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Insight-users