<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hi <i>Gokhan, </i>I don't know how to do exactly but this can help you.<br>class vtkRenderWindowInteractor() can get a point , first you need a event such as "LeftButtonPressEvent"<br>#An Example in Python<br>iren.AddObserver("LeftButtonPressEvent", pick)<br><br>and a function such as "pick"<br><br>x = iren.GetEventPosition()[0]<br>y = iren.GetEventPosition()[1]<br> print "coordenadas",x,y<br>In this manner you can get tha point where is your lesion.<br><br>Now, to get the pixel maybe you need to get an Actor( a imagen in this case), therefore:<br>picker = vtkCellPicker()<br>cellID=picker.Pick(x,y,0,ren) <br>if cellID == 0: <br> return ; <br>else:<br> pickedActor = picker.GetActor()<br><br>bye,<br><br>José<br><br><br><br><hr>Date: Sat, 6 Sep 2008 22:52:49 +0300<br>From: goksoy66@gmail.com<br>To: vtkusers@vtk.org<br>Subject: [vtkusers] position of a pixel<br><br><div dir="ltr">hi all,<br><br>how can i get the position of a pixel by clicking on an image? <br><br>i have a mammogram image and there is a "lesion" on this image. I have to specify the position of lesion by clicking on it. How can i do this? <br>
<br>thanks,<br><br><i>Gokhan</i><br></div>
<br /><hr />¡Haz tu clic solidario y ayuda a África! <a href='http://www.unclicsolidario.com/' target='_new'>¡Puedes empezar ahora!</a></body>
</html>