[Insight-users] Get the selection point in screen (pixel) coordinates
David Doria
daviddoria at gmail.com
Mon Nov 29 20:59:52 EST 2010
> Actually I do not need the world coordinates. What I need is called “Index”.
> Have you tried to use MITK? In MITK, if you select a point, then on the
> right bottom of the screen, information of that point like “world position”,
> “Index”, “pixel value” appears. As you know, seed point setting in ITK
> segmentation uses “Index”, not “world position”. Am I right?
You should be able to get the index from the world coordinate by using FindCell:
int subId;
double pcoords[3];
int index = image->FindCell(p, NULL, 0, 0.0, subId, pcoords, NULL);
As you can see, the interface is terribly awkard. I though I had
pushed a patch to allow simply:
int index = image->FindCell(p);
but I guess I did not. I will start the review process on that patch tomorrow.
Does this do what you're looking for?
David
More information about the Insight-users
mailing list