[vtkusers] help please!!!!!get coordinates
EDSB EDSB
edsb at hotmail.it
Sat Feb 14 10:02:55 EST 2009
Hi Sercani,
thanks a lot for your kind answer,
I was able to solve my problem by converting my image in a vtkUnsignedCharArray
scalars = vtk.vtkUnsignedCharArray()
scalars.DeepCopy(image.GetPointData().GetScalars())
and then by using scalars.GetValue(i)
Yours sincerely,
Mary
From: sercanimailgroups at gmail.com
To: edsb at hotmail.it; vtkusers at vtk.org
Subject: RE: [vtkusers] help please!!!!!get coordinates
Date: Thu, 12 Feb 2009 02:18:49 +0200
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
tuoi interessi, tutto insieme su Windows Live.
_________________________________________________________________
Quante ne sai? Gioca con i 50 nuovi schemi di CrossWire!
http://livesearch.games.msn.com/crosswire/play_it/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090214/21bd7d8e/attachment.htm>
More information about the vtkusers
mailing list