[vtkusers] help please!!!!!get coordinates
Sercani
sercanimailgroups at gmail.com
Wed Feb 11 19:18:49 EST 2009
Here is a sample that gets mouse position on a volume (or another imagedata
prop) and gets the world and structured coordinates.
vtkPointPicker picker = new vtkPointPicker();
picker.Pick(mouseX,mouseY, 0, renderer);
double[] pos = new double[3];
pos = picker.GetMapperPosition();
int volIndex = imageData.FindPoint(pos); //voxel Id
double[] worldPos = new double[3];
worldPos = imageData.GetPoint(volIndex); //world coordinates of the
voxel
int ijk[] = new int[3];
double pcoords[] = new double[3];
imageData.ComputeStructuredCoordinates(pos, ijk, pcoords); //ijk is
structured coordinates of the voxel
Yours sincerely,
Sercani...
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of EDSB EDSB
Sent: Wednesday, February 11, 2009 4:24 PM
To: vtk mailing list
Subject: [vtkusers] help please!!!!!get coordinates
Hello all,
I apologize for annoying you again with my question but I need some help.
How can I extract the 3D coordinates of some non-zero voxel in a binary
metaimage?
I 'm sorry for my insistence, but I couldn't find any example on this topic.
Thanks a lot for your help!
Mary
_____
Scopri le novità! La tua vita, i <http://www.windowslive.it/> tuoi
interessi, tutto insieme su Windows Live.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090212/9b63df25/attachment.htm>
More information about the vtkusers
mailing list